Folder Structure

The default folder structure of Icarus is designed to be compatible with both large and small web applications.

All the global variables are declared in globals.php and Url routing for the project will be handled in routes.php. The general settings of the project are written in settings.php. The files directory contains all the files uploaded using the file handler. The js directory contains all the js files used in the project.

External libraries are kept in the lib folder. The logic files are stored in the form of class files in logics folder. The modules of the project are kept in the modules directory. The resource directory contains the language files. The styles directory contains all the stylesheets used in the project. The images folder in styles directory contains all the pre-defined images used in the project. The themes directory contains all the themes used in the project. The temp folder is required for the working of smarty and is used to store the templates of smarty.

Steps to be followed

1. The directory structure should be followed. Each file should be kept in the corresponding directory only.

2. Files should be correctly named. Some of the name formats are mandatory while others are for better readability and cleanliness.

3. JavaScript and JQuery code should be written in .js files. The JS files should be kept in the js folder in the project directory. No JS should be written in TPL’s or HTML files.

4. Common JS logic can be written in app.js whereas the page specific JS can be in separate JS files.

5. All styles should be written in .css files and kept in styles folder in the project directory.

6. Generic styles can be in app.css while page specific styles can be in separate stylesheets which are named accordingly.

7. All the URL's of the project should be defined using Routes.php in config folder in the project directory.

8. Uniquely identifiable entities should be generalized as well defined classes in “logic” directory and minimize the application logic in controller and view layers. Any class defined in “logic” directory will be autoloaded. The name of the file in logics directory should be in the format “cls_classname” in all small letters.

Next Features