Instant Haml [Instant]

This title is available as an eBook only
Instant Haml [Instant]
eBook: $14.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print & eBook also available on:
Learn in an Instant - Short, Fast, Focused
Table of Contents
Sample Chapters
  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results
  • Step-by-step instructions that will help you integrate Haml into your current application setup and development workflow
  • Learn how to speed up development of view templates
  • Understand Haml options, configuration and Rails-specific features

Book Details

Language : English
eBook : 52 pages
Release Date : September 2013
ISBN : 1783283777
ISBN 13 : 9781783283774
Author(s) : Krzysztof Niksiński
Topics and Technologies : All Books, Instant, Open Source

Table of Contents

Instant Haml
  • Instant Haml
    • So, what is Haml?
    • Installation
      • Step 1 – what do I need?
      • Step 2 – downloading and installing Haml
      • Step 3 – converting an Haml file to an HTML file using the command line Haml utility to verify that it works
        • OSX/Linux
        • Windows
      • And that's it
    • Quick start – using Haml
      • Step 1 – integrating with Rails and creating a simple view file
      • Step 2 – switching Rails application to use Haml as the templating engine
      • Step 3 – converting existing view templates to Haml
      • Step 4 – using attributes
      • Step 5 – integrating Haml with your current programming editor
        • Sublime Text 2
        • TextMate
        • Vim
        • Rubymine
        • Emacs
        • Coda
      • Step 6 – Haml and Twitter Bootstrap framework
    • Top 6 features you'll want to know about
      • Using HTML tags and attributes
        • Creating basic tags
        • Inserting HTML attributes
        • Using Boolean attributes
        • Inserting HTML5 data attributes
        • Appending class and ID names
        • Self-closing tags
        • Using object references in class and ID names
      • Generating doctypes
      • Adding comments to the markup
        • Using HTML comments
        • Using Haml/Ruby comments
      • Evaluating Ruby code
        • Inserting Ruby code
        • Running Ruby code
        • Using Ruby interpolation
        • Escaping/unescaping
      • Using filters
        • Creating a custom filter
      • Creating multiline attributes, Ruby code, and strings
        • Attributes
        • Ruby code
        • Strings
      • Using helpers and the ActionView extensions
      • Changing Haml options
      • Using HAML outside of Rails
        • The tools for standalone HAML development
        • Streamline static site development with Middleman
    • People and places you should get to know
      • Official sites
      • Articles and tutorials
      • Community
      • Twitter
      • About Packt Publishing
      • Writing for Packt

Krzysztof Niksiński

Krzysztof Niksiński is a Ruby On Rails developer from Warsaw, Poland. He has been a Ruby On Rails freelancer since 2003 and regrets that he started using HAML only four years ago in his projects, because it would have saved his lot of time and efforts. He loves to create web applications, which use multiple technologies in synergy, as well as configure all the underlying layers of the application servers, databases, and operating systems. Playing with all the systems that make Internet work is his daily bread and butter. He grew up in Warsaw, where he attended the Warsaw University of Technology. Later, he started to work as an Internet Systems administrator in a bank, where he learned all the details of Internet services and protocols. He later fell in love with Ruby and started his own Ruby On Rails development company. At the time of this writing he also works as a Middleware Infrastructure Administrator for Acxiom, a marketing technology and services company. Krzysztof spends his free time creating electronic music, playing basketball with his friends, or training his dog, Goofy.
Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sorry, there are currently no downloads available for this title.

Frequently bought together

Instant Haml [Instant] +    Oracle Fusion Applications Administration Essentials =
50% Off
the second eBook
Price for both: $25.35

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Download and install Haml
  • Integrate Haml with your Rails application
  • Convert all existing view templates automatically
  • Add Haml to your development editor
  • Use Haml with Twitter Bootstrap Framework

In Detail

Haml is a markup language used to rapidly develop Rails view templates (or HTML pages). It is used by professional developers and praised for its cleanliness, human friendliness and usage agility. It functions as a replacement for inline page templating systems such as PHP, ASP, and ERB - the templating language used in most Ruby on Rails applications. Haml is itself a description of HTML and hence it avoids the need for explicitly coding HTML into the template with some code to generate dynamic content.

A practical guide which shows you a number of examples of Haml usage and then lets you dive into more advanced features to help you take full advantage of rapid development of view templates in your Rails applications. This book will show you how you can use Haml to create beautiful, easily maintainable and concise view templates without the hassle of writing in HTML.

Starting by showing you how to install Haml and how to integrate it into your Rails application, this practical guide will then teach you how to create the elements of a view template. This book will introduce you to the important features of Haml, show you how to integrate Haml with your development editor, and how to make it work with the Twitter Bootstrap framework.

This book will also show you how to convert existing view templates. With this book, you will be able to integrate Haml into your current application setup and development workflow.


Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. A fast-paced, example-based guide to teach you how to integrate Haml into your Rails application.

Who this book is for

If you are a developer who would like to speed up and simplify your view template creation, this book is ideal for you. A basic working knowledge of HTML and CSS, as well as some Ruby on Rails experience is recommended.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software