Code generate RESTful Hypertext-driven CRUD applications. This project was inspired by the book Hypermedia Systems by Gross, Stepinski and Aksimsekand their work on htmx and related technology.
Employ code generation techniques to build a simple Hypermedia-Driven-Application similiar to the Contacts Application demonstrated by the authors.
The initial application will use code generation techniques to develop components within a Model-View-Controller-Framework
- Model classes (simple Beans) code Generated from BeanSpecs
- View components (HTML hypertext) code Generate from BeanSpecs
- Controler components (server-based application code) also code-generated from BeanSpecs
It is hoped that this initial work will lead to the discovery of useful patterns to be applied in future, more ambitious code-generated applications
The initial application will use the Web Stack as described by the book authors:
- Python as the programming language.
- Flask as a web framework, allowing us to connect HTTP requests to Python logic.
- Jinja2 for our server-side templating language, allowing us to render HTML responses using a familiar and intuitive syntax.
It is hoped that other developers will join the effort and implement the code generation techniques using other Web Stacks while continuing to use a single, common set of Application Specification Artifacts
Future work will extend the code generation techniques to
- Enhance the user experience by employing htmx markup
- Step up to multi-entity models
A personal goal is to use the code generation techniques developed here to build the Boat Layout application as a rich and productive Hypermedia-Driven-Application
I have launched straight into this work as part of my retirement tinkering. At this point in time I have not conducted any researched to discover related projects that may be attempting the same goal. It's quite possible (indeed likely) that I may be re-inventing the wheel. Clearly this research needs to be done as soon as possible so we can utilise and build on the work of others or hang up our boots.
Initial stages, fully expecting to fail fast
To explore current capability
cd src
./generate_BoatLayout_app.py
flask routes
flask run
The output code is a Python Entitly Bean (if there are such things).