Facing new challenges everyday

ActiveRecord Rocks But I Can’t Say the Same About Rails Views

September 15th, 2008

ActiveRecord has proven to be a easy to learn and productive ORM solution, you can define your application model with few lines of code, the syntax is much more concise than any other ORM solution.

But, in other hand, rails doesn’t have a elegant way to work with views, with a lot of loops and conditional expressions in the middle of code, this kind of approach remembers me the PHP coding 8 years ago, where after several lines your code become very hard to understand an maintain.

What I really like to see on Rails is a custom tag solution like JSTL with an expression language, where we can use a syntax very close to HTML syntax to add some functionality to rails views and not language specific statements.

The partials feature found on ActionView module looks promissing and may give a way to provide a smooth integration between HTML and rails view code where the tag name could be the name of partial layout file and the tag attributes should provide the data to be passed to :locals hash used by the partial.

Post to Twitter

2 Comments »

  1. Fabio Kung says

    One of them might be of your interest:

    http://www.hokstad.com/mini-reviews-of-19-ruby-template-engines.html

    ;-)

    September 30th, 2008 | #

  2. rogerio says

    Radius seems very interesting.

    October 1st, 2008 | #

Leave a comment

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad:
Imagem CAPTCHA

RSS feed for these comments. | TrackBack URI

Visitors Around the World

Polls

How Is My Site?

View Results

Loading ... Loading ...

Categories

Meta

Links

hosted by easy2use.net