PHPDeveloper.orghttp://www.phpdeveloper.org
Up-to-the Minute PHP News, views and communityen-usTue, 31 Mar 2015 15:50:37 -050030http://www.phpdeveloper.org/news/21762http://www.phpdeveloper.org/news/21762
The SitePoint PHP blog has a tutorial posted for the Heroku users out there showing you how to install custom PHP extensions on the service as a part of your deployment. Heroku is a platform-as-a-service hosting provider that allows for flexibility in the architecture of your systems and spin up/tear down to happen easily and on demand.

In this tutorial, we'll learn how to install custom extensions on Heroku. Specifically, we'll be installing Phalcon.

He walks you through creating an account on Heroku first and getting the Heroku toolbelt system installed for your operating system. He then starts in on the Phalcon (a C-based PHP framework) installation including all needed supporting packages/extensions. He uses the PHP buildpack and creates a shell script that is executed when the deployment happens. He includes the commands and configuration to handle the deployment and test the resulting installation.

Link: http://www.sitepoint.com/install-custom-php-extensions-heroku/]]>Mon, 29 Sep 2014 14:24:56 -0500http://www.phpdeveloper.org/news/21103http://www.phpdeveloper.org/news/21103
Rami Alnawas has posted an interesting tutorial for the Phalcon users out there showing one way you can unit test your models. It's based on his own experience with the framework in a current project.

My first contribution to the PHP community in general, and Phalcon folks in particular, was the introduction of MVC Functional Testing with PHPUnit, this meant that Applications developed using Phalcon Framework could be unit tested by requesting a url then asserting that the response is handled by a specific action within the controller. [...] To date, my latest addition is an example of how to unit test code that utilises Phalcon models, mainly the various static find methods. The code is available on github and the coverage report is coveralls.io.

He shows it at work, creating a simple "Popup" model and a facade to help with making instances for testing. He also includes the code to test this facade, checking the results of methods like "fetchall", "select" and "execute".

Link: http://www.rami.me.uk/how-to-unit-test-code-with-phalcon-mvc-models]]>Tue, 29 Apr 2014 11:57:39 -0500http://www.phpdeveloper.org/news/20934http://www.phpdeveloper.org/news/20934
On the SitePoint PHP blog today Bruno Skvorc has written up the first part of his look at installing Ghost with Nginx and Phalcon on his hosting provider. This is the first post in his "showdown" series of trials on various CMS systems.

You might be wondering why I'm writing about Ghost on a PHP oriented channel - this series will be a showdown of all the various PHP based CMS' I can find, benchmarked against each other and against Ghost, as I look for the next best alternative. Since my DigitalOcean droplet already runs Nginx as a reverse proxy for the blog, I'll also be deploying all the CMS' on that same installation, each on its own subdomain.

He walks you through the whole process from start to finish:

Installing PHP on Nginx

Setting up a virtual host on a subdomain

Installing Phalcon

Link: http://www.sitepoint.com/cms-showdown-nginx-ghost-php-phalcon]]>Thu, 20 Mar 2014 12:58:18 -0500http://www.phpdeveloper.org/news/20855http://www.phpdeveloper.org/news/20855
On the SitePoint PHP blog Bruno Skvorc has posted a new tutorial showing you how to get PHP extensions installed on Nitrous.io, an online environment combining an IDE and PaaS hosting.

Inspired by a comment on my previous article, I realized Nitrous was still a bit too complicated to customize properly. In this tutorial, we'll glide through installing cURL and Phalcon on a Nitrous.io PHP box.

He continues on from his previous article and shows how to detect cURL support and how to build it from the PHP source into an extension. He helps you get the source for the older PHP version Nitrous.io has installed and the commands you'll need to build the extension. With it installed and enabled in the php.ini, he also installs the Phalcon extension.

Link: http://www.sitepoint.com/installing-php-extensions-nitrous-io]]>Mon, 03 Mar 2014 11:45:22 -0600http://www.phpdeveloper.org/news/20712http://www.phpdeveloper.org/news/20712
The SitePoint blog has posted a new tutorial by author Thien Tran Duy showing you how to send emails with Swift through a Phalcon-based application via Gmail.

Today, sending emails is considered the basic functionality of any web application. Usually, an email is sent to notify the user of some kind of activity that has taken place on the website, such as when he registers the account, updates information, or when new friends have been found. In this short tutorial I'll show you how to send emails via Gmail quickly from within a Phalcon sample application. You can download the full source code from GitHub. We'll be building functionality which lets us send a confirmation email, and reacts to the click of said confirmation email.

The tutorial walks you through the entire process from start to finish, complete with code examples. It helps you set up the Phalcon project, modify the configuration, set up models and create the basic controller. You'll need to either install Swift via Composer or by just adding the files to the vendor directory though. The script uses this library to send the message, store the hash in an "email_confirmations" table and verify it once the user returns.

Link: http://www.sitepoint.com/sending-confirmation-emails-phalcon-swift/]]>Wed, 29 Jan 2014 12:09:13 -0600http://www.phpdeveloper.org/news/20664http://www.phpdeveloper.org/news/20664
The SitePoint PHP blog has posted a new article about the latest version of Phalcon (v2.0) and an example of it in use.

He introduces this new version, noting that this is a full rewrite of the framework in a new language, Zaphir (a derivative of PHP). He then gets into using Zephir to make an example extension, complete with a screencast and sample code. He finishes off the post with some information about how you can contribute back to the project and help increase its test coverage.

Link: http://www.sitepoint.com/phalcon-2-0-alpha-landing]]>Mon, 20 Jan 2014 09:42:37 -0600http://www.phpdeveloper.org/news/20595http://www.phpdeveloper.org/news/20595
On the SitePoint PHP blog today Bruno Skvorc goes through the full installation process around getting Nginx and Phalcon up and running on an OpenShift instance.

In this tutorial, adapted from the step by step trial and error procedure of duythien, and with his full blessing, we'll cover the installation procedure of Phaclon on yet another environment: OpenShift. The procedure is bloody - OpenShift does not make it easy for us to deploy custom environments - but the rewards are well worth it.

As he mentioned, it's not the easiest process, but he's laid it all out there to help make it simple for you. He's broken it up into a number of different steps:

Setting up your OpenShift account (using the free tier)

Creating and cloning an application

Cloning a helper repo with a ".openshift" file included

Grabbing the latest Phalcon and making the config file to set it up correctly

Configuring Nginx

Link: http://www.sitepoint.com/nginx-php5-5-phalcon-openshift]]>Thu, 02 Jan 2014 10:43:42 -0600http://www.phpdeveloper.org/news/20583http://www.phpdeveloper.org/news/20583
On the SitePoint PHP blog Bruno Skvorc has posted what could be "best PHP frameworks for 2014". The results were compiled from the feedback of a survey they recently took during the past week.

We asked these questions to decide which frameworks deserve our attention in 2014 the most. The prerequisite for participation was merely having experience in more than one framework, seeing as it's pointless to ask someone what their favorite bar was if they've only drunk in one place.

In the end, the results showed some interesting trends in the choice of PHP framework and their overall popularity. The three topping the popularity charts were (in this order) Laravel, Phalcon then Symfony2. Other mainstay frameworks like Zend Framework, Yii and CodeIgniter were ranked lower in the list. He goes through the results and provides a bit of background on the feedback, including how much of the original data had to be filtered out for one reason or another. He also includes a list of "noteworthy answers" from various folks responding to the survey. His personal choice? Phalcon because of it's overall performance and the community around it.

So which framework seems most promising for 2014? Which should you switch to in the new year? Is it worth it? That's entirely up to you - as always, it depends on your comfort level, the project requirements, and time you have to study new things.

Link: http://www.sitepoint.com/best-php-frameworks-2014/]]>Mon, 30 Dec 2013 10:29:45 -0600http://www.phpdeveloper.org/news/19918http://www.phpdeveloper.org/news/19918
On PHPMaster.com there's a new tutorial talking about Phalcon, yet another PHP framework to add to the now long list. There's something different about this one, though. Phalcon sets itself apart by having its base code be inside an installable PHP module.

There's a wide offering of PHP frameworks, from full-stack frameworks containing ORMs, validation components, and loads of HTML helpers, to micro frameworks which go little beyond offering routing functionality. They all claim to be special, either with beautiful syntax, high speed, or good documentation. One of those frameworks is Phalcon. But Phalcon really is quite different compared to the other frameworks; it isn't just another package that you download, rather it's a PHP module written in C. In this article we'll take a brief look at what Phalcon looks like and what makes it so special.

They introduce the framework a bit and include some basic benchmarks (requests per second and time per request) showing the major advantage being a native module has for Phalcon. He then gets into the usage of it - setting up mod_rewrite, creating the project structure and creating the MVC scripts. There's also a brief mention of the Phalcon query language that can be used to interact with the database.

Link: http://phpmaster.com/phalconphp-yet-another-php-framework]]>Tue, 30 Jul 2013 09:31:46 -0500http://www.phpdeveloper.org/news/19744http://www.phpdeveloper.org/news/19744
On PHPMaster.com today there's a new tutorial that talks about running PHP applications on the Google App Engine and makes a suggestion for an extension-based framework (Phalcon) that might work well there...if they allowed you to enable extensions.

While a full discussion of GAE is outside the scope of this article, suffice it to say that GAE is neither a private server nor a virtual private server - it's a platform. As such, it has some limitations. You cannot simply install extensions in it, nor can you write to disk freely. You cannot alter resource limits on your own and you cannot install custom system tools. It isn't your average Linux box; it's a fully managed colossal environment for enterprise-level applications.

He talks some about the transition over from a typical hosting solution to the Google App Engine platform and points out someresources that can help you get started. He also restates the need for extension configuration on the platform, noting that some extensions needed for some common functionality in PHP frameworks (or the framework itself in the case of Phalcon) can't be enabled or used.