

A Haml-inspired mini-language for jQuery: Jabs - collint
http://github.com/collin/jabs

======
tdavis
I've yet to find a considerable value-add in Haml. With Sass the value is
pretty clear -- CSS can benefit from having variables and functions to make
scripts more reusable and easier to manage. As a Python user I'm a lover of
significant whitespace, but with the ability to have my text editor auto-
complete tags it isn't worth it to learn a new DSL just to save on some
brackets.

With Jabs it's even harder for me to see the value; I'm required to learn a
new syntax in order to remove some braces and add implied variables. The $
selector for instance removes all of four characters, two of which could be
added automatically, if that's your thing. jQuery itself is already a rather
terse library and with Jabs I'm adding yet another layer of abstraction and
the need for compilation to writing JS.

The code is also harder to parse (for me) as a result of all the implicit
variables. I suppose that isn't of much concern if you're just using it to
write your own JS and nobody ever has to look at it, though. The ability (and
probably frequent need) to mix JS and Jabs only creates a larger mess, I would
imagine.

~~~
bradgessler
Its not just saving on brackets; you get a few other benefits like not
worrying about closing or improperly nesting tags. It also slightly changes
your mindset from, "I'm just cranking out markup," to, "I'm building out a DOM
tree," which turns out to be great thing for Javascript development.

ERB/"classic" markup still have their place though. HAML is a real pain if you
need to crank out a web page that's heavy with content. I use both ERB and
HAML in most of my Rails projects; HAML for the more
"application/javascript"-heavy parts of my apps and ERB for the content-heavy
pages.

At a glance, I don't see the value in jabs. While it might make code more
compact, it doesn't seem to be as clear to worth with as HAML & SaSS. Trading
clarity for compactness is a trade-off I reject.

------
crayz
And ruby's manifest destiny continues

Your current language is too ugly or verbose? There's a ruby DSL for that

~~~
bradgessler
I've found that smaller, more expressive DSL's drastically improve
productivity over time. HAML, SaSS, and Compass have saved me an insane amount
of time. I'll keep using these types DSL's for as long as they keep making me
more productive.

------
collint
I just recorded a screencast showing a quick example coding session for Jabs
<http://www.youtube.com/watch?v=JdnXJ6bj_qs>

~~~
collint
Added a second video, showing a more advanced example with drag and drop.

oops: <http://www.youtube.com/watch?v=NntBOWEaAlU>

------
csmeder
Nice work!

