Getting Started with Phalcon

Getting Started with Phalcon

Language: English

Pages: 138

ISBN: 1783287675

Format: PDF / Kindle (mobi) / ePub

Design, implement, and deliver superior web applications using the most popular PHP framework available

About This Book

  • Build impressive web applications with the pace of C, the ease of PHP, and the structure of the MVC framework
  • Use Phalcon Developer Tools to build a scaffolding for your project in minutes
  • Detailed instructions and examples help you build an impressive blog application using Phalcon PHP quickly and easily

Who This Book Is For

If you are a PHP developer with some knowledge and experience of working with PHP and you want to develop stunning web applications easily and quickly, then this book is perfect for you. Learning how to use Phalcon is perhaps the best way to explore the MVC architecture.

What You Will Learn

  • Learn how to work with Phalcon developer
  • Work with Phalcon Developer Tools to generate application skeletons by building your blog application
  • Understand how PHQL is used to interact with databases like MySQL
  • Handle users, authorization, and session data in your Phalcon web application
  • Discover Phalcon's background tasks and the event manager
  • Create custom templates using the Volt engine
  • Manage your data relationships with Phalcon models

In Detail

Phalcon is an open source PHP framework which makes developing with PHP easier and more efficient by combining the speed and performance of C with the unique development features of the MVC architecture. Phalcon is installed as a PHP module so you don't have to download an archive like you do with other frameworks, and building projects is made easier with its controllers and models. The Phalcon Query Language (PHQL) makes this tool even more expressive and clean. Its reputation as the most downloaded PHP tool is definitely justified by its rich offerings. This tutorial provides you with the knowledge you need to build your very own web application with the revolutionary Phalcon framework. This comprehensive guide will start by describing the installation of Phalcon PHP. You will then learn how to build projects and how to further utilize the Phalcon Developer Tools to build models, views, and controllers with the central example of a blog application. Features like PHQL are also explained and implemented effectively throughout the book. The genius in you will be revered by the stunning web application that you will be able to create by reading this book. This handy guide gives you a detailed introduction to using the remarkable Phalcon framework to develop web applications. You will begin by learning how to install the Phalcon module and how to build your own projects. The blog application is the central example throughout the book, and by using Phalcon Developer Tools and web tools, you will create and optimize the basic skeleton for your application with ease and efficiency. You will learn how to add rich features to your blog using Phalcon Views, Models, and Controllers. You will also gain expertise in Phalcon functionalities like the Volt template engine, view helpers, PHQL, and so on. This is an invaluable tutorial for enthusiasts and developers alike who wish to use the fascinating Phalcon PHP framework to rapidly design and develop impressive web applications.

Applied jQuery: Develop and Design

jQuery Pocket Reference

The Essential Guide to HTML5 and CSS3 Web Design (Essential Guides)

Modern Operating Systems (3rd Edition)

The Poorer Nations: A Possible History of the Global South




















users notification of the status of their actions. There are four message types in the flashing messages' services: ErrorSuccessNoticeWarning If we want to set custom classes for our messages when they are served by our view, we can add the following code to the services.php file in config: $di->set('flash', function(){ return new \Phalcon\Flash\Direct(array( 'error' => 'alert alert-error', 'success' => 'alert alert-success', 'notice' => 'alert alert-info', )); }); From then on, any error

directly to you. You can also find all the code used in the book by visting GitHub page Errata Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata,

Injection container. This can be done by adding these lines of code to the bottom of the services.php file located at app/config: $di->set('config', $config); Now, we can open the ControllerBase.php file located at app/controllers and set our title tag with our configuration setting. $this->tag->setTitle($this->config->blog->title); We can create a new function in our PostsController.php file to ping the feed aggregator sites for us. private function sendPings(){ $request = '

browser and refresh the page. You will find the cache file in the cache folder located at app. Inside the file, serialized data will be present, representing the $post object. To learn more about using caching in Phalcon, visit You can also cache data at the model level. The mechanism is the same. Try to access the cached data by a key. Check if there is data. If not, execute the database call to retrieve the data and cache it. Then,

yum install git sudo yum install php-develphp-mysqlnd ccc libtool For OpenSUSE, the command line is as follows: yast2 -igit yast2 -iphp5-pear php5-develphp5-mysqlgcc For Solaris, the command line is as follows: pkginstall git pkg install gcc-45 php-53 apache-php53 Once you have met all the requirements, open up a terminal window and type the following commands to download the Git repository and compile the Phalcon extension: git clone git:// cd

Download sample