1 / 20

Intro to HAML

Intro to HAML. By Me, Christopher Judge. Known as the H TML A bstraction M arkup L anguage. Which uses, “ functions as a replacement for inline page templating systems.”- haml-lang.com. What is a HAML ?.

finley
Download Presentation

Intro to HAML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Intro to HAML By Me, Christopher Judge

  2. Known as the HTML Abstraction Markup Language. Which uses, “functions as a replacement for inline page templatingsystems.”- haml-lang.com What is a HAML?

  3. “Writing HTML way faster and more efficientlyso you have more time to do fun stuff in your life.” - Me What is a HAML?

  4. HAML HTML What do you mean by faster?

  5. HTML elements are created using the percent sign (%) followed by the tag name. What do you mean by faster?

  6. ID’s and Classes are represented like CSS selectors and appended to the tags. What do you mean by faster?

  7. If there is no HTML tag defined then HAML will insert the div tag for you. What do you mean by faster?

  8. Markup Should be Beautiful • Markup Should be DRY • Markup Should be Well-Indented • HTML Structure Should be Clear Here Are 4 Great Reasons: Why else should I use HAML?

  9. Beautiful refers to the ability for humans to read your markup. What do you mean by beautiful? HAML outputs perfectly semantic and valid HTML

  10. D – Don’t R– Repeat Y– Yourself DRY? But I never get my markup wet. HAML eliminates the need for typing your tags twice.

  11. “Code should be indented to show tag parent/child relationships.” – Novatnak Doesn’t it all go on a single line? HAML’s logic relies on the indentation of parents and children.

  12. Nesting is controlled via indentation and white space. It relies on your indentation?

  13. Nested tags must be indented on a new line. It relies on your indentation?

  14. Due to HAML’s logic relying on indentation, your code will always have a clear and concise structure. Shouldn’t it naturally be clear?

  15. Because HAML is compiled using Ruby it can also use Ruby logic. Some other awesome stuff.

  16. Install Ruby: https://www.ruby-lang.org/en/installation/ How do I download HAML? Type this into the command line:

  17. Your HAML is compiled via the command line or another program (CodeKit for me) and then saved as HTML in an external file. It uses the Ruby language to compile it. How does it work?

  18. What is the meaning of DRY? • HAML’s logic depends on what? • What does HAML stand for? • What language is HAML compiled in? 4 Questions

  19. Don’t Repeat Yourself • Indentation • HTML abstraction markup language • Ruby 4 Answers

  20. http://www.sitepoint.com/an-introduction-to-haml/ http://www.cheatography.com/specialbrand/cheat-sheets/haml/ http://haml.info/ References

More Related