# Confused over best for views - RHTML, RJS, HAML, AS or MV?

**URL:** <https://www.ruby-forum.com/t/confused-over-best-for-views-rhtml-rjs-haml-as-or-mv/85744>\
**Category:** Rails\
**Created:** [February 16, 2007, 12:13am UTC](https://www.ruby-forum.com/t/confused-over-best-for-views-rhtml-rjs-haml-as-or-mv/85744 "2007-02-16T00:13:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yitzhakbg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e274bd/32.png) [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Post date:** [February 16, 2007, 12:13am UTC](https://www.ruby-forum.com/t/confused-over-best-for-views-rhtml-rjs-haml-as-or-mv/85744/1 "2007-02-16T00:13:27Z")

</div>

Could someone please help make a clear recommendation?  
What would be the preferable method of developing Rails views?  
Uset to be RHTML. Now we’ve got RJS, HAML, AjaxScaffold, MasterView  
and that might not be the whole list.  
We’re getting into Rails and would like to concentrate on the best  
method for generating and maintaining views.  
Thanks,  
Yitzhak

---

<div class="post-metadata">

**Author:** ![yitzhakbg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e274bd/32.png) [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Post date:** [February 16, 2007, 12:29am UTC](https://www.ruby-forum.com/t/confused-over-best-for-views-rhtml-rjs-haml-as-or-mv/85744/2 "2007-02-16T00:29:28Z")

</div>

> What would be the preferable method of developing Rails views?

it depends on what you want to do.

rhtml renders html. rjs renders javascript, etc. etc. You should use  
the tool that fits the job. But take the time to learn about what  
tools are available to you.

hth

---

<div class="post-metadata">

**Author:** ![yitzhakbg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e274bd/32.png) [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Post date:** [February 16, 2007, 12:37am UTC](https://www.ruby-forum.com/t/confused-over-best-for-views-rhtml-rjs-haml-as-or-mv/85744/3 "2007-02-16T00:37:28Z")

</div>

“You should use the tool that fits the job.”  
Yes, but what are the recommendations as to what the best tool is. I  
want Javascript, but there’s RJS, AjaxScaffold, MasterView and Haml.  
Any recommendations?

---

<div class="post-metadata">

**Author:** ![yitzhakbg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e274bd/32.png) [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Post date:** [February 16, 2007, 2:58am UTC](https://www.ruby-forum.com/t/confused-over-best-for-views-rhtml-rjs-haml-as-or-mv/85744/4 "2007-02-16T02:58:40Z")

</div>

On Feb 16, 10:36 am, “yitzhakbg” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> “You should use the tool that fits the job.”  
> Yes, but what are the recommendations as to what the best tool is. I  
> want Javascript, but there’s RJS, AjaxScaffold, MasterView and Haml.  
> Any recommendations?

It’s not a question that can easily be answered. What makes sense to  
one person may seem uncomfortable and weird to another.

HAML is a good example. Once you get what all the symbols mean (and  
they have done a good job of keeping the distance between the HAML and  
HTML/CSS code short) it makes sense. To others the syntax is too far  
from RHTML, the learning curve to too steep, they don’t have time, see  
the advantage or just don’t want to switch brain-modes between ruby  
and haml all the time.

For me, RHTML allows me to stay in “ruby mode” and code the views.  
This suits by PHP background as it mixes \<%%\> tags with HTML (without  
all the logic, of course). The downside is I still need to ensure all  
the tags are closed, etc. I see HAML as the next step for me, and  
SASS will wake me from my CSS nightmare.

In the end, choose what feels right for you.

---

<div class="post-metadata">

**Author:** ![yitzhakbg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e274bd/32.png) [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Post date:** [February 16, 2007, 5:53am UTC](https://www.ruby-forum.com/t/confused-over-best-for-views-rhtml-rjs-haml-as-or-mv/85744/5 "2007-02-16T05:53:50Z")

</div>

On 2/15/07, askegg [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> one person may seem uncomfortable and weird to another.  
> all the logic, of course). The downside is I still need to ensure all  
> the tags are closed, etc. I see HAML as the next step for me, and  
> SASS will wake me from my CSS nightmare.
> 
> In the end, choose what feels right for you.

I have to agree with Andrew and Toby, each has its advantages, so it  
really  
depends on what you are looking for in a feature set and how you prefer  
to  
work. Learn about each one and try a few of them out and see what feels  
best  
to you.

For me, I created the MasterView project because I wanted a WYSIWYG  
editing  
capability but didn’t want to give up any of the power of ERB, layouts,  
and  
partials. If that is one of your needs then you might want to check it  
out.  
I’d be happy to answer any questions you have about it.

In the end though, it’s really what fits right for your style and needs.

Blessings,

Jeff

---

<div class="post-metadata">

**Author:** ![yitzhakbg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e274bd/32.png) [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Post date:** [February 17, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/confused-over-best-for-views-rhtml-rjs-haml-as-or-mv/85744/6 "2007-02-17T16:22:39Z")

</div>

My three cents… Coming from a more HTML/CSS based background I found  
Haml  
to be a better fit. I understand the allure of the more Ruby templating  
systems but for me since the end result is going to be HTML, it makes  
more  
sense to use something more oriented around it. Plus it’s hella sexy.  
But  
the point that I think we’re all making is that there’s no one right  
choice.  
If you’ve never used _any_ of the choices perhaps it’s best though to  
give  
the default ERb/RHTML a try. Since most of the documentation everywhere  
assumes you’ll be using that. Then, once you’re more comfortable, you  
might  
try some other ones. Might I suggest the lean and lovely Haml??

RSL
