When I talk about scripting languages, I talk about languages ββlike Python, Perl, and (in my case) PHP. After using CodeIgniter, Zend, and many other interesting MVC systems, it seems clear that one thing that seems to agree on is the folder structure (along withWithOTher things_like_that). This really causes problems for me because I cannot find good documentation about the benefits of various structure designs. Most people simply recommend one, because this is what they use without considering design improvements.
One of the things we can all agree to is that checking the file system for existing files when class autoload is very bad practice. Our classes should not be in one of 5 possible places, causing a barrage of exists () files for each library loaded.
One way or another, I'm trying to put together directory structures that I can compare to find best practices when planning applications that:
- Based on OOP, which most likely means MVC
- Are international in the field and support language files / translations
- Open to modules / plugins so that you can pack full packages into our code base
- Clearly define what is happening and where to look for the given classes.
- Possible support for several sites working with the same structure (see directories / below)
, . , libs - , /, . , (JS/CSS/images), - ! , , lang .
/controllers
/views
/models
/libs
/config
index.php
Zend, libs ( , ). .
/libs
/site
/controllers
/views
/models
/config
index.php
.
/libs
/functions
/site
/controllers
/models
/views
/config
/site2
/controllers
/models
/views
/config
/modules
/user
/controllers
/models
/views
index.php
, . MVC, , -, CRUD .
- , ?