Thursday, November 26, 2015

Day 19

Semi-RESTful Routes


Today was more Pylot and for us to starting using the RESTful method of routing. REST is a way to route server side code with the browser in a very coherent way and under 6 actions:
  1. New - routes to a new HTML for creation of product in database.
  2. Create - creates a new product.
  3. Show - routes to a new HTML for product info.
  4. Edit - routes to a new HTML for editing product info.
  5. Update - updates specific product info.
  6. Destroy - destroys specific product from database.
Note that these are in-built routes on Ruby on Rails. For Pylot we want to implement similar features because it will make the most sense in terms of code and file structure. The assignment for today is implementing these routes via a product catalog where the database reflects the products, and there are options to look at product info, edit then update the product, delete the product or add a new product.

It was a pretty fun assignment and wasn't too hard (even though I said I struggled with routes in the beginning). What I learned about setting up each project is to just take each thing step by step and make sure that the routes work before trying to do anything else. It sucks to write so much back-end code only to not see what is actually going on because you can't even go to the page. 

Note: It's announced that next Monday will be our Red Belt Exam! Thus tomorrow is just a full prep day.


No comments:

Post a Comment