Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should i change from erb to haml?

When i first started learning Rails, erb seemed very natural for me, because i've been using Smarty and other templates in the past, and even more, i've been heavily doing some wordpress template programming(where the whole thing looks like erb a lot).

Now, after some time, i happened to take a look at haml and by the first view, i feel quite impressed on the beauty and simplicity. I heard that, especially for older versions, haml is slower, but i feel that view rendering would not really be a problem.

So now, i'm seriously thinking of converting a quite big project that i do, from erb to haml. I'm always looking for ways to write better code.

But, what do you think ? Is it a good idea ?

like image 836
Spyros Avatar asked Dec 07 '22 23:12

Spyros


1 Answers

Haml is a great choice for starting a new project. But I don't see the value in converting an existing project from ERB to Haml, especially if you have a large number of templates that need rewriting. Don't fix what ain't broken.

like image 196
zetetic Avatar answered Dec 23 '22 21:12

zetetic