Web Development with Jade

More Information
  • Write cleaner, indentation-based markup
  • Use logical statements to format data for display on the Web
  • Avoid repetition by eliminating redundant operations
  • Divide your templates into logical sections with blocks
  • Avoid common organizational pitfalls when designing Jade-based projects
  • Apply shorthand for brevity
  • Utilize Jade for client-side templates
  • Employ techniques like filters to quickly mock-up web pages in higher level languages like stylus or coffeescript

Jade is a template engine for node.js and the default rendering engine for the Express web framework. It is a new, simplified language that compiles into HTML and is extremely useful for web developers. Jade is designed primarily for server-side templating in node.js, but it can also be used in a variety of other environments to produce XML-like documents such as HTML and RSS.

This practical, example-oriented guide will teach you how to write Jade, utilize its features, and recognize the best ways to organize templates in your projects. With this book, you will avoid the common pitfalls and issues with sparse documentation, allowing you to learn Jade faster and use it more effectively.

To understand Jade, we will first examine the reasons for its design and how these translate into a tool that can provide real benefits to you. You will develop confidence with each of the features of the language with the help of practical examples and thorough explanations. We will cover preprocessors, basic syntax, feeding data into templates, and incorporating logic. By the end of this book, you will be able to effectively use essential features such as filters and mixins as well as template inheritance through a block system. To tie it all together, we will also look at some of the best practices to follow when organizing your Jade projects.

Use this comprehensive guide to the Jade language to help you become a more efficient web developer.

  • Make your templates clean, beautiful, and reusable
  • Use Jade best practices right from the start
  • Successfully automate redundant markup
Page Count 80
Course Length 2 hours 24 minutes
ISBN 9781783286355
Date Of Publication 26 Mar 2014


Sean Lang

Sean Lang attends the Milwaukee School of Engineering; he is currently majoring in software engineering. Even though he is a freshman there, he is by no means new to the field. He has been teaching himself software development for the last four years, and during this time, he has done extensive volunteer work for open source software projects. These include roots (a toolkit for building web apps), the Jade template engine, nib (a set of utilities for advanced web page styling), and a myriad of smaller projects. In addition to this, he has been doing freelance web designing and consulting, which is especially convenient because it gives him an opportunity to use the open source tools that he has been developing in production. He started writing this book about Jade to supplement the existing documentation and help teach people the language. Also, he had never written a full book before, so he was really interested and excited to know what being an author is like.