4 ms·
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
by nickpeterson 10y ago
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 10y agoI 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-language-design-and-domain-specific-languages/ http://www.se-radio.net/2014/01/episode-200-markus-volter-on...