On Mar 28, 2011, at 1:53 PM, jzakiya wrote:
> I was particularly wondering has there been much work/effort/desire to
> make
> DRML have a structure more like HAML, i.e., have a simplified,
> minimized, syntax.
>
> See these threads.
>
> http://groups.google.com/group/hobousers/browse_thread/thread/d2ac8117ce74b0d/104ee58414db3eb5?lnk=gst&q=HAML#104ee58414db3eb5
I haven't heard about much effort on this, as it would be a top-to-bottom
rewrite of the DRYML parser; I'm also not convinced that it would actually
help. Note that even in the example:
show-page
collection-section:
h3 <Your/> Assigned Tasks
repeat with="&@user.tasks.group_by(&:story)"
h4 Story: <a with="&this_key"/>
<collection/>
there are still XML-flavored brackets mixed in. I think new users would find it
even *more* confusing to have a third style (ERB, XML-self-closing, and
HAML-DRYML) to have to deal with, and it would make stepwise refinement
trickier. For instance, a common pattern in building views is to start with the
defaults:
<index-page>
<collection: replace>
<table-plus fields="foo,bar,baz />
</collection:
</index-page>
and then add some additional parameter tweaks to the tags:
<index-page>
<collection: replace>
<table-plus fields="foo,bar,baz">
<controls:>
mumble mumble mumble
</controls:>
</table-plus>
</collection:>
</index-page>
In the style of the first example, this would change formatting from an XML tag
to a HAML-style indentation block.
Finally, I find that the fact that valid XHTML markup is essentially valid
DRYML to be really handy when working with designers; I can build a prototype
app to get the user flow figured out, then take a static HTML mockup of the
final page layout and pull it into a definition for <page>, then add in param
tags and DRYML nav a piece at a time.
--Matt Jones
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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/hobousers?hl=en.