Author: Awais Farooq

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

  • Controllers

    In MVC framework, “C” stands for the Controller which refers to the switchboards of the web application. The actions undertaken by the controller, helps to pass parameters to the view so that it can display and respond to the user input accordingly. For example, if we register through a sign-up form which includes details of…

  • Configuration

    The config folder of the web application includes the following files − config.php It includes the configurations for database connectivity and routing as per the directory path. loader.php It extends the existing class of \Phalcon\Loader(). The loader class registers the directories which requires web application. services.php This file associates all the functions which implement the services…

  • Functionality

    Model View Controller (MVC) is a software design and structural pattern for developing webbased applications. This software architectural separates the representation of information from the user’s interaction with it. The MVC model defines the web applications with three logic layers. Model Models are objects which represent knowledge. There should be a one-to-one relationship between the model…