mardi 27 décembre 2016

PHP Framework Design

Short Version: Are there standardized design and build strategies for building PHP web frameworks for creating applications?

Detailed Version: I would like to put together a larger scope web framework, such as developing WordPress or Drupal from the ground up, but I'm concerned about making sure I've brought together all of the needed elements on all of my pages, such as with security. In general, I'm not looking for traditional design patterns, such as factory or MVC, since these are still based on the developer remembering to bring everything together on each page. So are there any kinds of PHP development patterns that would address strategies on stacking your code with includes or recommendations on where to put code in a more modular design? It would be nice to have something similar to the other languages (such as Java and .Net) where you annotate your model to require certain access rights in order to implement the model. But with more of a stateless interaction on the web, I'm not quite feeling in control as I am with traditional compiled desktop apps.

To hit a complexity specifically using an MVC example, I don't want to have a single controller approach with a single URL running the whole web app. I also don't want to have a lot of copy and paste code. I would much rather reuse code but even more so create a standardized include that will work for all of my controllers. So are there specific recommendations for how to stack up my includes so I can employ basic security controls (maybe controller level all or nothing) while also making my general functions available?

Aucun commentaire:

Enregistrer un commentaire