Alex Tech Adventures The webs best tutorials!

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 12345678...10
TOPIC: Modular application
#168
Re:Modular application 2 Years, 2 Months ago Karma: 16
That is so clever!
Code:


$layout->setLayout($request->getModuleName()) 
              ->setLayoutPath(APPLICATION_PATH . '/modules/' . 
                $request->getModuleName() . '/layouts'); 


Thanks, skatan, for sharing
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
Last Edit: 2009/11/12 12:54 By alexanderrv.
The administrator has disabled public write access.
 
#171
Modular application 2 Years, 2 Months ago Karma: 1
I'm glad to make this site even better, great tutorials!

But I still have some efficent performence that I searching for a solution:
I don't know if only my set up that makes all the modules bootstrap-files run for every hit:
The admin-module bootstrap is runing even if I hit the root: www.domain.com
I would like to put my ACL-settings for admin into the admin bootstrap as the same as with layout I see it ineffective to run ACL-settings for admin when 99,99% of all hits is not a admin.

Or I'm thinking wrong and maybe insecure..??

Looking forward for a discussion
Skatan
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#172
Re:Modular application 2 Years, 2 Months ago Karma: 16
Unfortunately that is the way Zend_Application works. ZF needs to set up the full environment before it can do any processing of MVC. ZF does this through bootstrap files, hence, it looks at every bootstrap file there is. Due to PHP's unpersistent nature (script does not stay in memory but 'dies') it has to do that on every request. That's the price we have to pay for scripting languages like PHP which are unlike full application servers (like ColdFusion) that store application wide data in memory for long term, instead of per request.

However, I am not sure if ZF works the same way on Zend Server as it does on Apache/PHP. I know it has better integration with Zend_Cache but I never got around to play with it so I cannot tell if it is capable of storing application state in memory like, for example, ColdFusion or JSP.
Can someone give an answer to that??

What I've seen many devs do is to create a separate application altogether for "unrelated" section. For example, admin is very often not a module but a whole different ZF app. Not sure i like that style of organization but it cuts down on security issues(less room for mistakes in setting up complex ACL) and better performance since it does not "interfere" with other parts.
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
Last Edit: 2009/11/13 16:28 By alexanderrv.
The administrator has disabled public write access.
 
#175
Modular application 2 Years, 2 Months ago Karma: 1
Skatan
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#191
Modular application 2 Years, 2 Months ago Karma: 1
Is it possible to set a ACL-rule for the hole "default"-module so that I don't need to write rules each and every page/constructor in the Bootstrap? Or how to I make it dynamic, so users could create new pages without consulting with admin for bootstrap-work each time?
Skatan
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#207
Re:Modular application 2 Years, 2 Months ago Karma: 16
At the moment thats the only way to go
In passing I've seen some rumors that someone is playing around with the ability to have the whole deal (controller, navigator, acl, action, module etc.) generated in one go from a single configuration in UML or something. Not sure, cannot find it again.
It would be awesome if someday there would actually be a tool that does a lot of this module and ACL work automatically in a more rapid application development like other framework and languages have.
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
The administrator has disabled public write access.
 
Go to topPage: 12345678...10
Moderators: alexanderrv
You are here: Home Forum

Statistics

Members : 1388
Content : 42
Web Links : 1
Content View Hits : 190530

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 34 guests online