This chapter covers
- Prototyping an application through building a static version
- Defining routes for application URLs
- Creating views in Express using Jade and Bootstrap
- Using controllers in Express to tie routes to views
- Passing data from controllers to views
In chapter 3 you should have had an Express application running, set up in an MVC way, with Bootstrap included to help with building page layouts. Our next step is to build on this base, creating a static site that you can click through. This is a critical step in putting together any site or application. Even if you’ve been given a design or some wireframes to work from, there’s no substitute for rapidly creating a realistic prototype that you can use in the browser. Something always comes to light in terms of layout or usability that hadn’t been noticed before. From this static prototype, we’ll take the data out from the views and put it into the controllers. By the end of this chapter we’ll have intelligent views that can display data passed to them, and controllers passing hard-coded data to the views.