Archive | Tutorials RSS feed for this section

Improving Code Quality with Flash Builder 4 and PHPUnit

September 13, 2010

Comments Off

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...

Getting Started with MongoDB and PHP

June 7, 2010


Schema-less database systems like MongoDB are quickly becoming popular with Web developers on account of their flexibility, simplicity and easy integration with modern Web technologies such as JSON. This article introduces you to MongoDB and shows you how to install it, set up an initial data store, and access it with PHP.

Continue reading...

Mihai Crolan: Debugging Flex and PHP

May 4, 2010

Comments Off

From Mihai Corlan’s blog:

bq. As your projects grow in size and more people get involved you’ll find yourself fixing more and more bugs. When this happens, one of the best friends a developer has is the debugger. In this paper, I’ll talk about some of the workflows and tools you can use to debug Flex and PHP projects.

bq. If you want to try the steps outlined here for yourself, you’ll need Flash Builder 4, a PHP and MySQL server (MAMP or WAMP will do just fine), Eclipse PDT, and XDebug.

Continue reading...