Master Phalcon by implementing hands-on recipes using industry best practices with the Web and CLI interfacesAbout This Book⢠Create quick prototypes with the Phalcon Developer Tools⢠Learn to use the powerful and uniquely efficient Phalcon ORM⢠Reuse codes in real projects Who This Book Is ForIf you are a beginner-to-intermediate Phalcon developer who wants to level up or an advanced user who is seeking some new techniques and insight, then this book is perfect for you. This book will be relevant to you over a long period of time due to the mixed nature of this book in providing both abstract comprehension as well as specific examples meant to be usable in your projects. You will be able to experiment with each new aspect of integration in prebuilt recipes meant to best illustrate each specific feature. This will save you lots of time getting up to speed before attempting to integrate into a real application.What You Will Learn⢠Install the Phalcon extension from both premade packages and source code⢠Create a normal and micro application structure⢠Understand the dispatcher event cycle and create custom plugins⢠Get hands-on using the Phalcon Query Language and ORM ⢠Create flexible views with the Volt template system⢠Leverage Phalcon to prevent common security vulnerabilities⢠Optimize an application with focused solutions⢠Profile and debug an application to get increased reliabilityIn DetailPhalcon is a high-performance PHP framework delivered as a PHP extension. This provides new opportunities for speed and application design, which until recently have been unrealized in the PHP ecosystem.Packed with simple learning exercises, technology prototypes, and real-world usable code, this book will guide you from the beginner and setup stage all the way to advanced usage. You will learn how to avoid niche pitfalls, how to use the command-line developer tools, how to integrate with new web standards, as well as how to set up and customize the MVC application structure. You will see how Phalcon can be used to quickly set up a single file web application as well as a complex multi-module application suitable for long-term projects. Some of the recipes focus on abstract concepts that are vital to get a deep comprehension of Phalcon and others are designed as a vehicle to deliver real-world usable classes and code snippets to solve advanced problems. You'll start out with basic setup and application structure and then move onto the Phalcon MVC and routing implementation, the power of the ORM and Phalcon Query Language, and Phalcon's own Volt templating system. Finally, you will move on to caching, security, and optimization.Style and approachAn easy-to-start guide that provides

- 386 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
eBook - ePub
Phalcon Cookbook
About this book
Trusted byĀ 375,005 students
Access to over 1 million titles for a fair monthly price.
Study more efficiently using our study tools.
Information
Phalcon Cookbook
Table of Contents
Phalcon Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why Subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do itā¦
How it worksā¦
Thereās moreā¦
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Used to Phalcon
Introduction
Getting your IDE to work nicely with Phalcon
Getting ready
How to do itā¦
Ways to enable Phalcon API autocompletion in major IDEs
PhpStorm
NetBeans
Ways to enable Volt syntax highlighting in major IDEs
Netbeans
PhpStorm
Syntax highlighting for Sublime Text or TextMate
Installation via Package Control
Manual installation
How it worksā¦
Creating the application directory structure
Getting ready
How to do itā¦
How it worksā¦
Setting up your request entry point
Getting ready
How to do itā¦
How it worksā¦
Easily loading code on demand
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Setting up your request entry point
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Understanding the request life cycle
Getting ready
How to do itā¦
How it works...
There's moreā¦
See also
2. Structuring Your Projects
Introduction
Choosing the best place for an implementation
Getting ready
How to do itā¦
How it worksā¦
Automation of routine tasks
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Creating the application structure by using code generation tools
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Get more power by adding a middleware between Phalcon and your application
Getting ready
How to do itā¦
Logging critical errors
Changing the description and keywords meta tags depending on your route
Receiving site status reports
Caching pages to reduce processing
Redirecting the user to the login screen if access to the resource is protected
How it worksā¦
There's moreā¦
3. Processing Requests
Introduction
Understanding the default routing strategy for controllers
Getting ready
How to do itā¦
Handling a request along multiple controllers
Getting ready
How to do itā¦
How it worksā¦
Using flexible key-value action parameter pairs
Getting ready
How to do itā¦
How it worksā¦
Restricting controllers by managing end user privileges
Getting ready
How to do itā¦
How it worksā¦
Making unsuccessful requests fail softly
Getting ready
How to do itā¦
How it worksā¦
Creating a server-sent message server
Getting ready
How to do itā¦
How it worksā¦
Creating a Ratchet Websocket server
Getting ready
How to do itā¦
How it worksā¦
4. Dealing with Data
Introduction
Preparation
Applying your own naming conventions to models
Getting ready
How to do itā¦
How it worksā¦
Defining relationships between models
Getting ready
How to do itā¦
How it worksā¦
Using the query builder for complex yet fluent model querying
Getting ready
How to do itā¦
How it worksā¦
Being aware of PHQL capabilities
Getting ready
How to do itā¦
How it worksā¦
Fetching models from raw SQL queries
Getting ready
How to do itā¦
How it worksā¦
Getting the most out of your RDBMS of choice
Getting ready
How to do itā¦
How it worksā¦
Using models as information repositories
Getting ready
How to do itā¦
How it worksā¦
Storing models across multiple databases
Getting ready
How to do itā¦
How it worksā¦
5. Presenting Your Application
Introduction
HTML fragments for AJAX-based applications
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
See also
Splitting your layout structure
Getting ready
How to do itā¦
How it worksā¦
Volt and dynamic view implementations
Getting readyā¦
How to do itā¦
How it worksā¦
Presenting models nicely
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
See also
Reusing view snippets
Getting ready
How to do itā¦
How it worksā¦
Creating your own Volt keywords and methods
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
6. Making Use of Advanced Features
Introduction
Registering dependencies in an effective way
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
See also
Using the DI container on different scopes
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
See also
Unleashing the real power of event driven programming
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Centralizing validations for rock solid business rules
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Complex routing with regular expressions
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Using in-memory session handlers
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Handy persistence for controllers and components
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Transactional controller actions ensuring consistent operations
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Auditing complex user actions with simplicity
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
7. Debugging and Profiling
Introduction
Improved exception reporting
Getting ready
How to do itā¦
How it worksā¦
Logging server messages to the browser console
Getting ready
How to do itā¦
How it worksā¦
Creating a route test suite
Getting ready
How to do itā¦
How it worksā¦
Handling abnormal terminations
Getting ready
How to do itā¦
How it worksā¦
Detecting slow queries
Getting ready
How to do itā¦
How it worksā¦
8. Fine Tuning and Optimizing
Introduction
Handling a database timeout
Getting ready
How to do itā¦
How it worksā¦
Precompiling Volt templates for increased performance and security
Getting ready
How to do itā¦
How it worksā¦
Optimizing PHQL queries
Getting ready
How to do itā¦
How it worksā¦
Caching model metadata and query results for faster performance
Getting ready
How to do itā¦
How it worksā¦
9. High Performance Applications with Phalcon
Introduction
Introduction to asynchronous work by using Beanstalk
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Implementing a three-level cache to increase performance
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Cache view fragments or full pages in Phalcon
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Implementing your own cache adapters
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Cache data to reduce access to database systems
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Creating a PHP extension using Zephir
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
Extending Phalcon using Zephir
Getting ready
How to do itā¦
How it worksā¦
There's moreā¦
See also
10. Securing Your Applications
Introduction
Securing data with encryption
Getting readyā¦
How to do itā¦
How it worksā¦
Securing passwords with hashing
Getting ready
How to do itā¦
How it worksā¦
Preventing Cross-site scripting (XSS) attacks
Getting readyā¦
How to do itā¦
How it worksā¦
Preventing Cross-Site Request Forgery (CSRF) attacks
Getting readyā¦
How to do itā¦
How it worksā¦
Implementing alternative access control lists
Getting readyā¦
How to do itā¦
How it wo...
Table of contents
- Phalcon Cookbook
Frequently asked questions
Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, weāve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere ā even offline. Perfect for commutes or when youāre on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Phalcon Cookbook by David Schissler, Serghei Iakovlev in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Engineering. We have over one million books available in our catalogue for you to explore.