![]() |
1.818.524.2500
It's easy to think, given how much of our work requires interaction with it, that we as programmers exist to shepard HTML. After all, while there are many other options out there, HTML and some pemutation of JavaScript and CSS make up the vastest majority of user interfaces for applications. After all, most applications have a user (or more), and how does that user interface with the application? Through the user interface.
If you're looking for a solid, efficient engine with which you can build applications (and generate HTML), you might try Python for your next project. Python features a large array of web frameworks (like Django, Turbogears, etc). If you want a powerful markup generation engine, but don't want to switch to a full-stack framework, you might try embedding a markup / templating engine. In the Java space, we have many options including FreeMarker, and Velocity.
While these options are mature, they may not have what you're looking for. If you're looking for options, it might be beneficial to embed Jython - a port of the easy-to-use Python-language that runs on the JVM - and then use one of the numerous options discussed on this listing of Python templating engines.
Template engines are useful not just for output, but because they surface a very simple syntax in which input content may be encoded. This content is readily translated into HTML, which can then be re-displayed on pages in your application (assuming you've taken proper cross-site-scripting prevention measures). Thus, these engines solve two problems: output and input.
In the Python community, we like to say that Python comes with "batteries included," and hopefully the two aforementioned listings speak to why.
Post new comment