Apache’s mod_deflate module provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network.There are two ways of enabling gzip compression: 1. Using Apache’s mod_deflate 2. Using output bufferingEncoding the output and setting the appropriate headers manually makes the code more portable. Keep in mind that there are hundreds of Linux distribut... Read More »
A Data Access Layer (DAL) is the layer of your application that provides simplified access to data stored in persistent storage of some kind. For example, the DAL might return a reference to an object complete with its attributes instead of a row of fields from a database table.A Data Access Objects (DAO) is used to abstract and encapsulate all access to the data source. The DAO manages the connection with the data source to obtain and store data. Also, it implements t... Read More »
This is a brief explanation on how to add theme support to your Zend Framework application and how to ensure those themes are self-contained, easy to distribute and install.Themes are very powerful and extremely easy to develop. They allow you to quickly switch between layouts and change the look and feel of your application. You can use themes to show, for example, a mobile friendly version of your site.Making a Zend Framework application theme-able is a t... Read More »
Database replication is an option that allows the content of one database to be replicated to another database or databases, providing a mechanism to scale out the database. Scaling out the database allows more activities to be processed and more users to access the database by running multiple copies of the databases on different machines.The problem with monolithic database designs is that they don’t establish an infrastructure that allows for rapid changes in business req... Read More »
Packt Publishing recently sent me a copy of the book “Symfony 1.3 Web Application Development” to review.This book is not a reference guide, but an example driven tutorial that takes you through the process of building Model-View-Controller-based web applications. You will learn how to create and develop a simple online store application. It also covers best practices for better and quicker application development.The book is based on the latest version of ... Read More »
In this post I’ll demonstrate a unit test technique for testing Zend Framework Action Controllers using Mock Objects. Unit testing controllers independently has a number of advantages: 1. You can develop controllers test-first (TDD). 2. It allows you to develop and test all of your controller code before developing any of the view scripts. 3. It helps you quickly identify problems in the controller, rather than problems in one ... Read More »
Zend Framework is one of the most popular and hottest open-source frameworks being used today. The number of books about Web development using Zend Framework has increased over the last couple of years.Packt Publishing sent me a copy of the book Zend Framework 1.8 Web Application Development by Keith Pope to review. I found this book to be a good introduction to the topics that a Zend Framework developer will need to know when developing enterprise Web applications. Th... Read More »
Most ORMs support the concept of dynamic finders. A dynamic finder looks like a normal method invocation, but the method itself doesn’t exist, instead, it’s generated dynamically and processed via another method at runtime.A good example of this is Ruby. When you invoke a method that doesn’t exist, it raises a NoMethodError exception, unless you define “method_missing”. Rails ActiveRecord::Base class implements some of its magic thanks to ... Read More »
Introduction
Before we begin our exploration of the architecture of the Zend Framework (ZF), it is important to discuss how a typical MVC application is built. Examining and understanding the architecture of an MVC Web application allows you to make more contextually sound choices when building your application.
Three-tier Architecture
The three-tier architecture focuses on defining responsibilities betwe... Read More »