News for hackers. Stuff that matters.
Re:Five languages in seven lines, or how not to do web devel... by psadauskas on Monday February 23, 2009 @08:40PM (#492516)
So in Rails best-practices, you'd still have 3 "languages", they'd just be spread around in 3 files.

I'm a Haml fan, so I'd have a view template like:

  = paginate(@employees)

  %ul
    - @employees.each do |employee|
      %li
        = employee.first_name
        = employee.last_name
and then a helper to fill out the "paginate", or some plugin to handle it for me, and finally an unobtrusive js file.

So I get 3 languages. The only real WTF I see here is the "onClick", and for an example in some documentation about a framework, its forgivable. Could also be broken up into separate files, because the pagination part is a bit complex for a view. Again, though, its a documentation example, on the paginator helper, no less.

There are no comments on this comment yet.