Folder organisation ################### In Novius OS ************ Root directories ================ * :file:`~/novius-os/`: Novius OS ``core``. * :file:`~/local/`: Your website * :file:`~/public/`: ``DOCUMENT_ROOT`` of the website * :file:`~/logs/`: logs directory ``public`` directory ==================== A file can either be: * executable or non-executable * provided by the developer or provided by the application This leads to 4 possibles usage, and each of them is reflected in the :file:`~/public/` folder: * :file:`~/public/static/`: equivalent to ``assets``. Non-executable files provided by the developer or Novius OS. * :file:`~/public/data/`: Non-executable files generated by Novius OS. * :file:`~/public/htdocs/`: Executable files provided by the developer or Novius OS * :file:`~/public/cache/`: Executable files generated by Novius OS. .. note:: Here, Novius OS refers to the core and also to any application of the website. There's a 5th directory :file:`~/public/media/`, used by the :doc:`media_centre`. Where Novius OS can write the developer cannot, and vice-versa. :file:`~/public/static/` and :file:`~/public/htdocs/` have the same sub-directories structure: * :file:`~/novius-os/`: Novius OS files. * :file:`~/apps//`: Files from developers of :doc:`applications `. | These directories are symbolic links, created upon Novius OS installation or when activating :doc:`applications `. | These symbolic links respectively points to :file:`htdocs` and :file:`static` directories of Novius OS or the application. | See below for the :ref:`directories organisation within an app `. ``core`` directories ==================== * :file:`~/novius-os/framework/`: Novius OS framework * :file:`~/novius-os/fuel-core/`: FuelPHP framework * :file:`~/novius-os/packages/`: FuelPHP packages ``local`` directory =================== * :file:`~/local/applications/`: Novius OS :doc:`applications `. * :file:`~/local/cache/`: Contains resized medias. * :file:`~/local/classes/`: Your PHP classes. * :file:`~/local/config/`: Your Novius OS configuration files. * :file:`~/local/data/`: Files generated by Novius OS. * :file:`~/local/metadata/`: metadata files for your website, generated by Novius OS. * :file:`~/local/migrations/`: migration classes. * :file:`~/local/views/`: Your ``Views`` files. .. note:: :file:`classes` and :file:`views` directories should not contain a lot of files, since most of your developments should go in :doc:`applications `. .. _understand/organization_directories/application: Within an application ********************* MVC applies to core, and also to applications .. image:: images/files_organisation.png :alt: Files organisation :align: center There are 6 main directories: :file:`classes` It's where your logic belongs, .i.e. classes which defines and manipulares data. At least there are controllers and models of the application. We can also find tools used by the views or the controllers. :file:`config` | This directory gather all the informations to repesent your models. Controllers perform logical operations on your data, but also needs additional data to pass on to the views in order to display them. These informations are separated from controllers (which don't have logical value) and from the views. The latter receives data as parameters and never fetch them on their own. | The configuration file for the :file:`controller/admin/monkey.ctrl.php` controller will be located at :file:`config/controller/admin/monkey.config.php`. A class and its configuration file share a similar naming convention. :file:`lang` This directory contains translation files, with a sub-directory for each language. :file:`migrations` This directory contains migration files. :file:`static` This directory contains JavaScript and CSS files, and public resources (such as images). :file:`views` This directory contains files responsible to display the data.