Page 1 of 1
Zend_Application
Posted: Tue Jul 07, 2009 6:18 pm
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
tnx
Re: Zend_Application
Posted: Wed Jul 08, 2009 9:14 am
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.
Re: Zend_Application
Posted: Wed Jul 08, 2009 5:57 pm
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 ...
Re: Zend_Application
Posted: Wed Jul 08, 2009 7:44 pm
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.
Re: Zend_Application
Posted: Wed Jul 08, 2009 9:24 pm
by explicit
Hey thanks for the example! I think that would help me a litle...
Re: Zend_Application
Posted: Thu Jul 09, 2009 9:49 am
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.