A simple code generator for bespoke data models, web forms, and scientific workflows in Eclipse ICE
The primary goal of the Eclipse ICE project is to provide tooling for creating scientific workbenches and workflows. Developing these tools over the past decade has often involved a tedious, uninspiring rehashing of the same boilerplate Java code, the same project layouts, and the same opportunity to identify new ways to streamline our efforts. To put it another way: How much time better spent getting coffee is lost to re-implementing Object.equals() for ten years?
In our quest to continuously code ourselves out of a job, this talk presents a solution to this problem with a simple, highly opinionated, template-based, Java API for generating data models, web forms, and scientific workflows. It combines Lombok for basic boilerplate generation, Dagger 2 for dependency injection, Apache Velocity for template processing, Maven archetypes for project generation, and Vaadin with LitElement templates to generate whole projects with minimal input that meet all the requirements of the ICE platform using a few custom annotations from ICE itself.
Attendees will learn not only of the utility of this framework, but also what motivated its creation and what lessons were learned in its evolution from the original hard coding in ICE 2.0, to prototypes using RDF and Java generics, and finally ending with annotation processing. Fully deployed examples for a set of science projects will be demonstrated. Attendees will find it easier to follow the talk with an intermediate to advanced knowledge of Java, especially with respect to the annotation processing API. Attendees will learn how to use the new tools in Eclipse ICE to create their own workbenches and be provided with links to the talk content and tutorials. Finally, it is expected and hoped that attendees will leave inspired to use code generation for their own projects.
Speaker(s):
Jay Billings (Stellar Science Ltd. Co.)
Daniel Bluhm (Oak Ridge National Laboratory)