Thom Page 10 years ago
commit 1ef0d002aa

@ -0,0 +1,117 @@
# ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Project #2: Building Your First Full-stack Application
## Overview of `Forum.app`
Jake loves discussion amongst his friends, but he wants a way to keep it organized. He wants his own forum.
## Project Details
### Necessary features
A basic implementation of this project must include:
1. Jake wants his friends to be able to discuss things by topics. Users should be able to create topics, and other users should be able to comment on those topics.
2. Jake isn't concerned about sub-comments, for now.
3. Jake also wants to be able to see what topics have the most comments.
4. Jake thinks it would be cool if users could vote on topics, and have the topics displayed based on popularity.
5. Jake wants users to be able to set their username only once, and to have the posts and comments show which user made them.
6. Jake really wants the application to look good.
### Advanced features
Going above and beyond the basic implementation is desirable, should you have the time. Feel free to enhance your project with any of the following features:
1. Jake wants users to sign up with a username and password, and to login to the application before being able to use it. (session controllers + user models)
2. Jake would really like the passwords to be secure. (node package: bcrypt)
3. Jake would like the application to look good both on a computer, and on a phone. (CSS: media queries)
4. Jake would like people to comment on comments. Perhaps this means top-level + one-level deep, or nesting more like reddit?
5. Jake would like the application to automatically tag posts with the location from which they are written. (html5: geolocation + google map api)
6. Jake is a nerd, and is a fan of proper formatting. He wants everyone to write their discussion posts in markdown format. (node package: marked)
## Implementation
### Technologies
You will be expected to use the following technologies to implement this project:
- **HTML**
Your HTML should be semantic.
- **CSS**
Your app should be stylish.
- **JavaScript & jQuery**
Your app should be responsive.
- **node.js & express**
Your app will need to have its own server.
- **mongoose**
Your app will need to persist data.
### Timeframe
Project kickoff is Friday, June 24th, and last day for development is Monday, June 27th. We will be demoing our deployed applications on Tuesday, June 28th.
## Expectations
### You
As a student you should be doing the following things:
- **Wireframes**
Create wireframes in advance for your application to prevent surprises as you develop it.
- **Version Control**
Use **git** and **github** for version control, and make frequent incremental commits to prevent large scale implosions.
- **Hosting**
Host your application on **Heroku**, and use the **mongolab** plugin to have a cloud-based mongodb.
- **Handling Problem During Coding**
Please remember to try the following things when you encounter a problem:
1. If the problem involves a JavaScript error, please try to google the error message.
2. Ask someone on Slack if they've encountered a similar problem.
3. Ask Derek
4. BONUS: Write up your question on stackoverflow and try to elicit community support
5. Finally, create an issue (see what is needed in Project 2 README.md)
### Us
Since your instructors will be assessing your work, they will look for the following things:
- **Project Workflow**
Did you complete the user stories and wireframes, as specified above? Did you use source control as expected for the phase of the program youre in (detailed above)?
- **Technical Requirements**
Did you deliver a project that met all the technical requirements? Given what the class has covered so far, did you build something that was reasonably complex?
- **Creativity**
Did you add a personal spin or creative element into your project submission? Did you deliver something of value to the end user (not just a login button and an index page)?
- **Code Quality**
Did you follow code style guidance and best practices covered in class, such as spacing, modularity, and semantic naming? Did you comment your code as your instructors have in class?
- **Problem Solving**
Are you able to defend why you implemented your solution in a certain way? Can you demonstrate that you thought through alternative implementations?
## Deliverables
By the time the project is over, we will expect the following from you:
* A **working app, built by you**, hosted somewhere on the internet
* A **link to your hosted working app** in the URL section of your Github repo
* A **git repository hosted on Github**, with a link to your hosted project, and frequent commits dating back to the very beginning of the project
* **A ``readme.md`` file** with explanations of the technologies used, the approach taken, installation instructions, unsolved problems, etc.
* **Wireframes of your app** (at least one)
* A link in your ``readme.md`` to the **user stories you created**
Most importantly a **technical demonstration** of your app which:
* Is 5 minutes in length
* Shows off all features of the app
* Explains the technical details
* Explains the technical challenges
* Explains which improvements you might make

@ -0,0 +1,147 @@
# ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Project #2: Building Your First Full-Stack Application
## Overview
You will have the option of chosing between creating a wiki or a forum (details for these are in seperate markdown files in this folder).
You will be creating a full stack application using everything that you've learned in Unit 2.
**You will be working individually for this project**, but we'll be guiding you along the process and helping as you go. Show us what you've got!
## Technical Requirements
Your app must:
* **Meet the specific requirements specified in the individual project markdown**
* **Include separate HTML / CSS / JavaScript files**
* Use Node.js, Mongoose, and Express.
* Stick with **KISS (Keep It Simple Stupid)** and **DRY (Don't Repeat Yourself)** principles
* **Deploy your application online**, where the rest of the world can access it
* Use **semantic markup** for HTML and CSS (adhere to best practices)
## Project Markdowns
##### Wiki
(seperate markdown file with directions)<br>
Henrietta is a business magnate and wants to create an internally facing wiki for her organization. She wants her employees to be able to write articles in order to inform colleagues about their insights.
##### Forum
(seperate markdown file with directions)<br>
### Suggested Ways to Get Started
* **Wireframe** Make a drawing of what your app will look like on each page of your application (what does it look like as soon as you log on to the site? What does it look like once a user logs in, etc.).
* **Break the project down into different components** (data, presentation, views, style, DOM manipulation) and brainstorm each component individually.
* **Use your Development Tools** (console.log, inspector, alert statements, etc) to debug and solve problems
* Work through the lessons in class for help and inspiration! Think about adding relevant code to your application each day - you are given 4 days so that you can work on it in small chunks, COMMIT OFTEN. We will be looking at your commit dates and comments are part of your scoring.
* **Commit early, commit often.** Dont be afraid to break something because you can always go back in time to a previous version.
* **Consult documentation resources** (MDN, jQuery, etc.) at home to better understand what youll be getting into.
* **Dont be afraid to write code that you know you will have to remove later.** Create temporary elements (buttons, links, etc) that trigger events if real data is not available. For example, if youre trying to figure out how to change some text when the game is over but you havent solved the win/lose game logic, you can create a button to simulate that until then.
## Deliverables
By the time the project is over, we will expect the following from you:
* A **working application, built by you**, hosted somewhere on the internet
* A **link to your hosted working app**
* A **git repository hosted on Github** NOT inside your wdi-remote repository. Frequent commits dating back to the very beginning of the project
* **A ``readme.md`` file** with explanations of the technologies used, the approach taken, a link to your live site, installation instructions, unsolved problems, etc.
Most importantly a **technical demonstration** of your app which:
* Is 5 minutes in length
* Shows off all features of the app
* Explains the technical details
* Explains the technical challenges
* Explains which improvements you might make
## Project Feedback + Evaluation
* __Project Workflow__: Do you have a Github respository for your project (not inside your wdi-remote repo)? Did you complete the user stories, wireframes, and the README.md file as specified above? Did you use source control (Github commits) as expected for the phase of the program youre in (detailed above)?
* __Technical Requirements__: Did you deliver a project that met all the technical requirements? Given what the class has covered so far, did you build something that was reasonably complex?
* __Creativity__: Did you add a personal spin or creative element into your project submission? Did you deliver something of value to the end user (not just a login button and an index page)?
* __Code Quality__: Did you follow code style guidance and best practices covered in class, such as spacing, modularity, and semantic naming? Did you comment your code as your instructors have in class?
* __Deployment__: Did you deploy your application to a public url using GitHub Pages?
* __Total__: Your instructors will give you a total score on your project between:
Score | Category | Expectation | Expectation | Expectation | Expectation | Expectation |
:-----: | ------------ | ---------------- | --- | --- | --- | --- |
**6** | Project Workflow | Do you have a Github respository for your project (not inside your wdi-remote repo)? | Did you complete the user stories and are they in your Github issues (2 points) | wireframes | README.md with specified information | source control with Github (commits) |
**6** | Technical Requirements | Did you deliver a project that met all the technical requirements? (discussed in your MVP (a score between 1-3 will be given))| Given what the class has covered so far, did you build something that was reasonably complex? (complexity will be given a grade 1-3) |
**2** | Creativity | Did you add a personal spin or creative element into your project submission? | Did you deliver something of value to the end user (not just a login button and an index page)? |
**2** | Code Quality | Did you follow code style guidance and best practices covered in class, such as spacing, modularity, and semantic naming? | Did you comment your code as your instructors have in class? |
**2** | Deployment | Did you deploy your application to a public url using GitHub Pages? |
**2** | Technical demonstration | Is 5 minutes in length & shows off all the features of your app. | Expalins technical details, technical challenges, and any improvements you might make. |
_Maximum possible points_ | **20** |
---
# Project Week
## Attendance
You are required to be present by 10:00 am EDT each day during the project.
## Standups
We will have student-run stand-ups each morning at 10:15 am EDT where you will answer the following questions:
- What did I work on yesterday
- What am i trying to get done today
- What is preventing me from getting this done.
This meeting should take no longer than 15 minutes.
If you have ideas on how you can help a fellow-student with work that they are stuck on, please follow-up with information AFTER the stand up.
## Meetings with instructors
_Your instructor will contact you to setup a meeting time_
**Friday, June 24**<br>
Work on your [MVP](https://en.wikipedia.org/wiki/Minimum_viable_product) and an initial wireframe in the morning. You will have a 15 minute meeting to get your project approved.
**Saturday & Sunday, June 25-26**<br>
Work on your project. Come prepared with any questions for Monday morning.
**Monday, June 27**<br>
15 minute check in to see where you are with your work over the weekend. Help you to decide what to finish and what features should be stretch goals.
**Tuesday, June 28**<br>
Submit your issue by 10 am EDT and present your project.
## Where to go for help during project week
1. Seek out help online
2. Seek out help with your classmates
3. Seek out help with Derek (TA)
4. Submit a Github issue **on the wdi-remote** class Github account to receive help from an instructor
## Formatting your GitHub Issue for wdi-remote to ask for help
*PUSH OFTEN! Your code on GitHub should be up to date. Submiting an issue and linking us to old, out-of-date code will hinder the process.*
1. **WHAT YOU ARE TRYING TO SOLVE:**
- Write a detailed explanation of the feature or user story you're working on.
2. **DETAILED DESCRIPTION OF THE BUG/ERROR:**
- A detailed description of the problem, the bug, and/or the error. This means: the full steps to reproduce, a link to the file on github, and the line number of where the relavent code is.
The error(s) returned, copy and pasted/typed out/screenshot, not paraphrased.
- If there is other code in a different file that is also essential to the functioning of the code that currently works point us to that and explain the relationship.
3. **WHAT I'VE TRIED**
- List everything you've done to solve the bug on your own in detail. list all resources you've looked up and tried to implement and provide links. Providing code if you have it surrounded by the md syntax to display nicely is very helpful.
4. **QUESTION**
- After going through all this what is your questions specifically, more specifically than how can I make this work?
## Useful Resources
* **[MDN Javascript Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript)** _(a great reference for all things Vanilla Javascript)_
* **[jQuery Docs](http://api.jquery.com)** _(if you're using jQuery)_
* **[GitHub Pages](https://pages.github.com)** _(for hosting your game)_

@ -0,0 +1,117 @@
# ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Project #2: Building Your First Full-Stack Application
## Overview of `Wiki.app`
Henrietta is a business magnate and wants to create an internally facing wiki for her organization. She wants her employees to be able to write articles in order to inform colleagues about their insights.
## Project Details
### Necessary features
A basic implementation of this project must include:
1. All articles should be editable - this is a collaborative workplace!
2. All articles should display an author so that anyone who has questions about the contents of an article can contact the author
3. If an article is changed, the time of that change should be shown so that users can know how up to date an article is
4. Henrietta wants users to be able to add a category to an article so that articles can be organized
5. Henrietta really wants the application to look good
### Advanced features
Going above and beyond the basic implementation is desirable, should you have the time. Feel free to enhance your project with any of the following features:
1. Henrietta wants users to sign up with a username and password, and to login to the application before being able to use it. (session controllers + user models)
2. Henrietta would really like the passwords to be secure. (node package: bcrypt)
3. Henrietta is a fan of proper formatting. She wants everyone to write their articles in markdown format. (node package: marked)
4. Henrietta would love the articles to be printable! The print version should be nicely formatted only showing the content. (CSS: media queries)
5. Henrietta thinks old changes should persist, rather than be overwritten, so you can see old versions of the article.
6. She would like users to be able to comment on changes, so they can discuss the pros and cons of a change.
7. **EXTRA FANCY** She would like changes to be ratified before becoming the default article. The newest change with 80% approval is the current article version.
## Implementation
### Technologies
You will be expected to use the following technologies to implement this project:
- **HTML**
Your HTML should be semantic.
- **CSS**
Your app should be stylish.
- **JavaScript & jQuery**
Your app should be responsive.
- **node.js & express**
Your app will need to have its own server.
- **mongoose**
Your app will need to persist data.
### Timeframe
Project kickoff is Friday, June 24th, and last day for development is Monday, June 27th. We will be demoing our deployed applications on Tuesday, June 28th.
## Expectations
### You
As a student you should be doing the following things:
- **Wireframes**
Create wireframes in advance for your application to prevent surprises as you develop it.
- **Version Control**
Use **git** and **github** for version control, and make frequent incremental commits to prevent large scale implosions.
- **Hosting**
Host your application on **Heroku**, and use the **mongolab** plugin to have a cloud-based mongodb.
- **Handling Problem During Coding**
Please remember to try the following things when you encounter a problem:
1. If the problem involves a JavaScript error, please try to google the error message.
2. Ask someone on Slack if they've encountered a similar problem.
3. Ask Derek
4. BONUS: Write up your question on stackoverflow and try to elicit community support
5. Finally, create an issue (see what is needed in Project 2 README.md)
### Us
Since your instructors will be assessing your work, they will look for the following things:
- **Project Workflow**
Did you complete the user stories and wireframes, as specified above? Did you use source control as expected for the phase of the program youre in (detailed above)?
- **Technical Requirements**
Did you deliver a project that met all the technical requirements? Given what the class has covered so far, did you build something that was reasonably complex?
- **Creativity**
Did you add a personal spin or creative element into your project submission? Did you deliver something of value to the end user (not just a login button and an index page)?
- **Code Quality**
Did you follow code style guidance and best practices covered in class, such as spacing, modularity, and semantic naming? Did you comment your code as your instructors have in class?
- **Problem Solving**
Are you able to defend why you implemented your solution in a certain way? Can you demonstrate that you thought through alternative implementations? (Note that this part of your feedback evaluation will take place during your one-on-one code review with your instructors, after you've completed the project.)
## Deliverables
By the time the project is over, we will expect the following from you:
* A **working app, built by you**, hosted somewhere on the internet
* A **link to your hosted working app** in the URL section of your Github repo
* A **git repository hosted on Github**, with a link to your hosted project, and frequent commits dating back to the very beginning of the project
* **A ``readme.md`` file** with explanations of the technologies used, the approach taken, installation instructions, unsolved problems, etc.
* **Wireframes of your app** (at least one)
* A link in your ``readme.md`` to the **user stories you created**
Most importantly a **technical demonstration** of your app which:
* Is 5 minutes in length
* Shows off all features of the app
* Explains the technical details
* Explains the technical challenges
* Explains which improvements you might make

@ -0,0 +1,25 @@
#Homework
## Handling Sessions in Node
The video associated with this gist is located [here](https://www.youtube.com/watch?v=C_Cb8-lsrn8).
## Concept Questions
1. What are cookies (not the food kind)? Where can you find them in the browser?
2. What is a 'session'?
3. What kind of options can we set on the express-sessions pacakge when we .use it? what is required? What does the secret do?
4. How do we access the session storage in node?
5. What kind of things can be stored in a sessions?
6. What kind of things do you think sessions will eventually allow us to implement?
## Exercises
Create a new express server and npm install and require everything you need (or use the one you made while following along the video if you had done so). Be sure to install express-sessions, body-parser, ejs, and mongoose. Also remember to touch a .gitignore file and ignore node_modules. Do the following with this server:
1. Create 2 pages: a welcome page and a form page. The form should ask the user for a name. When the user submits the form, save it in sessions and make the welcome page display: "Welcome, name". Refresh the welcome page, does the name persist?
2. Lets now use a database with stored information to populate our session.
- Connect to mongo using mongoose
- Create a mongoose schema for a user. Be sure to register it into a model. The schema should have a name (string) and color (also string)
- Change the form route for setting the user's name. Instead of setting it in sessions, Create a new user in your user collection. Add an input for the person's favorite color and store that along with the user's name.
- Create a new page for a login form. This form should take only a user's name. When a user submits, find there document in the database and set, in sessions, their name and color.
- When a user goes to the welcome page, if they do not have a name set in sessions, redirect them to the login. If they have a name, render the welcome page with the normal welcome message and change the background to their color.
Loading…
Cancel
Save