30,997
edits
Tag: 2017 source edit |
|||
| Line 536: | Line 536: | ||
*The '''Table And Row Data Gateway''' | *The '''Table And Row Data Gateway''' | ||
This is the most simple. You have one class per table and each class is a link to the table with CRUD methods ( | This is the most simple. You have one class per table and each class is a link to the table with CRUD methods (Create, Read, Update, Delete). A class instance is a record in the table. The class contains only code to reach lines and fields of table. | ||
Example: This mode is used by some ORM Frameworks, like '''iBatis''' (http://ibatis.apache.org/). | Example: This mode is used by some ORM Frameworks, like '''iBatis''' (http://ibatis.apache.org/). | ||
| Line 551: | Line 551: | ||
More "purist" on paper (closer of business), this method also has the disadvantage of being more complex in practice. | More "purist" on paper (closer of business), this method also has the disadvantage of being more complex in practice. | ||
Example: This is the choice if you use the ORM Framework '''Propel''' ( | Example: This is the choice if you use the ORM Framework '''Propel''' (https://propelorm.org/). We find this model in heavier applications, based on this ORM among others. | ||
-> For Dolibarr development, it is recommended to use the connection mode '''Active Record''', which offers the advantages of a model close to the business without having the complexity, without obfuscating technical architecture. It is by this way that the development, understanding of code and technical maintenance and / or business | -> For Dolibarr development, it is recommended to use the connection mode '''Active Record''', which offers the advantages of a model close to the business without having the complexity, without obfuscating technical architecture. It is by this way that the development, understanding of code and technical maintenance and / or business behavior seems the more productive (this is however an ongoing debate between the purists and the pragmatists, debate in which nobody can really be right, because it depends on the objectives). | ||