Archive | Tutorials RSS feed for this section

Using APC with PHP

October 29, 2010


If you’ve been around PHP for a while, you’ve probably heard about APC, the Alternative PHP Cache. Adding APC to an application usually results in improved application response times, reduced server load and happier users. This article will introduce you to APC and guide you through the process of integrating it with your PHP application.

Continue reading...

Manipulating Configuration Data with Zend_Config

September 28, 2010


When building a Web application, you’ll often find it necessary to save and retrieve user-defined configuration values. Rather than rolling your own code, consider using Zend_Config, which offers a complete API to read and write configuration data in INI, XML and PHP array formats. In this article, I’ll give you a crash course in how Zend_Config works, and show you how you can integrate it into a PHP application.

Continue reading...

Improving Code Quality with Flash Builder 4 and PHPUnit

September 13, 2010

Comments Off on Improving Code Quality with Flash Builder 4 and PHPUnit

Unit testing is becoming a fairly common element of software projects because of its promise of providing better quality to the code base. A unit test is a class or method that exercises your code for purposes of verifying that it functions correctly. During the course of your project, these tests remain as artifacts that can be used over and over again to verify that your code is always working correctly. The higher percentage of your production code you exercise, the higher degree of certainty you can have that your code is doing what it was designed to do.

Continue reading...

Five tips for speeding up Eclipse PDT and Zend Studio

September 8, 2010


Eclipse Helios (3.6) and Zend Studio 7.1 (and above) include a new version of Eclipse PDT, labeled 2.2. This new release uses a new repository for storing code reference information. With these simple tips you can significantly improve the performance of this repository which will speed up code completion, searching for definitions, type hierarchy views and more.

Continue reading...

DataModeler: Simple ORM – Part 1 Models

August 31, 2010


p. DataModeler is an Open Source ORM I began writing at the beginning of the year. I had experience with ActiveRecord, but was dissuaded from using it too often because it was difficult to unit test (at least I felt so). Wanting to learn Test Driven Development better, I decided to create my own small ORM framework: DataModeler. In this article, I’ll go over creating a Model and the different ways you can modify one.

Continue reading...

Creating PDF Documents with Zend Framework

August 30, 2010


PHP comes with a number of options to help developers dynamically generate PDF files from within their applications. The Haru and PDFlib extensions offer a complete API for dynamic PDF generation, and there also exist a number of open-source PHP components that can be used for the same purpose. This article will introduce you to one such component, the Zend_Pdf component that ships as part of the Zend Framework, and illustrate how it can be used to perform sophisticated PDF operations from within a PHP application.

Continue reading...

Building Template-Driven Web Applications with Dwoo (part 1)

July 20, 2010


Most PHP frameworks natively support the separation of interface and business logic. However, if your project is small enough that you don’t need a framework (or if you just don’t like them), you can still achieve the same benefits by using a standalone template engine. In this article, I’ll introduce you to one such engine, which goes by the rather unique name of Dwoo.

Continue reading...

PHP remote debugging with Xdebug and Eclipse PDT

June 21, 2010


Debugging is an invaluable part of software development. I find it very useful in a variety of situations, for instance when I want to understand how a routine works or I need to get rid of a bug that is not exactly easy to fix just by reading the code.

My main goal in this post is to show you how to set your debugging environment with Eclipse PDT and Xdebug.

Continue reading...

Zend Framework Tutorial Series: Part 2 – Debugging your application

June 17, 2010

1 Comment

Continuing with the tutorial series, we will see how to debug the application we created in the #1 series of the tutorials.

In case you missed it, in our first tutorial, we have seen how to structure and code a brand new ZF application to use modules (you can also view that article here)

Debugging include easy to use methods of printing data on the screen, including ZFDebug Toolbar in order to manage all errors and queries, using the logger to log messages to Firebug, using a simple debug function that will place debug messages in your ZFDebug Toolbar, in a special Debug panel, using a redirect debug function in order to see what is happening during your requests, using redirect in a Controller plugin.

Continue reading...

Zend Framework Module Based Application

June 7, 2010


In this first article of the series, we will discuss about the best way (in my opinion) to structure your Zend Application in order to have maximum flexibility but also a good defined structure of the classes/files.

These will be a series of tutorials which are meant to show you or guide you through developing a complex application with Zend Framework 1.10.

The series consists of the following parts:

a) Setting up a module based application
b) Setting up helper plugins, methods & debugging with ZFDebug
c) Setting up a login page and signup page with captcha
d) Setting up OpenID to login/create account
e) Setting up an API to create/login an account
f) Improving performance implementing Zend Cache

Continue reading...