Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

part 0 exercises submission #7

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,9 @@

### Goal: Complete the exercises from Fullstack Open Week 0: [https://fullstackopen.com/en/part0](https://fullstackopen.com/en/part0)

### How to submit your code for review:
### Pull Request Thoughts

- Fork and clone this repo
- Create a new branch called solutions
- Checkout solutions branch
- Push to your fork
- Issue a pull request
- Your pull request description should contain the following:
- (1 to 5 no 3) I completed the challenges
- (1 to 5 no 3) I feel good about my code
- Anything specific on which you want feedback!
I completed the challenge: 5 <br/>
I feel good about my code: 5 <br/>
I found the sequence diagrams helpful. <br/>

#Example:
```
I completed the challenge: 5
I feel good about my code: 4
I'm not sure if my constructors are setup cleanly...
```
49 changes: 49 additions & 0 deletions exercise_0.4/exercise_0.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## Part 0 - Exercise 0.4 - New Note

**Exercise Problems:**[Full Stack Open Link To Exercises 0.1-0.6](https://fullstackopen.com/en/part0/fundamentals_of_web_apps#exercises-0-1-0-6)

---

**user->browser:**

**note over browser:**<br/>
user writes a note inside<br/>
the form and clicks submit<br/>
**end note**<br/>

**browser->server:** HTTP POST https://studies.cs.helsinki.fi/exampleapp/notes<br/>

**note over server:**<br/>
server receives request from user<br/>
to write a note to the database<br/>
**end note**<br/>

**server-->browser:** URL redirect to https://studies.cs.helsinki.fi/exampleapp/notes

**note over browser:**<br/>
server writes note to database<br/>
and browser reloads notes page<br/>
**end note**<br/>

**browser->server:** HTTP GET https://studies.cs.helsinki.fi/exampleapp/notes<br/>
**server-->browser:** HTML-code<br/>
**browser->server:** HTTP GET https://studies.cs.helsinki.fi/exampleapp/main.css<br/>
**server-->browser:** main.css<br/>
**browser->server:** HTTP GET https://studies.cs.helsinki.fi/exampleapp/main.js<br/>
**server-->browser:** main.js<br/>

**note over browser:**<br/>
browser starts executing js-code<br/>
that requests JSON data from server<br/>
**end note**<br/>

**browser->server:** HTTP GET https://studies.cs.helsinki.fi/exampleapp/data.json<br/>
**server-->browser:** [{ content: "HTML is easy", date: "2020-11-9" }, ...]<br/>

**note over browser:**<br/>
browser executes the event handler<br/>
that renders notes to display<br/>
**end note**<br/>

----
**Resource:** [Link to Web Sequence Diagram Resource](https://www.websequencediagrams.com/)
Binary file added exercise_0.4/http_post_uml_sequence_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions exercise_0.5/exercise_0.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Part 0 - Exercise 0.5 - Single Page App

**Exercise Problems:**[Full Stack Open Link To Exercises 0.1-0.6](https://fullstackopen.com/en/part0/fundamentals_of_web_apps#exercises-0-1-0-6)

---

**browser->server:** HTTP GET https://studies.cs.helsinki.fi/exampleapp/spa<br/>
**server-->browser:** HTML-code for single-page application<br/>
**browser->server:** HTTP GET https://studies.cs.helsinki.fi/exampleapp/main.css<br/>
**server-->browser:** main.css<br/>
**browser->server:** HTTP GET https://studies.cs.helsinki.fi/exampleapp/spa.js<br/>
**server-->browser:** spa.js<br/>

**note over browser:**<br/>
browser starts executing JS code<br/>
requesting JSON data from server<br/>
**end note**<br/>

**browser->server:** HTTP GET https://studies.cs.helsinki.fi/exampleapp/data.json<br/>
**server-->browser:** [{ content: "HTML is easy", date: "2020-11-9" }, ...]<br/>

**note over browser:**<br/>
browser executes event handler<br/>
rendering notes to display<br/>
**end note**<br/>

---
**Resource:** [Link to Web Sequence Diagram Resource](https://www.websequencediagrams.com/)
Binary file added exercise_0.5/single_page_app_sequence_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions exercise_0.6/exercise_0.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Part 0 - Exercise 0.6 - New note

**Exercise Problems:**[Full Stack Open Link To Exercises 0.1-0.6](https://fullstackopen.com/en/part0/fundamentals_of_web_apps#exercises-0-1-0-6)

---

**user->browser:**<br/>

**note over browser:**<br/>
user writes a note inside<br/>
the form and clicks "Submit"<br/>
**end note**<br/>

**browser->server:** HTTP POST https://studies.cs.helsinki.fi/exampleapp/new_note_spa

**note over server:**<br/>
server receives user request<br/>
to write a note to the database<br/>
**end note**<br/>

**note over browser:**<br/>
server writes note to database<br/>
and browser stays on same page<br/>
**end note**<br/>

**server-->browser:** status code "201 Created"

---
**Resource:** [Link to Web Sequence Diagram Resource](https://www.websequencediagrams.com/)
Binary file added exercise_0.6/new_post_via_single_page_app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.