Zend Framework: building complete application using Zend_Session, Zend_Db and Zend_Auth

4 Jul

Sorry this blog is deprecated. you can read full article here.


Well, I have written lots of separate article on Zend Framework. Hopefully most of folk out there searching for valuable help may have gotten some from my articles.
This time my objective is to share everything with you, from basic configuration till to building complete Zend Framework application.
This article will cover
1. How to make initial configuration.
2. How to use Zend_Auth for authentication
3. Using Zend_Session for handling sessions
4. What are models and how to create them
5. Using Zend_Db to handle backend database for storing valuable information.
And much more.
So let’s get started.
1. Creating directory structure and making initial configuration
Zend Framework is based on MVC design patterns. MVC stands for Model, View, Controller. A simple definition of MVC design pattern is to separate business logic from presentation logic.
In order to work with Zend Framework MVC design pattern, you’ll need to make necessary directory structure. There are various ways of making directory structure, I, however will use the most easier to create and understand structure.

The structure I created is.


On the top level we have html_root directory, containing application directory, library, js, css and images. It also contain index.phtml called our bootstrap file. This file contain all our configuration code. Further more application directory contain controller, models forms and views directories. Library directory contains Zend components. Js contain all our js files, css contains css files and images contains all images used in our application.


6 Responses to “Zend Framework: building complete application using Zend_Session, Zend_Db and Zend_Auth”

  1. Ravil July 4, 2009 at 6:37 pm #

    Zend_Loader::registerAutoload() is deprecated, why you still use it?

  2. Faheem Abbas July 5, 2009 at 7:56 am #

    Yes, I know its deprecated in 1.8, but i am currently using 1.7. I already have written about it in one of my article.
    Anyhow, Thanks for mentioning.

  3. Thomas M July 5, 2009 at 10:09 am #

    Thanks for the Article. It’s nice to see articles with a full walk through (even if using depreciated parts of ZF 1.7). I’d like to see more on ZF 1.8 and the changes it brought.

  4. Chris K September 10, 2009 at 12:46 am #

    You probably dont want to hear this but, any ideas on when you’re be moving to ZF 1.9? This is such as useful article but with version changes aricles can be really difficult for newbies to learn; hmm is this a typo, my code, or a new version change 😦

  5. Erick Martinez October 7, 2009 at 11:39 pm #

    I think this is outdated, for ZF 1.9 you should take a look at http://framework.zend.com/manual/en/zend.application.quick-start.html

  6. ravi November 4, 2009 at 4:54 pm #

    nice tutorials..



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: