erddap icon indicating copy to clipboard operation
erddap copied to clipboard

Use JTE templating framework for rendering HTML

Open srstsavage opened this issue 7 months ago • 0 comments

Currently ERDDAP HTML is generated via manual string concatenation. Use of a templating engine to render HTML would simplify HTML maintenance/management, lower the learning curve for contributors to update UI HTML, provide a modern foundation for UI improvements, and potentially allow more UI customization options at deploy time.

JTE has been identified as an optimal template engine due to its active development and focus on performance via template precompilation.   @Harish-2003 will be working on this project this summer (2025) via GSoC!

Associated Google Summer of Code project: https://summerofcode.withgoogle.com/programs/2025/projects/WFMQYGxF

GSoC project description:

This project aims to modernize ERDDAP™ page rendering by migrating it to a templating framework. The current rendering process relies on manually constructed HTML, which makes it difficult to maintain and customize. By implementing a template-based system, we will improve code maintainability, enhance flexibility for customization, and support modern web development practices. Deliverables Identify a suitable templating framework (e.g., FreeMarker, Thymeleaf, or another appropriate choice). Refactor ERDDAP™’s HTML generation logic to use the selected template engine. Ensure the new system maintains full feature parity with existing pages. Improve documentation on how to modify and extend ERDDAP™ templates. Implement tests to verify rendering consistency. This upgrade will make ERDDAP™ more maintainable and adaptable for future development.

srstsavage avatar May 30 '25 17:05 srstsavage