PHP Framework User Feedback

I have been studying OOP programming for about a year and a half and have developed a fairly standard structure, which I usually adhere to. I would love some feedback or information on how I can improve some features, or if there are some things that I miss.

VIEW MODE

1) In fact, it all starts with the Index.php page. The first thing I do is my “packages.php” file, which is basically a configuration file that imports all the classes and function lists that I will use.

2) I don’t have a direct connection between my index.php file and my classes, what I did is “pretty them” with my viewfunctions.php file, which is essentially just a channel for classes, so in my html I I can write <?php get_title('page'); ?>instead of <?php echo $pageClass->get_title('page'); ?>Plus, I can run a couple of small Boolean elements, and what is missing from the script view function, which can better adapt the output of this class.

3) Any information entered through the database is launched from the corresponding class, which has a direct connection with the database class, the only class that is allowed to directly contact the database (allowed in the sense that I run all my queries with the user code of the class )

INPUT MODE

1) Any user input is sent to my userFunctions.php.

2) , , .

3) , DB .

php http://img139.imageshack.us/img139/3319/phpmodel.gif

, - .

. , "" , , - .

-J

+3
4

, , - . , , : , , .

,

<?php get_title('page'); ?>

, .

<?php Page::GetTitle('page'); ?>

( , , 50 , ).

Model-View-Controller ( ircmaxell ). , PHP. - Yii , - , .

!

+3

, , ( ), , SQL . "model" DB. , sql ( ..). MUCH ( , ..)...

!

+2

. .

, , , . , .

+2

? , ... , . , , . " ", , , , , , , . , , -, , , , .

+1

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


All Articles