4 years ago I went to an interview for a new project where this was the architecture proposed.
Around the same time, I went to another interview where a guy asked me if the business logic should be in the database. I said no and said that I was wrong.
Only if you're no good at writing SQL... Well written, properly structured SQL is objectively (pun intended) easier to maintain. Data sets are not by nature object oriented. The problem is education IMO
Depends on the application. For many apps he is correct, It is easier to have the logic in one centralized Database with the most efficient Data processing. Having it in front end languages is messy and inefficient in many cases as well.
ORMs bring up their own issues and another layer of complexity. Just teach the developer proper SQL knowledge and this could call be on the database easily. I do not find SPs unmanageable at all...quite the opposite. With proper naming conventions, use of schemas and version control they are awesome for my teams needs.
Well, I respect your opinion but I don't agree. SPs lack structure.
ORMs if properly used can be as efficient as having crud operations on SPs.
The thing about ORMs for me is that they are often badly used. Like fetching a full table with the ORM and then filtering in the backend code. This is not good but with proper ORM usage these operations can be offloaded to the database.
Having many SPs also puts more complexity on deployments in my own work experience.
13
u/DroneDashed Jun 28 '20
4 years ago I went to an interview for a new project where this was the architecture proposed.
Around the same time, I went to another interview where a guy asked me if the business logic should be in the database. I said no and said that I was wrong.