Very good

Recommend this page to a friend!

      Tiny PHP ORM Framework  >  Tiny PHP ORM Framework package blog  >  PHP ORM Pros and Cons  >  All threads  >  Very good  >  (Un) Subscribe thread alerts  
Subject:Very good
Summary:Very good
Author:Kiril Savchev
Date:2016-05-31 09:20:29

  1. Very good   Reply   Report abuse  
Picture of Kiril Savchev Kiril Savchev - 2016-05-31 09:20:29
Very good article and these are the reasons me and my team are not using ORMs very often, but DBALs instead. Although I think this goes more in the sphere of Database Access Layer where the developer can executes custom queries and fetches arrays for a result. One of the main goal of ORMs is to use more objects and less queries and not to take care about query control, witch is not a very good practice to me. Thank you!

  2. Re: Very good   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-05-31 19:17:18 - In reply to message 1 from Kiril Savchev
Yes, as mentioned in the article, ORMs are not very suited to take the most of the underlying database.

For applications that squeezing all bits of performance is important, maybe you should not use ORMs, at least those that return everything as objects.

I use a ORM tool for generating ORM code. The generated code uses Metabase DBAL that I have been developing since many years ago. ...

The ORM tool is called MetaStorage. I can define what classes it generates and which functions the classes need, so it does not generate fat models.

Another thing is that it can also generate report classes, which are precisely for executing queries that retrieve results in arrays, not objects, for read-only purposes, like display or even sending newsletters. It would take much memory to treat everything as an object.


For more information send a message to info at phpclasses dot org.