Haml for Grails anyone?

43 views
Skip to first unread message

Jim Morris

unread,
Nov 12, 2009, 4:26:19 PM11/12/09
to Haml
Hi, I'm porting a Merb app to grails, and all my views are of course
in HAML. GSP sends shivers down my spine ;) Has anyone looked into a
version of HAML for Grails?

At a pinch I suspect I can modify haml2html and get = to generate the
tags, then compile the gsp pages from haml.

Anyone else any ideas?

Thanks

Chris Eppstein

unread,
Nov 12, 2009, 4:41:39 PM11/12/09
to ha...@googlegroups.com
A generic haml specification is being worked on here:

There's some discussion about such matters on the haml-dev mailing list.

chris


--

You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to ha...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=.



Nathan Weizenbaum

unread,
Nov 12, 2009, 8:17:17 PM11/12/09
to ha...@googlegroups.com
You might be able to do something by accessing the Ruby implementation via JRuby... that'd give you a weird mix of languages, though. As far as I know, there's no native Groovy implementation of Haml (yet).

Norman Clarke

unread,
Nov 12, 2009, 9:23:45 PM11/12/09
to ha...@googlegroups.com
I have a mostly complete implementation of Haml for Lua
(http://github.com/norman/lua-haml) which supports embedding and
rendering other languages, and it would probably be pretty
straightforward to add support for Groovy syntax. Since you can use
regular Java code inside Groovy, I imagine it wouldn't be too hard to
tie them together using LuaJava
(http://www.keplerproject.org/luajava/).

Lua was designed to be used as an embedded scripting language inside
other languages, and so that has guided the way I designed LuaHaml.
I'd be happy to try to help you make it work if you're interested.

--Norman

Jim Morris

unread,
Nov 13, 2009, 1:21:28 AM11/13/09
to Haml
Thanks Guys,

I'll take a look at the references, and let you know how I go about
it.

The ideas behind JSP/GSP are a little different (and UGLY), so I need
to get a little deeper into how Grails does its rendering, then I'll
see if using Haml dynamically to render istead of GSP, or use it
statically to compile equivalent GSP pages.

I did see a post somewhere that someone had tried a while back and
said they failed, but no reasons given to the roadblocks they hit.

Thanks

On Nov 12, 6:23 pm, Norman Clarke <com...@gmail.com> wrote:
> I have a mostly complete implementation of Haml for Lua
> (http://github.com/norman/lua-haml) which supports embedding and
> rendering other languages, and it would probably be pretty
> straightforward to add support for Groovy syntax. Since you can use
> regular Java code inside Groovy, I imagine it wouldn't be too hard to
> tie them together using LuaJava
> (http://www.keplerproject.org/luajava/).
>
> Lua was designed to be used as an embedded scripting language inside
> other languages, and so that has guided the way I designed LuaHaml.
> I'd be happy to try to help you make it work if you're interested.
>
> --Norman
>
> On Thu, Nov 12, 2009 at 10:17 PM, Nathan Weizenbaum <nex...@gmail.com> wrote:
> > You might be able to do something by accessing the Ruby implementation via
> > JRuby... that'd give you a weird mix of languages, though. As far as I know,
> > there's no native Groovy implementation of Haml (yet).
>
> > On Thu, Nov 12, 2009 at 1:41 PM, Chris Eppstein <ch...@eppsteins.net> wrote:
>
> >> A generic haml specification is being worked on here:
> >>http://github.com/norman/haml-spec
> >> There's some discussion about such matters on the haml-dev mailing list.
> >> chris
Reply all
Reply to author
Forward
0 new messages