Author: Awais Farooq

  • 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…

  • Switching Databases

    We have used a MySQL database in our application. If we wanted to change the database software midstream, it would not be too hard, as long as we have the same data structure in our new database. PostgreSQL Configure the web application which will connect to PostgreSQL database. This can be achieved using the following…

  • Database Connectivity

    In this chapter, we will discuss the database connectivity related to Phalcon. Creation of Database and Design We will focus on creating a database for blogs which maintains posts along with the categories as per the entries of users. Database Name: blog-tutorial Query used for creating the database − After creation of the database, the…

  • Routing

    The router component allows to define routes that are mapped to the controllers or handlers that should receive the request. A router parses a URI as per the information received. Every router in the web application has two modes − The first mode is ideal for working with MVC applications. Following is the syntax to…

  • Views

    Views are information being presented to the end user. A view can be considered as a web page with the appropriate response to be displayed. The response is received through the controller which interacts with the model. Specifically in Phalcon, the view consists of Volt code, PHP and HTML. A set of special delimiters is…

  • Models

    Model in MVC architecture includes the logic of application. Model is the core interaction with the database. It should be able to manage updating, deleting, inserting, and fetching of records as per the user’s request. For understanding the model interaction in Phalcon PHP framework, following steps should be followed. Step 1 − Creation of database. For…