-
Notifications
You must be signed in to change notification settings - Fork 6
Tilda Command Line Utilities: Gen
This utility is central to Tilda as it takes the JSON files that define your models and generate a variety of artifacts, including Java code for ORM functionality, JSON and CSV import and export code generation, SQL scripts, a Security layer, Migration scripts, as well as fully browsable and searchable documentation.
Central to Tilda is the promise to make complex data models Transparent throughout all their incarnations (SQL to Java to the Browser) and easy to Iteratively develop and evolve. Building a V1 application depending on a complex data model is often easy. To keep the model flexible, clean and easy to modify across multiple product versions over time and deploy is always a challenge. Gen's implementation addresses several common issues:
- Generated code (whether Java, SQL or JavaScript) is human readable and very consistent.
- Generated code is fully documented with JavaDoc
- Many data model concepts are implemented as direct compile time constructs (tables, views, columns, aggregates, identity, common queries, indices...) so changing something automatically translates into a compile-time change that can then easily be addressed through compiler warnings/errors across a large code base. This is different from many other frameworks that manage themselves through mostly runtime capabilities. For example, an index definition generates a LookupByXXX or LookupWhereXXX function, and so making any changes will cause all code locations referring to the index fail compilation. Similarly, making a field not-nullable changes the signature of the Create function etc...
- The model is augmented with enough meta-data even at the database level to allow for rich automated migration capabilities (see below).
- Fully browsable documentation is generated for the database implementation and is always kept in sync by design, including view specifications (e.g., dependencies, formulas, filters...)
Syntax
java_run tilda.Gen C:/Projects/OSS/Tilda/src/tilda/data/_tilda.Tilda.json ^
C:/Projects/Xyz/src/com/myco/toto/data/_tilda.Toto.json
Tilda development can be as simple as doing data and model management with nothing more than a JSON editor and the Java command line, or as complex as full blown Java development environment with an IDE such as Eclipse and using the command line utilities through the IDE's capabilities.