17 ms·
Answer to "why not just use code to generate HTML?": to facilitate communication between the programmer and the designer. If you work with designers who create
by jordanlev 18y ago
Answer to "why not just use code to generate HTML?": to facilitate communication between the programmer and the designer. If you work with designers who create the HTML for you, it is much easier for them to deal with back-and-forth tweaks and edits using a template. But if you are acting as both the programmer and the designer on a project, then yes it's possible that coding the HTML might be better.
- abstractbill 18y agos/possible/likely in my opinion.
- mightybyte 18y agoI discussed this issue at http://softwaresimply.blogspot.com/2008/03/to-template-or-not-to-template.html http://softwaresimply.blogspot.com/2008/03/to-template-or-no.... It seems like people tend to prefer templates, however I'm not yet convinced. I think there are good arguments for language-generated code, especially with a language that is powerful enough. HSP in Haskell provides some interesting possibilities here (http://www.cs.chalmers.se/~d00nibro/hsp/thesis.pdf http://www.cs.chalmers.se/~d00nibro/hsp/thesis.pdf). Text.XHtml is another Haskell library that does this (http://www.haskell.org/ghc/dist/current/docs/libraries/xhtml/Text-XHtml-Strict.html http://www.haskell.org/ghc/dist/current/docs/libraries/xhtml...).