Phalcon is a free open source PHP framework based on MVC design pattern that is delivered to end users as a C -extension for the PHP language providing high performance and lower resource consumption.Phalcon is developed by Andres Gutierrez and written in Zephir/C.
Phalcon is built upon a powerful yet easy to understand and use a pattern called Dependency Injection.
Phalcon’s Dependency injection initializes or define services once – and use them virtually anywhere throughout the application.
Below is the list of basic features provided by Phalcon PHP framework.
- Low overhead
- MVC & HMVC Pattern
- Dependency Injection
- Support for Rest
- Autoloader
- Router
The root folder of Phalcon Php contains files and directories
- App
- Config
- Controllers
- Library
- Migrations
- Models
- Views
- Cache
- Public
- Css
- files
- img
- js
- temp
- .htaccess
- .htaccess
- .htrouter.php
- index.html
5. What is loader?
Loader is a class found under Phalcon\Loader directory. It also handles error such as if a class does not exist but it is called in any part of program then special handler is called for handling.
6. What is lazy initialization?
In Loader if a class is added according to its need in program, performance is increased as only specific file is included. This technique is known as lazy initialization.
7. Enlist the methods of loader.
- Registering Namespaces
- Registering Directories
- Registering Classes
- Registering Files
8. How can we access to backend in Phalcon?
It is provided by logging services for application. We can login to different backend using different adapters. It offers transaction logging, configuration options, different formats and filters.
9. Enlist the database engines supported by Phalcon.
- Phalcon\Db\Adapter\Pdo\Mysql : Mysql
- Phalcon\Db\Adapter\Pdo\Postgresql : Postgresql
- Phalcon\Db\Adapter\Pdo\Sqlite : SQLite
10. What is PHQL?
PHQL (Phalcon Query Language) allows user to implement query language similar to SQL query language. PHQL is implemented as a parser which connects to RDBMS.
ODM (Object-Document Mapper) offers a CRUD functionality, events, validations among other services in Phalcon.
Single Module Application: Single MVC applications consist of one module only. Namespaces can be used but are not necessary.
Multi-Module Application: A multi-module application uses the same document root for more than one module.
Below is the list of Application Events in Phalcon.
Event Name | Triggered |
---|---|
boot | Executed when the application handles its first request |
beforeStartModule | Before initialize a module, only when modules are registered |
afterStartModule | After initializing a module, only when modules are registered |
beforeHandleRequest | Before execute the dispatch loop |
afterHandleRequest | After execute the dispatch loop |
0 comments:
Post a Comment