<?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: Directory Structures (again!)</title>
	<atom:link href="http://akrabat.com/2006/09/15/directory-structures-again/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/2006/09/15/directory-structures-again/</link>
	<description>Developing PHP and XUL Software in the Real World</description>
	<pubDate>Thu, 21 Aug 2008 23:00:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5983</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Wed, 25 Oct 2006 13:13:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5983</guid>
		<description>Hi JMF,

We're on CVS :)

If we moved to SVN, we'd use externals. Though we'd probably create a bash script that set up the correct externals on project creation.

Rob...</description>
		<content:encoded><![CDATA[<p>Hi JMF,</p>
<p>We're on CVS :)</p>
<p>If we moved to SVN, we'd use externals. Though we'd probably create a bash script that set up the correct externals on project creation.</p>
<p>Rob&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JMF</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5980</link>
		<dc:creator>JMF</dc:creator>
		<pubDate>Wed, 25 Oct 2006 10:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5980</guid>
		<description>&#62;I have a bash script that allows me to check out my main project and all its dependent libraries from one command.

With Subversion you could use the property svn:external to do this automatically. (see http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html)</description>
		<content:encoded><![CDATA[<p>&gt;I have a bash script that allows me to check out my main project and all its dependent libraries from one command.</p>
<p>With Subversion you could use the property svn:external to do this automatically. (see <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html" rel="nofollow">http://svnbook.red-bean.com/nightly/en/svn.advanced.externals.html</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pcdinh</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5607</link>
		<dc:creator>pcdinh</dc:creator>
		<pubDate>Wed, 27 Sep 2006 14:51:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5607</guid>
		<description>That is a very good idea, Rob.
I think of a structure like this
 
layouts/
------template1
------template2

It should be more flexible for us to have switchable, separated, distributable templates system which can see in Wordpress, Joomla, Drupal and many popular CMSs or forums.

What do your think about it?</description>
		<content:encoded><![CDATA[<p>That is a very good idea, Rob.<br />
I think of a structure like this</p>
<p>layouts/<br />
&#8212;&#8212;template1<br />
&#8212;&#8212;template2</p>
<p>It should be more flexible for us to have switchable, separated, distributable templates system which can see in Wordpress, Joomla, Drupal and many popular CMSs or forums.</p>
<p>What do your think about it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5577</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Mon, 25 Sep 2006 08:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5577</guid>
		<description>Certainly, all the theming I've done to date has been CSS based.</description>
		<content:encoded><![CDATA[<p>Certainly, all the theming I've done to date has been CSS based.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sch</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5569</link>
		<dc:creator>sch</dc:creator>
		<pubDate>Sat, 23 Sep 2006 15:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5569</guid>
		<description>w3c's main goal is to use CSS (not HTML) for changing skins/layots/whatsoever. it may be sometimes hard to build css layouts... but in the matters of skins... i don't see any reason why not to use css.
i personally like the idea of joined controllers/views, although in a large application may get crowded.</description>
		<content:encoded><![CDATA[<p>w3c's main goal is to use CSS (not HTML) for changing skins/layots/whatsoever. it may be sometimes hard to build css layouts&#8230; but in the matters of skins&#8230; i don't see any reason why not to use css.<br />
i personally like the idea of joined controllers/views, although in a large application may get crowded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5467</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Sun, 17 Sep 2006 08:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5467</guid>
		<description>I have to admit that the concept of multiple skins is the main reason I can see for a separate views directory. So far, I've only ever had to have multiple themes for two sites and in both cases, the build allowed for all changes to be done by using a different CSS file.

I've never risked running two customers' sites from one directory, so can't comment on that :)

All interesting stuff, isn't it ?!</description>
		<content:encoded><![CDATA[<p>I have to admit that the concept of multiple skins is the main reason I can see for a separate views directory. So far, I've only ever had to have multiple themes for two sites and in both cases, the build allowed for all changes to be done by using a different CSS file.</p>
<p>I've never risked running two customers' sites from one directory, so can't comment on that :)</p>
<p>All interesting stuff, isn't it ?!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nico Edtinger</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5450</link>
		<dc:creator>Nico Edtinger</dc:creator>
		<pubDate>Sun, 17 Sep 2006 00:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5450</guid>
		<description>The views need a seperate directory for an obvious reason: skins/layouts/what-ever-you-like-to-call-them. The design of a page or webapp changes more often than the code/functionality and some even need more than one - i.e. if you have a webapp runnning on your own host for different customers.

It's also very common to hand off the HTML/Template stuff to someone who's better in doing "webdesign". So you could even create one very simple skin that just works and the other person copies that to the real skin and adds all that pretty stuff around it. Works very well for us.</description>
		<content:encoded><![CDATA[<p>The views need a seperate directory for an obvious reason: skins/layouts/what-ever-you-like-to-call-them. The design of a page or webapp changes more often than the code/functionality and some even need more than one - i.e. if you have a webapp runnning on your own host for different customers.</p>
<p>It's also very common to hand off the HTML/Template stuff to someone who's better in doing "webdesign". So you could even create one very simple skin that just works and the other person copies that to the real skin and adds all that pretty stuff around it. Works very well for us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5439</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Sat, 16 Sep 2006 13:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5439</guid>
		<description>Feel free to disagree away! It helps me learn!

To me, MVC is about separation of concerns, not separation via directories. Dunno really. Will have to play with it in a real application and see what happens.</description>
		<content:encoded><![CDATA[<p>Feel free to disagree away! It helps me learn!</p>
<p>To me, MVC is about separation of concerns, not separation via directories. Dunno really. Will have to play with it in a real application and see what happens.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoffrey</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5434</link>
		<dc:creator>Geoffrey</dc:creator>
		<pubDate>Sat, 16 Sep 2006 11:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5434</guid>
		<description>Once again, I must disagree with you Rob :-) The grouping you point out is also done with views, as, in layout v1 of course, you group views actions onto a {controllerName} directory so all views related to a specific controller are finally in the same place.

Now, about why I think putting views and controllers in the same directory is not a good idea, it's mainly because we are in an MVC context. As you surely know, this kind of architecture is based on layering, and by putting views and controllers in the same physical place, you break this layering. That's it. In practice, one day, you might end up with what I'd call sapi-dependant views. In this case, you'll be happy to be able to have a views/{php_sapi_name()}/ tree, which is way simpler to manage if *all* your views are in the *same* location. By the way, the same apply if you want to have a "theme-enabled" application, with views/{themeName}/.</description>
		<content:encoded><![CDATA[<p>Once again, I must disagree with you Rob :-) The grouping you point out is also done with views, as, in layout v1 of course, you group views actions onto a {controllerName} directory so all views related to a specific controller are finally in the same place.</p>
<p>Now, about why I think putting views and controllers in the same directory is not a good idea, it's mainly because we are in an MVC context. As you surely know, this kind of architecture is based on layering, and by putting views and controllers in the same physical place, you break this layering. That's it. In practice, one day, you might end up with what I'd call sapi-dependant views. In this case, you'll be happy to be able to have a views/{php_sapi_name()}/ tree, which is way simpler to manage if *all* your views are in the *same* location. By the way, the same apply if you want to have a "theme-enabled" application, with views/{themeName}/.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/2006/09/15/directory-structures-again/#comment-5430</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Sat, 16 Sep 2006 08:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/09/15/directory-structures-again/#comment-5430</guid>
		<description>Geoffrey,

I suspect that I am in a minority finding it a pain :)


Out of interest, why do you think putting views and controllers in the same directory is not a good idea? In every other aspect of programming we group by logical functionality, not by type. i.e. you don't create a controller called "add" with actions of "news", "article", "user", but you create three controllers called "news", "article" and "user", each with an "add" action. This is very obvious grouping.

Now, when we come our files, we don't group the news files together, we group the controllers together and the views together, rather than by what the files do. Why is that?</description>
		<content:encoded><![CDATA[<p>Geoffrey,</p>
<p>I suspect that I am in a minority finding it a pain :)</p>
<p>Out of interest, why do you think putting views and controllers in the same directory is not a good idea? In every other aspect of programming we group by logical functionality, not by type. i.e. you don't create a controller called "add" with actions of "news", "article", "user", but you create three controllers called "news", "article" and "user", each with an "add" action. This is very obvious grouping.</p>
<p>Now, when we come our files, we don't group the news files together, we group the controllers together and the views together, rather than by what the files do. Why is that?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
