I'm looking for solution how to get rid of including "application.php" and at the same time i want to have possibility to use modular structure in Zend Framework. APPLICATION loads too many unnecessary and excess things (if Zend Framework is being used not by 100%). Working with high-loaded project i found that it's good to disable Zend Autoloader and include own-made file "ZendLight_small.php" (where i put all all missing classes/functions which are being required by Zend Framework) for increasing quantity of possible successful calls. (with Zend Autoloader - 40 calls per second (by JMeter), with ZendLight_small.php - 60 cps.)
...
I also wanna get rid of next thing (i dont need bootstrap structure also):
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
->run();
...
So, is it somehow possible? I just don't need to use so much Zend functions, but total sum of included files (with Zend Application) is a mess.
Thanks beforehand.
I have been using Zend components for close to 6 months now, but have never used Zend_Application.
I guess the main reason is I mostly develop console scripts, and use the components as helpers. Zend_ classes are part of the applications, not the application. I start with a minimal bootstrap file that defines the script constants. Then I initialize Zend_Autoload and from then on have access to whatever I feel like in Zend. Last initialisation step but not least, I have a settings file that is just a plain array returned and loaded in Zend_Config.
These 3-4 lines of very lightweight code have made my life so much better, you would not believe. I mostly rely on Zend_logger, Zend_DB and its friends Zend_Table, Zend_TableRowset etc .. and Zend_Mail. Loaded only if needed.
Although I only use a very small subset of the framework, it has greatly cut down my developpment time and most important: the result is way easier to maintain.