Zend_Application

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
explicit
Forum Newbie
Posts: 4
Joined: Thu Mar 26, 2009 5:54 pm

Zend_Application

Post by explicit »

Is there somebody who can globaly describe this class, just in short terms, and how to use it...
I mean why do we actually need this new class(why cant use new Zend 1.8 in old fashion), and how we use Zend_Config or Zend_Registry with it etc.

Sry for bad eng heh :roll:

tnx
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Zend_Application

Post by alex.barylski »

Probably following in the footsteps of existing proven frameworks, like most Window'ing frameworks (MFC, OWL, wxWidgets, Qt) all have an application class that is usually a singleton and represents the instance of an application, frequently containing things like registries, startMain() which does generic bootstrapping, etc.
explicit
Forum Newbie
Posts: 4
Joined: Thu Mar 26, 2009 5:54 pm

Re: Zend_Application

Post by explicit »

Thx PCSpectra..
So for example, should we initialize Zend_Registry in Zend_Application ? Or is this maybe done by default ?

I mean how we do something like this in Zend 1.8:

Code: Select all

 
//code is from old bootstrap file (not  Bootstrap class)
$config = new Zend_Config_Ini('...');
$registry = Zend_Registry::getInstance();
$registry->set('config',$config);
Sry if this sounds too noobish ...
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Zend_Application

Post by alex.barylski »

I don't use Zend_Application myself...but I have very generic registry initialization done in the bootstrap. Initialzing sessions, etc.

You might want to take a peak into Digitalus CMS which is built using Zend Framework...maybe worth a peak.
explicit
Forum Newbie
Posts: 4
Joined: Thu Mar 26, 2009 5:54 pm

Re: Zend_Application

Post by explicit »

Hey thanks for the example! I think that would help me a litle...
Theory?
Forum Contributor
Posts: 138
Joined: Wed Apr 11, 2007 10:43 am

Re: Zend_Application

Post by Theory? »

PCSpectra wrote:I don't use Zend_Application myself...but I have very generic registry initialization done in the bootstrap. Initialzing sessions, etc.

You might want to take a peak into Digitalus CMS which is built using Zend Framework...maybe worth a peak.
The guy who made Digitalus wrote a book that comes out real soon wherein he basically teaches you how to build a CMS using ZF.
Post Reply