Menu

Sample architecture with HTMLSplicer

Sridhar Ramachandran

This is not a recommendation! Please use HTMLSplicer as you think is appropriate.

I am using the following technologies in conjunction with HTMLSplicer:

  1. Embedded Jetty as a servlet engine: This provides a servlet engine within a Java application. The web server can be started from an Eclipse IDE with a 1-2 seconds. I place the HTML templates under src/main/resources/ (Maven project structure). The templates are loaded using getClass().getResourceAsStream() from the application JAR.

  2. Validator.nu for HTML parsing: This is a great HTML parser and is fully org.w3c.dom compliant. The parser also takes care of fixing bad HTML syntax. As a precaution, I use http://validator.nu/ to validate the HTML templates themselves.

  3. RMI Websocket for post page-load communication: This is an alternative to XMLHttpRequest that allows the Javascript to make remote method calls using web sockets to a Java class on the server, and vice-versa.

  4. jquery UI: Javascript/CSS library to build an interactive HTML-based user interface.

  5. nginx: This is configured to serve static images, css and Javascript files on a different URL. To avoid restarts/copies on changes, my local setup accesses the Eclipse project folder with supporting Javascript and CSS documents. The base URI passed to getDocument() points to the root nginx URL.


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.