Book Image

Learning Phalcon PHP

Book Image

Learning Phalcon PHP

Overview of this book

Phalcon is a full-stack PHP framework implemented as a C extension. Building applications with Phalcon will offer you lower resource consumption and high performance whether your application runs on a Linux machine or a Windows one. Phalcon is loosely coupled, allowing you to use its objects as glue components based on the needs of your application. Phalcon PHP's mission is to give you an advanced tool to develop faster websites and applications. This book covers the most common and useful parts of PhalconPHP, which will guide you to make the right decisions while developing a Phalcon-driven application. You will begin the journey by installing and setting up Phalcon for your environment followed by the development of each module. You will be introduced to Phalcon's ORM and ODM. Furthermore, you will also be able to create the first models and database architecture for your project. You will then cover command-line applications, API module, volt syntax, and hierarchical views. Installing and working with Node and Bower for assets management will also be covered. Finally, you will gain insights into creating the backoffice and frontend module along with best practices and resources for development with Phalcon PHP. By the end of this book, you will be able to confidently develop any kind of application using the Phalcon PHP framework in a short time.
Table of Contents (12 chapters)
4
4. Database Architecture, Models, and CLI Applications
11
Index

Summary


We're finally done with this module. In general, there are infinite approaches to writing code. In this chapter, I used an approach that I think is easy to understand. Feel free to be different and code the way you like. This book is not intended to teach you coding, but to teach you Phalcon. You might have noticed that for an API, we don't use any validations. You can practice a little and connect your forms to the API.

In the next chapter, we will switch to the Frontend module, where we will make some small modifications to the API. We will also try to implement a search engine based on Elasticsearch (https://www.elastic.co/products/elasticsearch).