!HAML?

40 views
Skip to first unread message

grimen

unread,
May 30, 2009, 11:09:45 PM5/30/09
to Spree
Hi, I must say Spree really looks promising - will probably use it for
an upcoming project. Great work. Two things though...

* Not because it's a serious issue, but I notice Spree views are
implemented using ERB...uhm, *why*? Just curious because HAML views
are much much easier to maintain (not subjective opinion after
converting plenty of people =D) - usually ends up 1/3 as much code and
easier on the eyes - and according to some benchmarks actually faster.
You aready use SASS I noticed (great move!) so...

* I noticed in the blog that Spree should now use Compass + Blueprint
CSS framwork, but I noticed the views contains YUI-classes such as
"yui-u", "yui-g", etc...did I miss something? =)

Anyway, gotta look into Spree more soon. Cheers.

grimen

Sean Schofield

unread,
Jun 1, 2009, 8:33:12 PM6/1/09
to spree...@googlegroups.com
We're still deciding on whether or not to support HAML views.
Ultimately we'd like to go with just one or the other (either ERB or
HAML) and right now I think the majority of the core team is probably
more comfortable with ERB then HAML. We're still considering it
though and no final decision has been made.

The good news is that regardless of what template tech you prefer, its
easy enough to provide your own HAML views in your site extension.

I believe the YUI stuff was a byproduct of the YUI tree which we are
in the process of phasing out. Its also possible that the classes
were borrowed for another purpose. I wasn't too involved in the
recent CSS changes on the admin side. Maybe David North could answer
that one for us.

Sean

weepy

unread,
Jun 2, 2009, 3:31:26 AM6/2/09
to Spree
there's a haml to erb converter I think - so perhaps it should be easy
to write a rake rask to convert ?

weepy

unread,
Jun 2, 2009, 3:31:45 AM6/2/09
to Spree
- meant erb to haml - but there may be both

On 2 June, 01:33, Sean Schofield <sean.schofi...@gmail.com> wrote:

Hai Nguyen

unread,
Jun 2, 2009, 3:48:35 AM6/2/09
to spree...@googlegroups.com
1 vote for .html.erb

IMO, haml is ugly... very hard to maintain in general. Just think of the time you hire some html programmers/designers to maintain your site, HAML is definitely a torture, which will be very unproductive.

Cheers,
Dinh Hai.

weepy

unread,
Jun 2, 2009, 5:22:55 AM6/2/09
to Spree
I'm a major HAML fan, but I don't think it makes sense to use it for a
project like this as it raises the entry barrier.

As mentioned above - perhaps a possiblity is providing a simple rake
task that will convert the erb to haml like this :
http://shifteleven.com/articles/2008/06/08/converting-erb-to-haml-snippet

On Jun 2, 8:48 am, Hai Nguyen <nguyendinh...@gmail.com> wrote:
> 1 vote for *.html.erb*
>
> IMO, *haml* is ugly... very hard to maintain in general. Just think of the
> time you hire some html programmers/designers to maintain your site,
> *HAML*is definitely a torture, which will be very unproductive.
>
> Cheers,
> Dinh Hai.

Redd Vinylene

unread,
Jun 2, 2009, 9:11:37 AM6/2/09
to spree...@googlegroups.com
On Tue, Jun 2, 2009 at 9:48 AM, Hai Nguyen <nguyen...@gmail.com> wrote:
1 vote for .html.erb

IMO, haml is ugly... very hard to maintain in general. Just think of the time you hire some html programmers/designers to maintain your site, HAML is definitely a torture, which will be very unproductive.

Cheers,
Dinh Hai.

I second that. It is what it is.

--
http://www.home.no/reddvinylene

Redd Vinylene

unread,
Jun 2, 2009, 9:12:25 AM6/2/09
to spree...@googlegroups.com
On Tue, Jun 2, 2009 at 9:31 AM, weepy <jona...@gmail.com> wrote:

there's a haml to erb converter I think - so perhaps it should be easy
to write a rake rask to convert ?

Perhaps. But it's far from flawless though.

--
http://www.home.no/reddvinylene

Ethan Rowe

unread,
Jun 2, 2009, 11:44:51 AM6/2/09
to spree...@googlegroups.com
Sean Schofield wrote:
> We're still deciding on whether or not to support HAML views.
> Ultimately we'd like to go with just one or the other (either ERB or
> HAML) and right now I think the majority of the core team is probably
> more comfortable with ERB then HAML. We're still considering it
> though and no final decision has been made.
>
> The good news is that regardless of what template tech you prefer, its
> easy enough to provide your own HAML views in your site extension.

I would just note that:
* Whichever may be preferable, it doesn't seem that ERB is actively
broken or even problematic. Consequently, assuming that resources
available for improving and extending Spree are finite, this doesn't
seem like the highest value thing to pursue. Unless somebody really,
really wants to do it and puts in the time. :)
* It seems to me that the flexibility of choosing your template types in
one's own work would be good enough for the time being.

Just my opinion, however little it's worth. :)

--
Ethan Rowe
End Point Corporation
et...@endpoint.com

grimen

unread,
Jun 3, 2009, 10:01:03 AM6/3/09
to Spree
I can't agree less. We producing views like theyalready existed.

grimen

On Jun 2, 9:48 am, Hai Nguyen <nguyendinh...@gmail.com> wrote:
> 1 vote for *.html.erb*
>
> IMO, *haml* is ugly... very hard to maintain in general. Just think of the
> time you hire some html programmers/designers to maintain your site,
> *HAML*is definitely a torture, which will be very unproductive.

grimen

unread,
Jun 3, 2009, 10:10:03 AM6/3/09
to Spree
On the first one...would you consider PHP broken? I do, and so ERB for
similar reasons.

It seems I'm alone on this in here, so I'll just drop the discussion
here and use the converers for sure, but with the notice that I've
been studying a lot of cognitive psychology and with that fact I can
tell that if you spent as much time on HAML as you did with ERB your
view implementation/maintaining time would be reduced to a fraction.
The brain is very good seeing patterns, but gets worse with a lot of
fuzz around - attention is the key.

grimen

David

unread,
Jun 4, 2009, 10:11:44 AM6/4/09
to Spree
The reason for the yui stuff in the backend is that I used yui grids
for some of the layout. Yui is nice for fluid layouts, Blueprint grids
suit the front end better since people typically want fixed with
designs with precise pixel dimensions.

From my point of view, a reason not to use HAML was that I find it
really annoys designers who have to work on Rails sites, but some
people have found the opposite. At least with Sass you can just opt
out and used the compiled CSS as a starting point.

David

m...@melvinram.com

unread,
Jun 7, 2009, 7:50:13 PM6/7/09
to Spree
ERB is ugly and Haml is just nicer to use. Here's why:
http://railsnotes.com/395-response-to-thoughts-on-haml

With that said, it's probably better to keep Spree ERB based as some
people don't want to learn new things unless they think it's worth it.
Most who don't get haml, see it as an unnecessary learning task. Even
though I disagree, I can see where they are coming from.
Reply all
Reply to author
Forward
0 new messages