Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Ruminating on code generation

Ruminating on code generation

Scheduled Pinned Locked Moved The Lounge
asp-netcomai-codingtools
22 Posts 13 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    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

    M Offline
    M Offline
    MSBassSinger
    wrote on last edited by
    #21

    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.

    1 Reply Last reply
    0
    • honey the codewitchH honey the codewitch

      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.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #22

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups