Web

How to design with php ?

Design pattern designates a recurring way of solving a programming problem; Usually via object-oriented programming, but not always. Over time, certain conceptions have become recurrent in certain situations and have been documented, named and standardized. In the web domain, the Design Pattern Model View Controller (MVC) is one of them.

The Design Pattern MVC

In a project, a software engineering approach pushes to define the architecture of an application while respecting the design pattern. The MVC architecture seeks to separate three things:
- how to access the data,
- man / machine interface: design, design,
- processing related to the trade / field of application.

The controllers are used to respond to the actions of the user. Each control is associated with a view: this view makes it possible to present the information returned to the user. The data comes from the model (business logic).

Patterns have a history and are not fixed. Thus, the MVC pattern evolved towards the MVC2. In the MVC 2 architecture, there is only one controller that receives all client requests.
The single controller becomes the exclusive entry point of the application. It becomes very easy to centralize the management of access, rights, statistics or any other transverse functionality.

This architecture is particularly recommended in the implementation of a Web application for many reasons.
The single point of entry allows the implementation of centralized processing. Typically, access control. Rather than copy paste (and forget) a test on each page to verify that the user is identified. This test is performed once and this code is maintained in one place.

The code is also much easier to maintain

The sequence of the screens is defined by the single point of entry, a modification will be made at this place (and not by going in search of the 90 lost links in a mountain of code). If tomorrow the product is no longer to be sought in the database but in a web service, it is easy to modify only the corresponding DAO without impacting the business logic.
And if the design evolves, only the files of the view are concerned.

For more information about php programming, click here !

Les publications similaires de "Develop your website"

  1. 22 Fév. 2020Where to learn the code ??209 vues
  2. 25 Juin 2019How to start to develop in PHP ?587 vues
  3. 7 Fév. 2019The difference inbetween Php and magneto developers635 vues
  4. 30 Août 2018Why you can rely on Koodos for web solutions815 vues
  5. 5 Mai 2018Hire today's top PHP developers1218 vues
  6. 28 Fév. 2018The differences between a static and a dynamic website1052 vues
  7. 1 Juil. 2017Magento is super easy to do product table !1459 vues
  8. 3 Avril 2017What is the advantage of hiring an agency?1290 vues
  9. 27 Janv. 2017The technique advances and the language of programming progress. We are at the forefront1377 vues
  10. 16 Déc. 2016Our company is at the forefront of development under RUBY1274 vues
  11. 14 Nov. 2016Do you have a project development? We are for you1189 vues
  12. 29 Oct. 2016Our relationship started with SimplyPHP as a result of a last minute opportunity1088 vues
  13. 17 Sept. 2016You must call professional developers if you want a professionnal website1080 vues