Read my latest article: Was away on vacation (posted Sun, 11 May 2008 22:33:00 GMT)

Do Your Views in Ruby on Rails need a cleaning service? 6

Posted by Robby Russell Wed, 28 Mar 2007 02:55:00 GMT

I’ve been working on a project with Graeme, and we’re spending some time cleaning up some RHTML views.

He posted an article earlier, titled, Dirty Views? Clean them up!, where he asks the following.

“I am also looking for more information on best practices with views in Rails. There doesn’t seem to be much information on the subject.”

We’re starting to re-evaluate how we approach our views and are curious what other teams are doing… especially if you have a team thats approx 1/2 designers… 1/2 developers per project. We’ll be reviewing some of the other options for the View layer over the coming week(s) and welcome any suggestions/insight to this area of Rails… head over to Graeme’s blog and share your thoughts. :-)

Subscribe to my RSS feed Enjoying the content? Be sure to subscribe to my RSS feed.
Comments

Leave a response

  1. Avatar
    Jeremy McAnally Wed, 28 Mar 2007 03:13:28 GMT

    Tons of helpers. I find that anything a designer doesn’t need to see can live in a helper, so it’s still accessible to the developer, but out of sight and out of mind of the designers. That way instead of a butt load of code to show who’s logged in (or a message if they’re not) they can simply put something like <%= current_login %>. Much nicer for the designer, who already hates having to deal with loops and such.

  2. Avatar
    Randy Schmidt Wed, 28 Mar 2007 11:53:02 GMT

    Just a heads up, it looks like Graeme’s blog is down…with a MySQL error. And since I can see it’s a MySQL error…does that mean he is running it in DEVELOPMENT environment?

  3. Avatar
    Graeme Nelson Wed, 28 Mar 2007 16:01:07 GMT

    I am having issues with my server at Site5 right now. I will try and get the situation resolved – even if that means leaving them for a better hosting plan :)

  4. Avatar
    Nathan Thu, 29 Mar 2007 13:59:51 GMT

    ahh to live in a world where designers looked at HTML. Anyway, in our shop the design ends with a .psd. I’m always curious to see where the hand-offs occur for other shops. I used to go more helper/partial crazy but I find it harder to maintain, mostly just because I have a bad memory and I lack a good naming strategy for partials.

  5. Avatar
    David Thu, 12 Apr 2007 17:46:32 GMT

    I constantly beat myself up over coding practices. I’m always thinking there is a better way to do something and spend way too much time refactoring, thus distracting me from progressing a project.

    You have helped me realize though, that even expert developers like yourself are always looking for new practices and methods for refactoring.

    I guess this is an area all developers continue to evolve in.

  6. Avatar
    Nieruchomości Szczecin Wed, 26 Sep 2007 08:58:45 GMT

    An excellent post. Thanks for sharing your thoughts.

Share your thoughts... (really...I want to hear them)

Comments