Difference between revisions of "Module 7"

From CSE330 Wiki
Jump to navigationJump to search
 
(84 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
This module will be teaching “Angular JS,” a framework that works with Javascript and HTML to create a front-end of a website much easier and faster. It is part of the oft-used “MEAN stack,” which is a stack that entirely uses Javascript, for the database, backend, and front end. To learn more about the MEAN stack, as well as using Git to do more than check out and commit repos, check out the [old] module 7.  
+
The goal of the creative project is for you to learn a new framework or language that you may be interested in. This is a good opportunity to get a head start on learning the frameworks/languages your employer/potential employer uses.
  
== Individual Assignment ==
+
You’re free to choose which frameworks/languages you’ll use, and you’ll earn more points for learning more or harder frameworks, but '''you’re required to learn at least one new framework/technology.'''
In this assignment you will build an Angular website. To learn Angular, please view and complete [[[https://docs.angularjs.org/tutorial this]]] tutorial, and focus on steps 0-9.  The other steps and the tests at the bottom of each step are helpful and to master Angular you will need to learn these. However, for this module, you are not required to do these parts.  
 
  
Now that you have finished the tutorial, we will make a coffee rating website!
+
'''As an example''':
  
=== Setting up ===
+
You cannot use the combination of Plain HTML/JavaScript (frontend), PHP (backend), and MySQL (Database) because we've covered those extensively in class.
To help you get started, download a skeleton to build an angular app on, called Angular-Seed. Go [[[https://github.com/angular/angular-seed/blob/master/README.md here]]] and follow the instruction to download the seed, naming your project ‘coffees.’
 
Note: Although you can ignore a lot of these files (the node directory, the karma files, view1/view2, etc), by downloading the seed you can get around issues such as creating the server (this does it for you), and if you were going to use a backend, having node all set up for you is really nice.  
 
  
Now that you’ve downloaded the seed, you will need to modify the following files: app.js, and index.html. Furthermore, you will add the following files: coffees.html, and reviews.html.
+
You could, however, use React.JS (frontend), PHP, and MySQL, because your React front end would be new.
  
=== Creating the Site ===
+
== Creating Your Rubric ==
 
Your site will need to use ‘ngRoute’ with two views on top of index.html. One view (coffees.html) will be a list of all coffees in the database, sorted by name. There should be a search box at the top to find a particular coffee. Each listing in the table should include a brand, a name, a location, and a link to see the reviews of that coffee. Here’s what it may look like before CSS:
 
[[File:coffees-bare.jpg|thumb|center|alt=A]]
 
  
Once you click the link, it should go to the second view (reviews.html). This should be another table, of all of the reviews for the coffee list.
+
Before creating a rubric, you should come up with an idea for a site you want to build. From there, check [https://classes.engineering.wustl.edu/cse330/index.php?title=Web_Frameworks here] for guidance on which frameworks/languages to learn for your project and for links on how to get started with each.
 
''Note: in order to keep a variable in a controller when you switch between two different views (instead of resetting the variables), use $rootScope as a dependency for that controller.
 
For example, if you want to keep the id of the selected coffee, making it $rootScope.selectedID in your controller will keep the value of that variable when you switch from coffees.html to reviews.html.''
 
Here’s what your reviews.html may look like before CSS:
 
 
  
At all times, there should be a button at the top (not in either view, but in the main page) that takes you home (coffees.html).
+
As a general structure, your project will consist of:
In app.js, you will need to copy the following array into your controller:
+
*Front-end
 +
*Back-end
 +
*Database
 +
*Styling
 +
*Best practices
 +
(Though note that using all may not be necessary for your project! Reallocate as you need)
  
This will be your “database,” as we are not going to use the “$http” dependency. The following is needed for the site:
+
==== General Rubric Guidelines ====
 +
Your rubric will add up to '''100 points''' (including the 5 points earned for submitting your rubric on time). For each component of your stack, you can allocate the following numbers of points:
 +
*5 points for creating a rubric and uploading it to Github on time (yes, we will be checking your commit timestamps!). Please make sure you check your rubric out with a TA, or else it would not be considered submitted.
 +
*[10 - 40] points: Learning and implementing new framework(s).
 +
*Functionality
 +
**Think about what's happening in your front end, backend, and database that creates functionality. See example rubric.
 +
*5 points: Best Practices
 +
**Code well formatted
 +
**HTML output passes the validator
 +
*[0 - 20] points: Creative Portion
 +
*[0 - 5] points: Styling. "Looks really cool" or "Used Bootstrap" would '''not''' earn any points. Learning and implementing SCSS/SASS, animations, or making your page responsive/mobile-friendly would.
  
=== Style ===
+
''Note that exceptions can be made to these guidelines, but make sure to get approval from a TA.''
  
Finally, use CSS and UI Bootstrap (view the reference [[[https://angular-ui.github.io/bootstrap/ here]]] ), to make the site look pretty.
+
===== Points you can allocate for frameworks =====
Although you’re allowed to use whatever CSS/Bootstrap you want, UI Bootstrap makes things really easy. For example, using stars in the rating directives to display ratings instead of a number. 
+
Because some stacks have a higher learning curve, more points will be earned for using them. Use the following as a guide:
Please follow the installation instructions carefully. The following should be in your index.html if you are using UI Bootstrap:
+
*React, Vue, Angular, and other frontend frameworks : 10
          <script src "bower_components/angular-bootstrap/ui-bootstrap.js"></script>
+
*Express (Node.js framework), Laravel, Bottle, Flask, other back-end micro frameworks: 10
          <script src="bower_components/angular-bootstrap/ui-bootstrap.min.js" type="text/javascript"></script>
+
*Full stack frameworks like Django (python): 20
          <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" type="text/javascript"></script>
+
*Learning a new database system:
 +
**Mongo DB: 10
 +
**Firebase: 5 (lower learning curve)
 +
**Other SQL Databases (Postgres, MariaDB): 5
  
At the end, your coffee site should look something like this:
+
== Example Rubric ==
 +
Say your project idea is to re-create Bitly (the URL shortener), where shortened URLs expire after 1 week, but users can purchase the shortened URL (using stripe) for it to work forever. You decide you want to use Vue for your frontend, Laravel for your backend, and a MySQL database.
 +
Your rubric could look like the following:
 +
======Rubric turned in on time (5 points)======
 +
Remember to get it checked out by a TA!
  
[[File: Coffee-css.png|thumb|none|Coffee page]]
+
======Languages/Frameworks used (20 points)======
[[File: Reviews-css.png|thumb|none|Review page]]
+
*10 - Learned/Used Vue.js frontend
 +
*10 - Learned/Used PHP Laravel backend
 +
*0 - MySQL Database
 +
======Functionality (60 points)======
 +
*5 Users can input a url and receive a shortened url that redirects to it.
 +
*10 Url redirect lasts 1 week before the shortened link doesn't work
 +
*10 Users can register, login, and logout
 +
*10 Logged in users can edit and delete their shortened URLs
 +
*15 Logged in users can purchase a shortened URL via Stripe integration
 +
*10 Database contains Users, Links, and Purchases with the necessary columns and column types to maintain the above functionality
 +
======Best Practices (5 points)======
 +
*3 Code is readable and well formatted
 +
*2 All pages pass the html validator
 +
======Creative Portion (10 points)======
  
 
== Grading ==
 
== Grading ==
  
 +
'''Assignments must be committed to Github by the end of class on the due date (commit early and often). Failing to commit by the end of class on the due date will result in a 0.'''
  
We will be grading the following aspects of your work.  There are 100 points total.
+
___________
  
 +
Your project will be graded '''in person''' during the last week of classes, using the rubric you create.
  
'''Assignments must be demoed within 2 weeks of the assignment being due. We will grade late penalties based on Bitbucket submission time-stamps, so you are allowed to demo at TA office hours. However, after two weeks of not demoing, you will receive a zero for the assignment.'''
+
___________
  
#''You must save your repo as:''
+
[[Category:Module 7]]
#*"<Season><year>-Module<#>-FirstName-LastName-StudentID"
+
[[Category:Modules]]
#*(ie. Spring2025-Module3-John-Doe-201343)
 
 
 
_______
 
 
 
 
 
# '''Completed Google Angular Tutorial steps 0-9 (5 points)'''
 
# '''Completed coffee web application (45 points)'''
 
#* Index.html (5 points)
 
#** Working button with back to home button at all times (3 points)
 
#** Sets up angular correctly (2 points)
 
#* App.js (10 points)
 
#** Set  up module ( 5 points)
 
#** Controller (5 points)
 
#*** Have one controller for the project ( 2 points)
 
#*** Use scope and rootScope injections (3 points)
 
#* Coffees.html (15 points):
 
#** List of all coffees sorted by name (3 points)
 
#** Search bar, working correctly (4 points)
 
#** Has Name, Brand, Location, and review link all displayed in one table (3 points)
 
#** Review link works, and takes you to another view (5 points)
 
#* Reviews.html
 
#** Reviews of correct coffee, and only correct coffee, are listed (10 points)
 
#** All reviews are Listed ( 2 points)
 
#** Rating, Comment, and commenter are listed in the same table. (3 points)
 
#* BootStrapping
 
#** Site looks good, intuitive, and professional ( 5 points)
 

Latest revision as of 20:33, 20 August 2019

The goal of the creative project is for you to learn a new framework or language that you may be interested in. This is a good opportunity to get a head start on learning the frameworks/languages your employer/potential employer uses.

You’re free to choose which frameworks/languages you’ll use, and you’ll earn more points for learning more or harder frameworks, but you’re required to learn at least one new framework/technology.

As an example:

You cannot use the combination of Plain HTML/JavaScript (frontend), PHP (backend), and MySQL (Database) because we've covered those extensively in class.

You could, however, use React.JS (frontend), PHP, and MySQL, because your React front end would be new.

Creating Your Rubric

Before creating a rubric, you should come up with an idea for a site you want to build. From there, check here for guidance on which frameworks/languages to learn for your project and for links on how to get started with each.

As a general structure, your project will consist of:

  • Front-end
  • Back-end
  • Database
  • Styling
  • Best practices

(Though note that using all may not be necessary for your project! Reallocate as you need)

General Rubric Guidelines

Your rubric will add up to 100 points (including the 5 points earned for submitting your rubric on time). For each component of your stack, you can allocate the following numbers of points:

  • 5 points for creating a rubric and uploading it to Github on time (yes, we will be checking your commit timestamps!). Please make sure you check your rubric out with a TA, or else it would not be considered submitted.
  • [10 - 40] points: Learning and implementing new framework(s).
  • Functionality
    • Think about what's happening in your front end, backend, and database that creates functionality. See example rubric.
  • 5 points: Best Practices
    • Code well formatted
    • HTML output passes the validator
  • [0 - 20] points: Creative Portion
  • [0 - 5] points: Styling. "Looks really cool" or "Used Bootstrap" would not earn any points. Learning and implementing SCSS/SASS, animations, or making your page responsive/mobile-friendly would.

Note that exceptions can be made to these guidelines, but make sure to get approval from a TA.

Points you can allocate for frameworks

Because some stacks have a higher learning curve, more points will be earned for using them. Use the following as a guide:

  • React, Vue, Angular, and other frontend frameworks : 10
  • Express (Node.js framework), Laravel, Bottle, Flask, other back-end micro frameworks: 10
  • Full stack frameworks like Django (python): 20
  • Learning a new database system:
    • Mongo DB: 10
    • Firebase: 5 (lower learning curve)
    • Other SQL Databases (Postgres, MariaDB): 5

Example Rubric

Say your project idea is to re-create Bitly (the URL shortener), where shortened URLs expire after 1 week, but users can purchase the shortened URL (using stripe) for it to work forever. You decide you want to use Vue for your frontend, Laravel for your backend, and a MySQL database. Your rubric could look like the following:

Rubric turned in on time (5 points)

Remember to get it checked out by a TA!

Languages/Frameworks used (20 points)
  • 10 - Learned/Used Vue.js frontend
  • 10 - Learned/Used PHP Laravel backend
  • 0 - MySQL Database
Functionality (60 points)
  • 5 Users can input a url and receive a shortened url that redirects to it.
  • 10 Url redirect lasts 1 week before the shortened link doesn't work
  • 10 Users can register, login, and logout
  • 10 Logged in users can edit and delete their shortened URLs
  • 15 Logged in users can purchase a shortened URL via Stripe integration
  • 10 Database contains Users, Links, and Purchases with the necessary columns and column types to maintain the above functionality
Best Practices (5 points)
  • 3 Code is readable and well formatted
  • 2 All pages pass the html validator
Creative Portion (10 points)

Grading

Assignments must be committed to Github by the end of class on the due date (commit early and often). Failing to commit by the end of class on the due date will result in a 0.

___________

Your project will be graded in person during the last week of classes, using the rubric you create.

___________