Creating My Own PHP Framework

I plan to create a small structure for a dynamic site. When creating a framework, is there a standard or behavior code that I have to enclose?

+3
source share
5 answers

Apart from the license to use, there is no standard documentation that you must include. As for how to create a framework, when you write the components of the lowest level of code, you decide how the files are created and used. Just create some PHP files and let them use them.

A look at how existing structures are structured is a good way to get started. CodeIgniter is nicely commented and simple enough to understand, so this would be a good reading project to get started.

+4
source

Determine if your environment is an MVC framework or full-text infrastructure

A loosely coupled framework uses a / library like Zend / Symfony, where you simply provide all the classes and interfaces that the developer can use, but you don’t impose a specific request-response stream.

A full-fledged one provides and usually forces the developer to use the request stream that he has installed, for example CakePHP, CodeIgniter or Kohana.

p / s: sorry, I do not know the real terms for the categories of frames.

, .

Zend/Symfony/CakePHP, , -/. , CMS , - .

+3

, designpatterns ( MVC).

, PHP-.

PHP, :

  • Zend Framework
  • Yii
  • Symphony
  • ...

. PHP.

+2

. - - , . , , , .

+1

PHP: http://www.phptherightway.com. , PSR-0, PSR-1 .

+1

Source: https://habr.com/ru/post/1776043/


All Articles