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:
- New - routes to a new HTML for creation of product in database.
- Create - creates a new product.
- Show - routes to a new HTML for product info.
- Edit - routes to a new HTML for editing product info.
- Update - updates specific product info.
- Destroy - destroys specific product from database.
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