MVC architecture from design to production

I am trying to better understand the MVC architecture. I am writing front-end and back-end web applications using the LAMP stack. I do not use any frameworks yet. I have code in Notepad ++ and use WinSCP to transfer files (Putty for terminal). All server-side encodings are performed in PHP.

Based on the reading I did, this is my best guess about how MVC files are structured:

+ -- Project1
|    + -- models
|    |    + -- model.php
|    + -- views
|    |    + -- view.php
|    + -- controllers
|    |    + -- controller.php
+ -- Project2
|    + -- models
|    |    + -- model.php
|    + -- views
|    |    + -- view.php
|    + -- controllers
|    |    + -- controller.php

So, although there are many articles and blogs about which models, views, and controllers are, I have not seen anything about how to set this up for what I have compiled above.

I have no idea how this integrates with respect to my shared folder on my server. Here is my hunch, assuming it /var/www/html/is my public directory.

+ -- var
|    + -- www
|    |    + -- html
|    |    |    + -- my-application-1.php
|    |    |    |
|    |    |    + -- my-application-2.php
|    |    + -- Project1
|    |    |    + -- models
|    |    |    |    + -- model.php
|    |    |    + -- views
|    |    |    |    + -- view.php
|    |    |    + -- controllers
|    |    |    |    + -- controller.php
|    |    + -- Project2
|    |    |    + -- models
|    |    |    |    + -- model.php
|    |    |    + -- views
|    |    |    |    + -- view.php
|    |    |    + -- controllers
|    |    |    |    + -- controller.php

, ( , ), "" . , (my-application1.php my-application-2.php), (php include/require) , . , .

- ? Linux-? -, , , ?

, (, Zend, Laravel CakePHP). , , , , .

+4
2

, , , , ?

, . , , symfony2 zf2 .

, , .

, , zend 1

project
|-- application
|   |-- Bootstrap.php
|   |-- configs
|   |   `-- application.ini
|   |-- controllers
|   |   |-- ErrorController.php
|   |   `-- IndexController.php
|   |-- models
|   `-- views
|       |-- helpers
|       `-- scripts
|           |-- error
|           |   `-- error.phtml
|           `-- index
|               `-- index.phtml
|-- library
|-- public
|   |-- .htaccess
|   `-- index.php

- /path/to/project/public. , . index.php, .

, , - php , :

ZF2 github

Sf2 on guthub

+2

, , ​​ -. /web/projects , htdocs

> cd /var/www/html
> ln -s /web/projects/myProject/public myproject

index.php , . .htaccess, .

(Laravel Symfony - ) .

+2

All Articles