Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rails sopinoffs - Haml

318 views

Published on

A presentation about HAML - a short form of HTML

Published in: Technology, News & Politics
  • Be the first to comment

  • Be the first to like this

Rails sopinoffs - Haml

  1. 1. Rails Spinoffs - IKarthikeyan.ak@originlearning.com
  2. 2. David Heinemeier Hansson
  3. 3. Rails Motto● Developer Productivity● Agile● Have a lot of free time● Dont Strain● Dont Panic● Lead, dont follow
  4. 4. SpinoffsOpal Js
  5. 5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html><head><meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" /><?php if ($title) { ?><title><?php echo $title; ?></title><?php } else { ?><title><?php echo $pagename; ?></title><?php } ?></head><body><div id="header"><h1><?php echo $pagename; ?></h1><?php if ($slogan) { ?><span><?php echo $slogan; ?></span><?php } ?></div><div id="content"><table class="config list"><tr><th>ID</th><th>Name</th><th>Value</th></tr><?php foreach ($config as $c) { ?><tr class="<?php echo ($class = forClassName($c)); ?>"id="<?php echo "$class_{$c->ID}"; ?>"><td><?php echo $c->ID; ?></td><td><?php echo $c->name; ?></td><td><?php echo $c->value; ?></td></tr><?php } ?></table></div><div id="footer"><span class="author">Random Hacker</span></div></body></html>!!! 1.1%html%head%meta{ :http-equiv => Content-Type, :content => application/xhtml+xml;charset=utf-8 }- if ($title)%title= $title- else%title= $pagename%body#header%h1 Example page- if ($slogan)%span= $slogan#content%table.config.list%tr%th ID%th Name%th Value- foreach ($config as $c)%tr[$c]%td= $c->ID%td= $c->name%td= $c->value#footer%span.author Random Hacker
  6. 6. http://haml.info/http://phphaml.sourceforge.net/http://html2haml.heroku.com/
  7. 7. Dreamweavr IntegrationAs far as I know.No.
  8. 8. Dreamweavr IntegrationAs far as I know.No.
  9. 9. Enjoy Life!

×