Web Development with Jade

Knowing Jade makes life simpler and more productive for web developers, and this book will teach you the language concisely and thoroughly using lots of practical examples and best practices for a solid grounding.
Preview in Mapt

Web Development with Jade

Sean Lang

1 customer reviews
Knowing Jade makes life simpler and more productive for web developers, and this book will teach you the language concisely and thoroughly using lots of practical examples and best practices for a solid grounding.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.50
RRP $14.99
Save 29%
Print + eBook
$24.99
RRP $24.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.50
$24.99
$29.99p/m after trial
RRP $14.99
RRP $24.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Web Development with Jade Book Cover
Web Development with Jade
$ 14.99
$ 10.50
Seam 2 Web Development: LITE Book Cover
Seam 2 Web Development: LITE
$ 9.99
$ 7.00
Buy 2 for $17.50
Save $7.48
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781783286355
Paperback80 pages

Book Description

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.

Table of Contents

Chapter 1: What is Jade?
Markup like poetry
Compiling Jade
Summary
Chapter 2: Basic Syntax
Significance of whitespace
Tags
Inline HTML
Attributes
Shorthands
Comments
Block expansion
Doctypes
Summary
Chapter 3: Feeding Data into Templates
Syntax
Defining variables
Interpolation everywhere!
Using variables without interpolation
Escaping
Sending the variables to the compiler
Summary
Chapter 4: Logic in Templates
Adding logic with JavaScript
Built-in logical operators
A warning about interpolation
Summary
Chapter 5: Filters
The full list
Examples
Passing arguments
Summary
Chapter 6: Mixins
Syntax and mechanics
Another warning about interpolation
The arguments object
Summary
Chapter 7: Template Inheritance
Blocks
Extends
Includes
Summary
Chapter 8: Organizing Jade Projects
General best practices
Summary

What You Will Learn

  • 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

Authors

Table of Contents

Chapter 1: What is Jade?
Markup like poetry
Compiling Jade
Summary
Chapter 2: Basic Syntax
Significance of whitespace
Tags
Inline HTML
Attributes
Shorthands
Comments
Block expansion
Doctypes
Summary
Chapter 3: Feeding Data into Templates
Syntax
Defining variables
Interpolation everywhere!
Using variables without interpolation
Escaping
Sending the variables to the compiler
Summary
Chapter 4: Logic in Templates
Adding logic with JavaScript
Built-in logical operators
A warning about interpolation
Summary
Chapter 5: Filters
The full list
Examples
Passing arguments
Summary
Chapter 6: Mixins
Syntax and mechanics
Another warning about interpolation
The arguments object
Summary
Chapter 7: Template Inheritance
Blocks
Extends
Includes
Summary
Chapter 8: Organizing Jade Projects
General best practices
Summary

Book Details

ISBN 139781783286355
Paperback80 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80
Object-Oriented JavaScript - Second Edition Book Cover
Object-Oriented JavaScript - Second Edition
$ 29.99
$ 21.00
AngularJS Web Application Development Blueprints Book Cover
AngularJS Web Application Development Blueprints
$ 29.99
$ 21.00
MEAN Web Development Book Cover
MEAN Web Development
$ 29.99
$ 3.00
Mastering Node.js Book Cover
Mastering Node.js
$ 29.99
$ 6.00