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. Reposted rant about the evil ORM!

Reposted rant about the evil ORM!

Scheduled Pinned Locked Moved The Lounge
databasecsharpwcfbusinessoop
6 Posts 4 Posters 0 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.
  • T Offline
    T Offline
    Tomaz Stih 0
    wrote on last edited by
    #1

    Reposted from the Database. At the end of the 90ties we somehow got into ORM. At the time - no matter how hard we tried - we always ended up with a messy and complicated code and filthy compromises. And it hasn't changed. But somehow frameworks like NHibernate and EntityFramework are becoming very popular. So here is my rant. Some time ago I worked on large projects and things were pretty predictable. You've got DB model. You generate your SQL procedure layer and your C# layer. Then you create your component / web service / wcf service / restful service and serialize results of your C# calls as POCOs. Now try to do this with fancy NHibernate objects with auto-resolving proxy objects for related entities. It won't work. Because when objects are serialized their auto-resolving lazy evaluating proxies aren't. To solve it you duplicate /I'll write it again, for drama effect: duplicate/ your objects to create serializable POCOs. And then you create them CRUD functions on top of object models. Or even separate the entities /drama: dereference them having no two entities connected/... And, hey, you are back where you were with the stored procedures - only with lousier performance and three layers of crap on top of it. So next time someone comes with a fancy-schmancy ORM wrapper it better already include web service / wcf service or restful service abstraction and work on top of it; rather then bellow it! Because otherwise we just off-load drudgery to the web services and call it "business layer" when in fact it is really a freaking "ORM back to stored procedures layer." There. Hhhh...shhhh... I already feel better. So ... how do YOU handle ORM and web services?

    L M P 4 Replies Last reply
    0
    • T Tomaz Stih 0

      Reposted from the Database. At the end of the 90ties we somehow got into ORM. At the time - no matter how hard we tried - we always ended up with a messy and complicated code and filthy compromises. And it hasn't changed. But somehow frameworks like NHibernate and EntityFramework are becoming very popular. So here is my rant. Some time ago I worked on large projects and things were pretty predictable. You've got DB model. You generate your SQL procedure layer and your C# layer. Then you create your component / web service / wcf service / restful service and serialize results of your C# calls as POCOs. Now try to do this with fancy NHibernate objects with auto-resolving proxy objects for related entities. It won't work. Because when objects are serialized their auto-resolving lazy evaluating proxies aren't. To solve it you duplicate /I'll write it again, for drama effect: duplicate/ your objects to create serializable POCOs. And then you create them CRUD functions on top of object models. Or even separate the entities /drama: dereference them having no two entities connected/... And, hey, you are back where you were with the stored procedures - only with lousier performance and three layers of crap on top of it. So next time someone comes with a fancy-schmancy ORM wrapper it better already include web service / wcf service or restful service abstraction and work on top of it; rather then bellow it! Because otherwise we just off-load drudgery to the web services and call it "business layer" when in fact it is really a freaking "ORM back to stored procedures layer." There. Hhhh...shhhh... I already feel better. So ... how do YOU handle ORM and web services?

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

      Tomaž Štih wrote:

      So ... how do YOU handle ORM and web services?

      I don't. Problem solved. Seriously, anything that has anything to do with them sucks. It's cursed.

      P 1 Reply Last reply
      0
      • T Tomaz Stih 0

        Reposted from the Database. At the end of the 90ties we somehow got into ORM. At the time - no matter how hard we tried - we always ended up with a messy and complicated code and filthy compromises. And it hasn't changed. But somehow frameworks like NHibernate and EntityFramework are becoming very popular. So here is my rant. Some time ago I worked on large projects and things were pretty predictable. You've got DB model. You generate your SQL procedure layer and your C# layer. Then you create your component / web service / wcf service / restful service and serialize results of your C# calls as POCOs. Now try to do this with fancy NHibernate objects with auto-resolving proxy objects for related entities. It won't work. Because when objects are serialized their auto-resolving lazy evaluating proxies aren't. To solve it you duplicate /I'll write it again, for drama effect: duplicate/ your objects to create serializable POCOs. And then you create them CRUD functions on top of object models. Or even separate the entities /drama: dereference them having no two entities connected/... And, hey, you are back where you were with the stored procedures - only with lousier performance and three layers of crap on top of it. So next time someone comes with a fancy-schmancy ORM wrapper it better already include web service / wcf service or restful service abstraction and work on top of it; rather then bellow it! Because otherwise we just off-load drudgery to the web services and call it "business layer" when in fact it is really a freaking "ORM back to stored procedures layer." There. Hhhh...shhhh... I already feel better. So ... how do YOU handle ORM and web services?

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

        Our company just decided to use ORM inside of lightweight (well, bloody heavyweight now) web api services. five billion lines of code and much faffing about just to return the result of a simple stored proc as JSON "OH! but what if the database changes, or we need to supply XML or..." well, if it takes ten times as long to flaming well write as it does to knock it up with a flaming stringbuilder, then in my book it's a waste of friggin' time. I now await the moment when something does change and it takes some poor developer three days just to find the right class to modify!

        1 Reply Last reply
        0
        • T Tomaz Stih 0

          Reposted from the Database. At the end of the 90ties we somehow got into ORM. At the time - no matter how hard we tried - we always ended up with a messy and complicated code and filthy compromises. And it hasn't changed. But somehow frameworks like NHibernate and EntityFramework are becoming very popular. So here is my rant. Some time ago I worked on large projects and things were pretty predictable. You've got DB model. You generate your SQL procedure layer and your C# layer. Then you create your component / web service / wcf service / restful service and serialize results of your C# calls as POCOs. Now try to do this with fancy NHibernate objects with auto-resolving proxy objects for related entities. It won't work. Because when objects are serialized their auto-resolving lazy evaluating proxies aren't. To solve it you duplicate /I'll write it again, for drama effect: duplicate/ your objects to create serializable POCOs. And then you create them CRUD functions on top of object models. Or even separate the entities /drama: dereference them having no two entities connected/... And, hey, you are back where you were with the stored procedures - only with lousier performance and three layers of crap on top of it. So next time someone comes with a fancy-schmancy ORM wrapper it better already include web service / wcf service or restful service abstraction and work on top of it; rather then bellow it! Because otherwise we just off-load drudgery to the web services and call it "business layer" when in fact it is really a freaking "ORM back to stored procedures layer." There. Hhhh...shhhh... I already feel better. So ... how do YOU handle ORM and web services?

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Back atcha - I have been using a home rolled ORM for over 15 years, started in VB5 and now support Silverlight/WCF. So a new kid on the block manages to talk me into EF, fuck me roan, there is a piece of shit if I ever saw one, change the name of a field (Customer.Customer is illegal) and spend the next 5 hours trying to work out how to fix your models! Yeah I know it is familiarity but I like my hand rolled tool, I wrote the frickin thing and I know what it does, if I call it a dog it goes off and barks at a junior dev for me!. Now shall we get started on the dogs breakfast called MVC, what a collection of half baked crap that is! No, I fell a whole new rant coming on over the MVC issue.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          • L Lost User

            Tomaž Štih wrote:

            So ... how do YOU handle ORM and web services?

            I don't. Problem solved. Seriously, anything that has anything to do with them sucks. It's cursed.

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #5

            Hear! Hear!

            You'll never get very far if all you do is follow instructions.

            1 Reply Last reply
            0
            • T Tomaz Stih 0

              Reposted from the Database. At the end of the 90ties we somehow got into ORM. At the time - no matter how hard we tried - we always ended up with a messy and complicated code and filthy compromises. And it hasn't changed. But somehow frameworks like NHibernate and EntityFramework are becoming very popular. So here is my rant. Some time ago I worked on large projects and things were pretty predictable. You've got DB model. You generate your SQL procedure layer and your C# layer. Then you create your component / web service / wcf service / restful service and serialize results of your C# calls as POCOs. Now try to do this with fancy NHibernate objects with auto-resolving proxy objects for related entities. It won't work. Because when objects are serialized their auto-resolving lazy evaluating proxies aren't. To solve it you duplicate /I'll write it again, for drama effect: duplicate/ your objects to create serializable POCOs. And then you create them CRUD functions on top of object models. Or even separate the entities /drama: dereference them having no two entities connected/... And, hey, you are back where you were with the stored procedures - only with lousier performance and three layers of crap on top of it. So next time someone comes with a fancy-schmancy ORM wrapper it better already include web service / wcf service or restful service abstraction and work on top of it; rather then bellow it! Because otherwise we just off-load drudgery to the web services and call it "business layer" when in fact it is really a freaking "ORM back to stored procedures layer." There. Hhhh...shhhh... I already feel better. So ... how do YOU handle ORM and web services?

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #6

              Tomaž Štih wrote:

              how do YOU handle ORM

              I don't, and judging by this thread and others, I think you'll find that most developers with significant experience with code and databases don't use them. It seems to be the development equivalent of wearing pants around your knees -- the practitioners seems to think it's cool, but to everyone else you're just causing yourself trouble, effort, and embarrassment with no benefits.

              You'll never get very far if all you do is follow instructions.

              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