Writing clean code is fundamental in general; here are some best practices related to PHPDevShell to help you get the most the framework.
MVC folder structure
In most plugins folder, you’ll see the following folders:
- config
- controllers
- includes
- language
- models
- public
- views
Only the config
folder is mandatory, because the framework looks for a config/config.xml
file in each subfolder of the plugins
folder. You can organize the files as you want, but using the structure above will help you write clean code.
public
folder
A website is usually composed of two categories of files: some are meant to be served directly, some should be not accessible. Currently, we don’t enforce anything, but we advise that you put in the public
folder all files which should be accessible directly through the web server (javascript, css, images…), and consider that anything outside this folder should not be accessible.
Post your comment on this topic.