Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPixie:
Benchmarking Autoloading vs Combining classes into a single file
Oct 10, 2013 @ 16:48:44

On the PHPixie site there's a new post comparing the overall performance of autoloading versus a single-file approach when it comes to getting the best for your application. They point to the Fat-free Framework as an example of the single file approach.

Thinking about ways of further improving PHPixie I started looking at other projects for inspiration. For example the Fat-Free framework boasts on being contained in a single file. This got me thinking about making a tool for merging all project classes together with vendor libraries into a single for performance boost. MAking such a tool is a fairly trivial task, but still I wanted to be sure it would actually be useful, so I decided to benchmark autoloading classes with composer vs combining them into a single file.

The test script for the benchmarking is included in the post as well as the results from their test runs. In some the XCache extension was used to cache the opcodes, showing a noticeable change from the single-file approach. There's also a measurement of an average framework (autoloaded) request versus the all-in-one method with slightly surprising results. The post also ends with a recommendation for the Composer users out there - using the optional flag to generate a classmap to (slightly) help with autoloading speed.

tagged: benchmark autoload phpixie combined class performance

Link: http://phpixie.com/blog/benchmarking-autoloading-vs-combining-classes-into-a-single-file/

PHPMaster.com:
Create a Poll with PHPixie
Feb 05, 2013 @ 18:53:44

PHPMaster.com has a new tutorial posted showing you how to create a simple poll using the PHPixie PHP framework, a MySQL backend and a little bit of Javascript.

When choosing a PHP framework you need to make sure that it emphasizes features which are the most important to you. If you are looking for something fast, simple, and easy to learn than PHPixie may be a perfect choice. To illustrate the basics of developing with PHPixie we will create a small polling application. By the end of this tutorial you will have a working poll application and an understanding of how easy it is to code projects using PHPixie.

They provide you with all of the parts you'll need - the database table definition, the code for the modules/views/controllers and the Javascript to handle the addition of new options. You can find the full code on the PHPMaster github account.

tagged: poll phpixie framework mvc tutorial javascript

Link:


Trending Topics: