Ruminating on code generation
-
EF is not a replacement for stored procedures. EF is not a server-side DDL or DML. It is a client-side object to data mapper.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
It is more than just a mapper. Most production uses of it (and I have seen dozens of such sites in production that use it extensively) use it to perform data operations. I have also known several organizations (public and private) that replaced their use of EF with stored procedures, a DAC, and a layer that puts the data into class instances. Having seen the folly of EF when used correctly over time, that led me to write the code generator I described in the OP. Lots of developers swear by the use of EF, but when I narrow down their EF fandom to specific implementations, in most cases it results in illustrating reasons not to use it. My preference is to not use EF unless there is a solid use case that indicates its use after value engineering shows a net positive value. If your preference is different, that is fine.
-
Deslang and Slang are kind of hard to explain. I spent several articles trying, but the issue is you need background in the CodeDOM - pretty solid background actually, not only to appreciate it, but to understand it. The CodeDOM isn't well traveled technology. It's primarily used by ASP.NET and not touched by most people. Even if that weren't the case, there's the meta issue, and that is Deslang is a code generator generator. Yeah. A code generator generator. I use it in projects that generate code so that I can input C# "templates" and then modify them and fill them out in the generator app itself - turning these "templates" into full fledged source. And that source will be rendered in C#, VB.NET or potentially other .NET languages.
To err is human. Fortune favors the monsters.
A "generator generator" might be too complicated for the average reader. I do prefer your more complexer articles over your popular ones :)
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.