On human readability and data formats like YAML/RAML


#1

Hello RAMLites (is that a thing?)

I am the developer of HiveMind (www.crudzilla.com), it is a browser based web app platform.

One of the features of the platform is a smart object technology that solves the problem of dealing with structured information often represented in formats Like YAML,JSON, Java Properties,XML…etc

What all these data formats ultimately aim to represent is an object graph, ie a combination of name/value pairs with support for sequences and composition. The design decision often boils down to deciding on the right trade-off between human readability and machine readability (parsing).

The smart object technology introduced in HiveMind cuts through this concern by allowing developers/users to directly construct object graphs of any complexity. Once you have the actual object graph you can reverse the process back to representation in any one of the formats mentioned above.

I have setup a demo instance for trying it out at http://demo.crudzilla.com:7000/

Login with: developer/developer

Be nice, you have full system access :slight_smile:

Navigate to: /com/crudzilla/betaApp/web/aws/index.ins

This is what a smart object looks like, of course as you can see there is no human readability concern there as you work with a simple UI; the cool thing is that you can combine smart objects to compose any complex object graph and you use the file system to organize the smart objects.

Once you have your object graph you can serialize it to any suitable format as the included examples show:

http://demo.crudzilla.com:7000/betaApp/crud-appserver/aws/yaml/
http://demo.crudzilla.com:7000/betaApp/crud-appserver/aws/json/
http://demo.crudzilla.com:7000/betaApp/crud-appserver/aws/properties/
http://demo.crudzilla.com:7000/betaApp/crud-appserver/aws/xml/

This approach is quite powerful, for instance you can basically make this your IDE for RAML and the YAML serializer would walk the resulting object graph and dump YAML representation.

Beyond its use for configuration, it can be used to allow non-technical users to handler certain data management tasks where a developer need not be involved. For instance let’s say you’re working on an e-commerce site, a business can use this facility to manage the product catalog and the developer can just consume it in their code in an automated fashion.

The product is not OSS (at least not yet) but the full source is included in the distribution, including the demo instance referenced above.

I wanted to share with the community and will be happy to answer questions!

-Edmond