<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Modules</title>
	<atom:link href="http://akrabat.com/2007/02/03/modules/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/2007/02/03/modules/</link>
	<description>Developing PHP and XUL Software in the Real World</description>
	<pubDate>Thu, 28 Aug 2008 14:03:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: gog</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-20959</link>
		<dc:creator>gog</dc:creator>
		<pubDate>Thu, 03 Apr 2008 00:37:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-20959</guid>
		<description>Hi,

I'm struggling with the some problem. I am currently planning my CMS, and for now I think I am going to stick as well with just the two module - site &#38; admin.

The thing I am wondering is what to do with some of the directives in my bootstrap file.

I am initializing Zend_Layout MVC helper with something like this:

Zend_Layout::startMvc(array('layoutPath' =&#62; ROOT_DIR.'/application/views/layouts')); 

Which works great if you are nor using module.

As far as I can tell, there is only one right way to do it, and that is to write your own front controller plugin that will set the appropriate path, see http://www.nabble.com/Setup-Zend_Layout-based-on-module-td16036883.html

There is some more insight in a comment from Matthew Weier O'Phinney on http://framework.zend.com/wiki/display/ZFPROP/Zend_Layout#Zend_Layout-3.ComponentRequirements%2CConstraints%2CandAcceptanceCriteria that kind of clarifies why this Zend_Layout isn't coupled with a rewrite router.

But, I would still be very happy if I could specify layout folder in the same way I can specify a modular structure by passing an array of modules/paths.

Do you maybe have some other ideas?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I'm struggling with the some problem. I am currently planning my CMS, and for now I think I am going to stick as well with just the two module - site &amp; admin.</p>
<p>The thing I am wondering is what to do with some of the directives in my bootstrap file.</p>
<p>I am initializing Zend_Layout MVC helper with something like this:</p>
<p>Zend_Layout::startMvc(array('layoutPath' =&gt; ROOT_DIR.'/application/views/layouts')); </p>
<p>Which works great if you are nor using module.</p>
<p>As far as I can tell, there is only one right way to do it, and that is to write your own front controller plugin that will set the appropriate path, see <a href="http://www.nabble.com/Setup-Zend_Layout-based-on-module-td16036883.html" rel="nofollow">http://www.nabble.com/Setup-Zend_Layout-based-on-module-td16036883.html</a></p>
<p>There is some more insight in a comment from Matthew Weier O'Phinney on <a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Layout#Zend_Layout-3.ComponentRequirements%2CConstraints%2CandAcceptanceCriteria" rel="nofollow">http://framework.zend.com/wiki/display/ZFPROP/Zend_Layout#Zend_Layout-3.ComponentRequirements%2CConstraints%2CandAcceptanceCriteria</a> that kind of clarifies why this Zend_Layout isn't coupled with a rewrite router.</p>
<p>But, I would still be very happy if I could specify layout folder in the same way I can specify a modular structure by passing an array of modules/paths.</p>
<p>Do you maybe have some other ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DamionKutaeff</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-20738</link>
		<dc:creator>DamionKutaeff</dc:creator>
		<pubDate>Sun, 23 Mar 2008 13:45:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-20738</guid>
		<description>Hello everybody, my name is Damion, and I'm glad to join your conmunity, 
and wish to assit as far as possible.</description>
		<content:encoded><![CDATA[<p>Hello everybody, my name is Damion, and I'm glad to join your conmunity,<br />
and wish to assit as far as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-10462</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Wed, 06 Jun 2007 05:59:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-10462</guid>
		<description>Patrick,

Not yet. I haven't had time, so have been using two modules: default and admin.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Patrick,</p>
<p>Not yet. I haven't had time, so have been using two modules: default and admin.</p>
<p>Regards,</p>
<p>Rob&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Nijs</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-10447</link>
		<dc:creator>Patrick Nijs</dc:creator>
		<pubDate>Tue, 05 Jun 2007 09:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-10447</guid>
		<description>[quote]
Matthew,

Putting the admin within the module keeps everything together which is the biggest win. I quite like the idea of using a rewrite rule so that I can use URLs of the form /admin/{module}/{controller}/{action}. 

I’ll definitely have to play with this layout. 
[/quote]

Have you figured out how you should write this rewrite rule?
I am currently implementing an admin-subdirectory too in my controllers directory, and /module/admin/controller/action is just more beautiful than /module/admin_controller/action...</description>
		<content:encoded><![CDATA[<p>[quote]<br />
Matthew,</p>
<p>Putting the admin within the module keeps everything together which is the biggest win. I quite like the idea of using a rewrite rule so that I can use URLs of the form /admin/{module}/{controller}/{action}. </p>
<p>I’ll definitely have to play with this layout.<br />
[/quote]</p>
<p>Have you figured out how you should write this rewrite rule?<br />
I am currently implementing an admin-subdirectory too in my controllers directory, and /module/admin/controller/action is just more beautiful than /module/admin_controller/action&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-9636</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Mon, 30 Apr 2007 22:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-9636</guid>
		<description>Ok, I figured out how to access my views by using the 

$view-&#62;addScriptPath('../application/moduleLocation/views');
and executed this in my index.php

I see the post by Kyle
"If I want different models with each module then I have a Zend_Controller plugin that adds to the include path using something like: “..app/”.$request-&#62;getModuleName().”/models/”
"

I suppose there isn't a getModuleName() function already?

I'll work on this.  Thanks for your comments.</description>
		<content:encoded><![CDATA[<p>Ok, I figured out how to access my views by using the </p>
<p>$view-&gt;addScriptPath('../application/moduleLocation/views');<br />
and executed this in my index.php</p>
<p>I see the post by Kyle<br />
"If I want different models with each module then I have a Zend_Controller plugin that adds to the include path using something like: “..app/”.$request-&gt;getModuleName().”/models/”<br />
"</p>
<p>I suppose there isn't a getModuleName() function already?</p>
<p>I'll work on this.  Thanks for your comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-9585</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Thu, 26 Apr 2007 21:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-9585</guid>
		<description>By the way, I'm using version .9.0</description>
		<content:encoded><![CDATA[<p>By the way, I'm using version .9.0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-9584</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Thu, 26 Apr 2007 21:54:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-9584</guid>
		<description>I think I missed something here.  When I'm trying to access the views and models, do I need to put their path somewhere?  What I really want is to automatically detect the view/model locations associated with the controller in the module.

Any thoughts?</description>
		<content:encoded><![CDATA[<p>I think I missed something here.  When I'm trying to access the views and models, do I need to put their path somewhere?  What I really want is to automatically detect the view/model locations associated with the controller in the module.</p>
<p>Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-9360</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Sun, 15 Apr 2007 18:48:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-9360</guid>
		<description>Kyle,

Fixed the pre tag :)

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Kyle,</p>
<p>Fixed the pre tag :)</p>
<p>Regards,</p>
<p>Rob&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-9358</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Sun, 15 Apr 2007 17:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-9358</guid>
		<description>That got boned. My pre tags were stripped.</description>
		<content:encoded><![CDATA[<p>That got boned. My pre tags were stripped.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://akrabat.com/2007/02/03/modules/#comment-9357</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Sun, 15 Apr 2007 17:56:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2007/02/03/modules/#comment-9357</guid>
		<description>Some people have mentioned how to deal with models, but as far as I can tell ZF never automatically detects your model directory in the same way that it can with views anyway (although that only works with initView() from inside a controller and I don't know if I even like it).

If I want different models with each module then I have a Zend_Controller plugin that adds to the include path using something like: "..app/".$request-&#62;getModuleName()."/models/"

If you want to use shared models then just setup a fixed dir directly in the bootstrap as it's done in Rob's tutorial. Then maybe you could even start "modularising" your models? Your Admin_News model would extend Deafault_News and so on.

&lt;pre&gt;
app/
    cfg/
    logs/
    models/
        admin/
        default/
    modules/
        admin/
            controllers/
            views/
        default/
            controllers/
            views/
    tmp/
lib/
    Zend/
www/
    index.php
&lt;/pre&gt;

I'm not really sure where to put things like headers and footers if you have two or more modules using the same ones. Right now they're just in the modules directory but it's not neat.

There will never be a directory structure to suit everyone or even one to suit every project by the same person.</description>
		<content:encoded><![CDATA[<p>Some people have mentioned how to deal with models, but as far as I can tell ZF never automatically detects your model directory in the same way that it can with views anyway (although that only works with initView() from inside a controller and I don't know if I even like it).</p>
<p>If I want different models with each module then I have a Zend_Controller plugin that adds to the include path using something like: "..app/".$request-&gt;getModuleName()."/models/"</p>
<p>If you want to use shared models then just setup a fixed dir directly in the bootstrap as it's done in Rob's tutorial. Then maybe you could even start "modularising" your models? Your Admin_News model would extend Deafault_News and so on.</p>
<pre>
app/
    cfg/
    logs/
    models/
        admin/
        default/
    modules/
        admin/
            controllers/
            views/
        default/
            controllers/
            views/
    tmp/
lib/
    Zend/
www/
    index.php
</pre>
<p>I'm not really sure where to put things like headers and footers if you have two or more modules using the same ones. Right now they're just in the modules directory but it's not neat.</p>
<p>There will never be a directory structure to suit everyone or even one to suit every project by the same person.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
