1,988
edits
Tag: 2017 source edit |
m (MySQL) |
||
| Line 325: | Line 325: | ||
Using Database triggers can save you time when you make development but is a very bad practice, so is forbidden as it is not compatible with the high level of quality of code expected by Dolibarr team. External modules that uses Database triggers may also be refused on the market place since it won't work for more than 50% of users. | Using Database triggers can save you time when you make development but is a very bad practice, so is forbidden as it is not compatible with the high level of quality of code expected by Dolibarr team. External modules that uses Database triggers may also be refused on the market place since it won't work for more than 50% of users. | ||
== | ==MySQL specificities== | ||
*Tables must be declared with format InnoDB. | *Tables must be declared with format InnoDB. | ||
| Line 331: | Line 331: | ||
This format supports foreign keys and their restrictions, and transactions integrity is also supported. This guarantees that Dolibarr events keep all data with correct values between tables even when transaction modify different tables. | This format supports foreign keys and their restrictions, and transactions integrity is also supported. This guarantees that Dolibarr events keep all data with correct values between tables even when transaction modify different tables. | ||
*Dolibarr MUST work even if | *Dolibarr MUST work even if MySQL option '''strict''' is active. | ||
To activate it (required when developing on Dolibarr), add the following line into the config file of your | To activate it (required when developing on Dolibarr), add the following line into the config file of your MySQL server (my.cnf or my.ini) | ||
{{MySqlStrictMode}} | {{MySqlStrictMode}} | ||
==PostgreSQL specificities== | ==PostgreSQL specificities== | ||
Only | Only MySQL files must be maintained. | ||
Those files are converted "on the fly" by the database Dolibarr driver. | Those files are converted "on the fly" by the database Dolibarr driver. | ||
| Line 551: | Line 551: | ||
[[Category:Development]] | [[Category:Development]] | ||
== Design pattern for Graphic interfaces (MVC) == | ==Design pattern for Graphic interfaces (MVC)== | ||
There are several design patterns for user interfaces (MVC, MVP, MVVM). | There are several design patterns for user interfaces (MVC, MVP, MVVM). | ||
Many confuse this design pattern with that of using a template framework. It's unrelated. A template framework (see previous point) is only linked to the "V" part of these models. | Many confuse this design pattern with that of using a template framework. It's unrelated. A template framework (see previous point) is only linked to the "V" part of these models. | ||
| Line 571: | Line 571: | ||
This mode of separation has had a neutral effect on new developments but has made it possible to reduce the time required for maintenance and fixing bugs so significantly that it is not envisaged to switch to another type of separation (yes the findings made in real life are not always those expected by school theory). The important thing remains that there is always a separation between C and V, no matter how this separation is materialized, as long as it is (Reminder: Do not confuse the notion of separation of C and V with the notion of separation of the code to feed the data of a View and of the code to format the View, this a principle of separation relating to the Design Pattern of Vue, see next point). | This mode of separation has had a neutral effect on new developments but has made it possible to reduce the time required for maintenance and fixing bugs so significantly that it is not envisaged to switch to another type of separation (yes the findings made in real life are not always those expected by school theory). The important thing remains that there is always a separation between C and V, no matter how this separation is materialized, as long as it is (Reminder: Do not confuse the notion of separation of C and V with the notion of separation of the code to feed the data of a View and of the code to format the View, this a principle of separation relating to the Design Pattern of Vue, see next point). | ||
== Design pattern for Views - Presentation == | ==Design pattern for Views - Presentation== | ||
There are frameworks that specialize in Vue Design Pattern, the part of formatting the screen seen by the user. | There are frameworks that specialize in Vue Design Pattern, the part of formatting the screen seen by the user. | ||
Old versions of Dolibarr used Smarty. This framework is an overlay to an already very powerful screen formatting framework called ... PHP. The benefits being much lower than the disadvantages, it has been abandoned in favor of PHP templates (.tpl.php file) which remain the simplest, the most universal, the most scalable and the most efficient, of the presentation frameworks. | Old versions of Dolibarr used Smarty. This framework is an overlay to an already very powerful screen formatting framework called ... PHP. The benefits being much lower than the disadvantages, it has been abandoned in favor of PHP templates (.tpl.php file) which remain the simplest, the most universal, the most scalable and the most efficient, of the presentation frameworks. | ||
edits