- Write routes to handle specific requests
- Render a view template with data derived from the URL (params)
- Passing data to ERB (Embedded Ruby templates) via instance variables
You are going to recreate the Pair Programming Bot from scratch using Sinatra. The pair programming 'bot' render a page where it asks the programmer a question relating to the development of his or her code. Each page will either have a 'YES/NO' option or a 'DONE' option, and each option will link to the appropriate page.
-
Draw a flow chart for the app's behavior before you code a word. Check out this flowchart example for flowchart inspiration.
-
You should use ERB templates to keep your code DRY. Ask yourself what types of pages you will need a template for?
-
For each of the templates that you use, think about what information you will need to pass in using instance variables.
-
Styling is secondary, so don't start styling until your app works.