3 ms·
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 gues
by jwilliams 18y ago
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.
- jdminhbg 18y agoI 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.
- swombat 18y agoSure, but the point is, to put together any decent web page template, you'll need at least: 1) Your server-side language (e.g. Ruby) 2) Your templating language (e.g. ERB, which may be very similar to 1) 3) HTML 4) CSS 5) Javascript 5 languages is pretty much a minimum unless you're doing something trivial. I'll agree that the onclick should be extracted, but as has been pointed out in other places, this is a quick documentation example, so it is reasonable to use onclick there to keep it brief. PS: Also, perhaps worth pointing out that HTML and CSS aren't actually programming languages... Should they count? probably not.
- scott_s 18y agoThey're still languages, so I think they should count, because it still takes a mental context switch when going from any language to another.
- axod 18y agoThe number of languages isn't the issue. The issue is putting them all together in the space of a few lines. It's bad organization.
- jwilliams 18y agoActually just curious - but what is a means of separating them?