Fork me on GitHub

Web application (app)

The web application is a simple example that implements a design pattern MVC based on SILEX (PHP micro-framework, which uses Symfony2 components).

The web application has a file structure as shown below.

|-- app/
   |-- Controllers/     # Controllers
   |-- Forms/           # Forms
   |-- Models/          # Models (AR, DBAL, ORM)
   |-- Providers/       # Providers
   |-- Resources/       # Resources (configuration, database localization)
   |-- Services/        # Services ( additional classes)
   |-- Views/           # Displaying data
   `-- Bootstrap.php    # Loader class

Sequence of execution the web application.

Request --> index.php --> Bootstrap.php --> Controller --> Response

Loader (Bootstrap.php)

Loader (Bootstrap.php) initializes the web application.

Controllers

Controllers are used to handle requests from the client.

Forms

Forms are used for data entry, data validation and display.

Models

Models a set of classes, which is designed to work with a database.

Services

Services this utility classes that are used to working with arrays, strings, XML, HTTP etc.

Layouts

To create the user interface used layouts.

Localization

To translate the application into different languages.

Security

For security application.