Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

10. Pro HTML5 Application Hacks with Nod... > Hack 86. Use Jade Layouts to DRY Up ...

Hack 86. Use Jade Layouts to DRY Up Your Application’s Views

DRY (Don’t Repeat Yourself) is a common software design idiom. This hack will demonstrate this best practice in your views.

To manage our markup and CSS within our Express application, we will be using two fantastic tools: Jade and Stylus. Jade is a dynamic metalanguage that compiles to HTML. Stylus is a dynamic metalanguage that compiles to CSS. As with the other tools, we will not go into great detail, as this is not an API reference book.

Our reasoning for selecting these “shortcut” languages is simple. We want to ensure that our hacking environment remains organized and doesn’t become unwieldy. If you are already writing HTML and CSS, the learning curve for these technologies will not be steep. The time you will save in the long run will make their use worth the time and energy you will spend learning to use the tools.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint