What are the arguments for creating your own ORM layer?

The benefits of ORM are pretty clear. But I noticed that some companies prefer to build their own home ORM. Why?

+4
source share
4 answers

There are only two arguments that I can see ever spinning up your ORM (and it happened to me in the past that made me write my own):

  • The company refuses to use open source software because the obligations they assume may be included in their application.

  • The company refuses to spend money on a commercial ORM.

Any other argument (for example, the quality of the Entity Framework is too small for us to use) is completely controversial. No matter how bad the Entity Framework (or something else ORM you are talking about), you will not come close to reliability and reliability by manually flipping your own.

+8
source

Since O / R cards are very complex pieces of software, writing your own, beyond the scope of a typical datareader wrapper, and pre-executing SQL queries will take a lot of time (think for at least 6 months). This is not the biggest problem. The biggest problem is that as soon as you go with your own O / R mapper, you have to maintain it for the remaining time when the application using it is in production. Which may be a long time. Make no mistake, supporting the O / R mapper yourself, this is not an easy task: you must invent all the tricks that the developers of the O / R mapper already know and have decided.

And last but not least, doing it yourself should not be done on a paid contract. In the end, you write infrastructure code that is already available elsewhere.

I know that I am biased (I wrote LLBLGen Pro), but I am also one of the few people in this industry who has written a complete O / R pocket structure and knows what it takes to get decent and works with good performance and a great set functions.

Just do the math: if you need to get $ 1000 to get the o / r mapper framework license (or less), and you can immediately start working with your client’s application, how many hours you will get for $ 1000 so you can build O / R mapping, without spending money on company money? And save it? You cannot do this for the money.

+6
source

If you have an internal database that has evolved to have a bad schema, it’s easier to write your own ORM level than try to get a solution out of the box to play well with it.

+2
source

In my opinion, ORMs are specialized and designed to solve common problems. If you want a more general solution (for example, for more complex queries) or just differently, you can either modify the existing solution (which for various reasons is often not the best choice), or create your own.

ORMs also restrict you by forcing you to use their agreements and accept their restrictions.

+1
source

Source: https://habr.com/ru/post/1334671/


All Articles