Learning Phalcon PHP

Learn Phalcon interactively and build high-performance web applications

Learning Phalcon PHP

Learning
Calin Rada

Learn Phalcon interactively and build high-performance web applications
$39.99
$49.99
RRP $39.99
RRP $49.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos โ€“ youโ€™ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783555093
Paperback328 pages

About This Book

  • Learn how to install and configure Phalcon PHP on your server
  • Develop a fully functional multi-module application with Phalcon PHP
  • A step-by-step guide with in-depth coverage of Phalcon and best practices

Who This Book Is For

If you are a web developer and want to build effective web applications with Phalcon PHP, then this book is ideal for you. The book does not assume detailed knowledge of PHP frameworks.

Table of Contents

Chapter 1: Getting Started with Phalcon
Installing the required software
Installing Phalcon
The Apache and Nginx configuration files
Understanding the framework's internals
Summary
Chapter 2: Setting Up the MVC Structure and the Environment for Our Project
What is MVC?
The MVC structure
Creating the structure for our project
Creating the configuration file and the Bootstrap
Preparing the initial DI interface and the router
Using the router component in a module
Create the base layout
Summary
Chapter 3: Learning Phalcon's ORM and ODM
The main differences between SQL and NoSQL databases
Connecting to the database
ORM/ODM operations (create, update, delete, transactions, and validations)
CRUD operations using ORM
Using PHQL
Using raw SQL
Database transactions
ODM/MongoDB
ORM โ€“ drawbacks and caching
Summary
Chapter 4: Database Architecture, Models, and CLI Applications
The database architecture
Models
Summary
Chapter 5: The API Module
Using APIs โ€“ recommended practices
Enabling SSL on our local machine
Creating the module structure
Writing a fully functional REST module with Phalcon PHP
Securing an API
Documenting the API
Summary
Chapter 6: Assets, Authentication, and ACL
Assets management
Developing an authentication system
Securing the application using the ACL component
Summary
Chapter 7: The Backoffice Module (Part 1)
Editing the main layout
Cleaning the Core module
Hashtag CRUD
Category CRUD
Summary
Chapter 8: The Backoffice Module (Part 2)
User CRUD
User templates
Article CRUD
Summary
Chapter 9: The Frontend Module
The Frontend layout and basic functionality
Modifying BaseController.php
Implementing ElasticSearch
Implementing MongoDB
Summary
Chapter 10: Going Further
Uploading files with Phalcon
Using the Annotation router
Summary

What You Will Learn

  • Compile and install Phalcon from source code
  • Set up an MVC project and learn how to use the Dependency Injection (DI), configuration, and routing
  • Get to grips with Phalcon's ORM, ODM, validation and caching, and generate models using Phalcon Developer Tools
  • Create a command-line application from scratch
  • Write a fully functional REST module with Phalcon PHP
  • Use Volt as template engine to create your first views
  • Understand how session works and learn how to implement an authentication system

In Detail

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.

Authors

Table of Contents

Chapter 1: Getting Started with Phalcon
Installing the required software
Installing Phalcon
The Apache and Nginx configuration files
Understanding the framework's internals
Summary
Chapter 2: Setting Up the MVC Structure and the Environment for Our Project
What is MVC?
The MVC structure
Creating the structure for our project
Creating the configuration file and the Bootstrap
Preparing the initial DI interface and the router
Using the router component in a module
Create the base layout
Summary
Chapter 3: Learning Phalcon's ORM and ODM
The main differences between SQL and NoSQL databases
Connecting to the database
ORM/ODM operations (create, update, delete, transactions, and validations)
CRUD operations using ORM
Using PHQL
Using raw SQL
Database transactions
ODM/MongoDB
ORM โ€“ drawbacks and caching
Summary
Chapter 4: Database Architecture, Models, and CLI Applications
The database architecture
Models
Summary
Chapter 5: The API Module
Using APIs โ€“ recommended practices
Enabling SSL on our local machine
Creating the module structure
Writing a fully functional REST module with Phalcon PHP
Securing an API
Documenting the API
Summary
Chapter 6: Assets, Authentication, and ACL
Assets management
Developing an authentication system
Securing the application using the ACL component
Summary
Chapter 7: The Backoffice Module (Part 1)
Editing the main layout
Cleaning the Core module
Hashtag CRUD
Category CRUD
Summary
Chapter 8: The Backoffice Module (Part 2)
User CRUD
User templates
Article CRUD
Summary
Chapter 9: The Frontend Module
The Frontend layout and basic functionality
Modifying BaseController.php
Implementing ElasticSearch
Implementing MongoDB
Summary
Chapter 10: Going Further
Uploading files with Phalcon
Using the Annotation router
Summary

Book Details

ISBN 139781783555093
Paperback328 pages
Read More