It doesn’t take a rocket scientist to create a better (relational) file format for JavaScript than XML
Douglas Crockford (Inventor of JSON)
EO - Elastic Objects
Elastic Objects give JSON messages a type to instantiate typed Objects on the server side in any place of an arbitrary object tree.
A special object type - the
With a typed JSON it's possible to build web services with one generic endpoint similar to GraphQL. New calls in java just need an entry in the model configurations. And for the configured calls a new resource just needs an entry in file configurations or sql configurations.
A client could send (typed) data and calls in any combination. The following working examples using html forms should show what's possible.
Simple Calls
SinusValueCall
File Calls
To allow access to files on the server side there are the file configurations with role permissions and the file location.
Read a Flat File
The content of the file will set to the ≡targetPath "xyz".
Accessing An Excel File
The resulting list of maps is set to ≡targetPath "values".
Combining Data Request and Rendering
There is a template call which can be combined with a data call:
Render a List in a Table
Template Endpoint
Templates contains marked typed JSON to offer functionality in any kind of text.
myString | myInt | myBoolean |
---|---|---|
value1 | 1 | true |
value2 | 2 | false |
value3 | 3 | false |
This table is created by embedded calls in a short form:
Essentially these calls are the same as the following:
Csv, Excel and DB Together
All implemented list read calls are integrated in that editable template:
-
-
-
DbSqlConfig.json to "data/db"
Intention
Current concepts for computer communication using typed RPC pattern, if it's SOAP, REST or GraphQL.
As a result one need a lot of similar framework specific code for configuration and/or classes . Coding in such a procedural pattern is the boring part of being a programmer.
The original intention was to generate these boring parts by templates and
some structured information.
The
These templates using the same typed JSON for the active parts.
Conclusion
As a microservice architecture EO with version 0.8 is a nice "Proof of Concept" in Java: With a simple tiny type JSON extension one could build services with a more object oriented approach.
The potential possibilities with bulletproofed database access or implementations in other programming languages are huge and far beyond a single person can realize.
So any ideas to bring it to a broader base are welcome.
Meanwhile focus will be the usage as a toolbox for the manipulation Java Objects and generation of code.