PHP MVC Framework Development

Currently, I am facing a problem that I cannot solve on my own:

I started coding a "small" structure (browserergame-framework) that somehow follows the MVC pattern.

Now I have my index, bootstrap, db adapter, dispatcher, wrapper, but I really don't know how to connect them. I coded their methods, etc., but I don’t know how to design them to work as an engine.

And the next problem is my controllers, I don’t know how to “bind them” so that they can easily access the entire structure ... Yes, this is confusing, so I need your help, some kind of general scheme of “ what the stream of frames should look like, will be very enjoyable.

Thanks.

+3
source share
2 answers

you put the basket in front of the horse. the frames are not written, they have grown. see Developing Framework from Ralph Johnson, one of the Gang of Four.

change

I don’t understand what the author means with the help of the “application”, does it mean the average source code-project or does it mean a project with basic functionality that will be transferred to a later framework.

, . ( ), , . , , , , , , , . , .

, , , .

- ​​, , : , : OCP, SRP, DRY .. DRY. (Do not Repeat Yourself) - . / .

- , , , , . , . , , , , , .

.

- , ( ) , . OTOH, - .

:

. .

" ".

+7
0

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


All Articles