Category: Tutorials

  • Security Features

    Phalcon provides security features with the help of Security component, which helps in performing certain tasks like password hashing and Cross-Site Request Forgery (CSRF). Hashing Password Hashing can be defined as the process of converting a fixed length bit string into a specified length in such a way that it cannot be reversed. Any change in the input…

  • Object Document Mapper

    Before starting with the concepts of Object Relational Mapper (ORM) and Object Document Mapper (ODM), it is important to understand the difference between SQL and NoSQL databases. The following table highlights the differences between SQL and NoSQL − SQL NoSQL They are also termed as Relational Databases (RDBMS) They are called as non-relational or distributed database The…

  • Working with Forms

    Forms are used in all web applications to accept inputs from the user as request. The data is accepted as an input, then manipulated and saved in the database or any other operation is being performed. Phalcon includes a component named Phalcon\Forms which helps in the creation and maintenance of forms. Consider the example of Blog-tutorial, which…

  • Asset Management

    Assets are all about the additional components apart from the existing framework in Phalcon. Phalcon has an asset manager which helps to manage all the asset components like CSS or JS files. The common methods used are − Method Importance __construct(variable $options) Initializes the component Phalcon\Assets\Manager addCss(string $path, variable $local, variable $filter, variable $attributes) Adds…

  • Multi-Lingual Support

    Phalcon includes a component Phalcon\Translate which provides multi-lingual support and it is very helpful to create web pages, which gets translated in multiple languages. It includes an adapter which helps in binding arrays and assists in reading translation messages. Example Let us create an output with the help of Translate component in Phalcon, which will help to…

  • Session Management

    Sessions are server-side information storage which helps in user interaction with the website or web application. Each session is uniquely defined with a session ID, which is passed to the web server whenever the browser makes an HTTP request. The session ID is paired every time with the internal database such that all stored variables…

  • Cookie Management

    Cookies also known as browser cookies are small text files stored in the browser. It saves all the information related to user identity. This information is used to validate the users once they browse through different pages. There are two different types of Cookies − Let us now discuss how cookies work in Phalcon. Cookies in Phalcon…

  • Database Migration

    Database migration is important for the following reasons − Phalcon performs database migration process in the following way − Step 1 − Create a project named “dbProject” in xampp/wamp directory. Step 2 − Configure the project with the appropriate database connectivity. Step 3 − Execute the command for migration of tables included within the database “demodb”. For now, it includes one table…

  • Query Language

    Phalcon Query Language (PHQL) also called as PhalconQL is a high-level SQL dialect which standardizes SQL queries for the database systems supported by Phalcon. It includes a parser, written in C, which translates the syntax in target RDBMS. Here is a list of some of the prominent features of Phalcon query language − Creating a PHQL Query…

  • Scaffolding Application

    Scaffolding usually refers to a type of code generation where we point it to a web application database, which results in creating a basic CRUD (Create, Read, Update, Delete) application. Before designing a CRUD application, it is important to design database tables as per the need of the application. Step 1 − Create a scaffolding application…