Coder Social home page Coder Social logo

genesys's Introduction

Genesys

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.

Initial Goal

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

Software stack

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

Later steps

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

Related project

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.

Project status

Initial stages, fully expecting to fail fast

Quickstart

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).

genesys's People

Contributors

smr547 avatar

Watchers

 avatar  avatar

genesys's Issues

Implement identifiers

Implement identifiers as specified Executable UML (Mellor and Balcer)

  1. It should be possible to annotate a field (or fields) participating in an identifier with a I0, I1, I2... notation (the identifier number).
  2. An identifier comprises one or more object attributes
  3. Participation in an identifier requires attribute with mandatory values
  4. Identifier values are unique -- each identifier uniquely identify a single object instance

In the current implementation:

  • where each instance has a unique surrogate key called id implies id int {I0}
  • where instances of relationships are represent by instances of the minimal Association class,
Relationship R1:
    id int {I0}
    end0.id {I1}
    end1.id {I1}
  • If R1 is reflexive then one relationship instance has two unique identifiers: end0.id : end1.id and `end0.id : end1.id``

API support

  • Uniqueness validation on save() operation
  • FindById9() returns unique instance or None
  • SelectByPartialId(a, b, c...) returns (possibly empty) set

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.