First off, I just wanted to say Kudos to Hampton Catlin (and everyone
else involved) for creating HAML, it's the first templating language
that I've actually liked. Super easy to learn too, I'm in looove!




BUT...




I think it could be made better...How about this:

$component{ :localvar => @vartobind }



Some J**a-based templating systems use this idea (groovy/gsp, and jsf/
facelets/jsp) to compose templates out of partials, though they use
the xml namespacing method (i.e. <taglib:tag attr="value" />)

I think this is a great way to make templates more DRY, it allows
partials to be extracted, reused, and distributed as components, and
it discourages use of inline code in a template. A backing class could
be attached to a partial to aid in complex logic.

Some ideas:

$calendar{ :month => 'January' }

$datagrid{ :data => @my_hash, :sort_by => 'date', :order => 'asc' }


What do you all think?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to