Live data from Hacker News

Five languages in seven lines, or how not to do web development

docs.google.com

1–10 of 23 posts

Re: Five languages in seven lines, or how not to do web development

#2
Truth be told, it's not too bad considering all it does. Each language is being used for its strengths.

Programming at that level requires HTML and Javascript. Python is integrated as part of Mako; calling them separate languages is valid but questionable. (Given that the author is maximizing the number of languages, I'm a little surprised jQuery wasn't included in the list.)

Re: Five languages in seven lines, or how not to do web development

#3
post #2

Truth be told, it's not too bad considering all it does. Each language is being used for its strengths. Programming at that level requires HTML and Javascript. Python is integrated as part of Mako; calling them separate languages is valid but questionable. (Given that the author is maximizing the number of languages, I'm a little surprised jQuery wasn't included in the list.)

Yeah I don't see the beef either - what is the counterpoint "ideal" way of doing it?

One language? Because you'd have to select HTML by default... And I'm guessing that might not make for the best user experience.

Also surprised they didn't include (implied) CSS.

Re: Five languages in seven lines, or how not to do web development

#4
post #2

Truth be told, it's not too bad considering all it does. Each language is being used for its strengths. Programming at that level requires HTML and Javascript. Python is integrated as part of Mako; calling them separate languages is valid but questionable. (Given that the author is maximizing the number of languages, I'm a little surprised jQuery wasn't included in the list.)

Yeah I don't see the beef either - what is the counterpoint "ideal" way of doing it? One language? Because you'd have to select HTML by default... And I'm guessing that might not make for the best user experience. Also surprised they didn't include (implied) CSS.

I think you need to at least move the JS out and write it unobtrusively. Sticking 'onClicks' all over the place inside a templating language is a recipe for spaghetti.

Re: Five languages in seven lines, or how not to do web development

#7
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.

Post reply on HN