
Libraries for building Metadata Frameworks - nickpeterson
I often work with&#x2F;on enterprise applications, which often have a metadata layer baked into them. Usually this allows for things like:<p>* Creating Logical Entities that codegen into database table&#x2F;s<p>* Creating logical attributes that have certain qualities about them (numeric, max length, et cetera)<p>* Serializing the metadata and deserializing it (to migrate&#x2F;deploy to another system).<p>* The ability to autogenerate web services with basic create&#x2F;read&#x2F;update&#x2F;delete operations based on the metadata.<p>I&#x27;ve looked around github but have never really found any libraries&#x2F;frameworks that seem to provide these functionalities. The closest I ever seem to get are ORMS or web services generation tools that are usually based on DTOs. Is there anything out that the expressly tries to create this kind of underlying framework to build an app on?<p>Also, are there any books that specifically deal with these kinds of topics that are considered decent?
======
brudgers
When I see the term 'Metadata' I think 'RDF' and 'TripleStore'. That may not
be what you're looking for, but if not, it might be because it's not clear to
me what you are looking for (at the 'specification' level of abstraction)
because it's not really clear what "metadata" means exactly or how it will be
used or why.

Anyway, if triplestore fits the bill then there are lots of options:
[https://en.wikipedia.org/wiki/List_of_subject-predicate-
obje...](https://en.wikipedia.org/wiki/List_of_subject-predicate-
object_databases) if it doesn't it's probably best to dive in and think about
pinning down the use case.

Good luck.

~~~
nickpeterson
I guess I'm looking for a decent guide to building engines for doing code
generation off of a logical model.

For instance, defining entity and their properties, then parsing that
definition and taking actions (like generating web services or database change
scripts).

It seems like this is essential to build an actual 'product' from software,
and almost every piece of software I use has this, yet I see nothing about
this on the sites/blogs I frequent. I know at a basic level you can split this
into a series of smaller areas (parsing, grammers/schema design, et cetera),
but almost nothing that speaks to process of designing these things in total.

Surely there is some battle hardened design advice for creating backends this
way?

~~~
brudgers
I don't have an answer other than the one you already have...parsing,
grammars, etc. because any tool that did code generation would be 'papering
over' all those features. However, there are tools, i.e. programming
languages, that make parsing and grammars etc. easier...being a bit of a
Lispweenie code generation suggests macros to me...but setting that aside,
there are tools for writing Domain Specific Languages for example JetBrains
MPS [https://www.jetbrains.com/mps/](https://www.jetbrains.com/mps/) see SE-
Radio #200: [http://www.se-radio.net/2014/01/episode-200-markus-volter-
on...](http://www.se-radio.net/2014/01/episode-200-markus-volter-on-language-
design-and-domain-specific-languages/)

------
cmrajan
check [https://erpnext.com](https://erpnext.com) It's built on top of a
metadata application framework github.com/frappe/erpnext

