Freitag, 3. Juni 2011

Datenwerk Schemas

Datenwerk is coming along nicely. This week I got the C++ bindings working, and adapted Audiowerk to use them.

Still, using the library from within C++ feels kind of clunky, and it would be nice to generate interfaces from structure definitions.

Datenwerks building blocks are very close to the ones from JSON by design, so I looked into JSON Schema, even wrote a schema myself (the first schema I ever wrote in my life), and enjoyed it.

I believe it will be beneficial to simply use JSON Schema for Datenwerk definitions, as its spec is well written and thought out, which saves me hard documentation work. I want to allow users to write their model schema in JSON, and provide a tool which generates C++ class wrappers from it.

Python binding users have to write their schema as __template__ members directly into their View classes. It would make sense to support the same schema here as well, so the structure can be described once, and then be translated to bindings for various programming languages, at run-time (Python and other introspective languages) or as a precompiled step (C/C++).

Keine Kommentare:

Kommentar veröffentlichen