<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Loose Coupling</title>
	<atom:link href="http://zmievski.org/2004/01/loose-coupling/feed" rel="self" type="application/rss+xml" />
	<link>http://gravitonic.com/2004/01/loose-coupling</link>
	<description>Life, technology, and other good things</description>
	<lastBuildDate>Wed, 11 Jan 2012 23:22:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Harry Fuecks</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-197</link>
		<dc:creator>Harry Fuecks</dc:creator>
		<pubDate>Mon, 02 Feb 2004 09:21:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-197</guid>
		<description>If you&#039;ll excuse the promotion of a project I&#039;ve been involved with, there&#039;s further discussion of templating here: http://wact.sourceforge.net/index.php/TemplateView - it looks at the characteristics of different template engines in attempt to fully define the problem and all the approaches to solving it.

WACT itself (http://sf.net/projects/wact) is something like a compromise between Ryan&#039;s and Rasmus&#039;s view of templating.

You still have a script handles an incoming request, then selects a template. From there it tells the template what data sources it should use but it&#039;s the template itself (so to speak) which actually &quot;pulls&quot; in the data, as opposed to the originating script &quot;pushing&quot; the data to it.

Otherwise the template syntax is mainly declarative - the clearest example right now is;



which results in the rendering of calendar.
</description>
		<content:encoded><![CDATA[<p>If you&#8217;ll excuse the promotion of a project I&#8217;ve been involved with, there&#8217;s further discussion of templating here: <a href="http://wact.sourceforge.net/index.php/TemplateView" rel="nofollow">http://wact.sourceforge.net/index.php/TemplateView</a> &#8211; it looks at the characteristics of different template engines in attempt to fully define the problem and all the approaches to solving it.</p>
<p>WACT itself (<a href="http://sf.net/projects/wact" rel="nofollow">http://sf.net/projects/wact</a>) is something like a compromise between Ryan&#8217;s and Rasmus&#8217;s view of templating.</p>
<p>You still have a script handles an incoming request, then selects a template. From there it tells the template what data sources it should use but it&#8217;s the template itself (so to speak) which actually &#8220;pulls&#8221; in the data, as opposed to the originating script &#8220;pushing&#8221; the data to it.</p>
<p>Otherwise the template syntax is mainly declarative &#8211; the clearest example right now is;</p>
<p>which results in the rendering of calendar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-196</link>
		<dc:creator>Coder</dc:creator>
		<pubDate>Thu, 22 Jan 2004 03:34:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-196</guid>
		<description>I just like to have greater separation and abstraction (Smarty, MVC, etc.). I&#039;ve always disliked combining PHP and HTML together in the same files. I&#039;ve also had many debates with people who say there&#039;s no need for a templating system like Smarty, since PHP is supposedly a templating system. I really like Smarty&#039;s separation - just provide an API of functions and vars to template users, and they don&#039;t need to know/use PHP. Plus features like security, caching, and the plethora of other ready-made functionality.
</description>
		<content:encoded><![CDATA[<p>I just like to have greater separation and abstraction (Smarty, MVC, etc.). I&#8217;ve always disliked combining PHP and HTML together in the same files. I&#8217;ve also had many debates with people who say there&#8217;s no need for a templating system like Smarty, since PHP is supposedly a templating system. I really like Smarty&#8217;s separation &#8211; just provide an API of functions and vars to template users, and they don&#8217;t need to know/use PHP. Plus features like security, caching, and the plethora of other ready-made functionality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rasmus</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-195</link>
		<dc:creator>Rasmus</dc:creator>
		<pubDate>Wed, 21 Jan 2004 18:34:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-195</guid>
		<description>Not sure why you would say I don&#039;t believe in tiers.  I do indeed.  PHP was written to be a templating system specifically to separate the backend business logic from the front end presentation layer.  And if you have seen any of my more recent talks you would have seen me present a 4-tiered architecture.  Have a look here:

http://talks.php.net/show/lca04/29
http://talks.php.net/show/lca04/30

The difference between this and Ryan&#039;s is that I strongly prefer a template-driven approach in the sense that the template gets control instead of some dispatch script that then chooses a template as in his suggested architecture.  Beyond that the architectures and guidelines are very similar.
</description>
		<content:encoded><![CDATA[<p>Not sure why you would say I don&#8217;t believe in tiers.  I do indeed.  PHP was written to be a templating system specifically to separate the backend business logic from the front end presentation layer.  And if you have seen any of my more recent talks you would have seen me present a 4-tiered architecture.  Have a look here:</p>
<p><a href="http://talks.php.net/show/lca04/29" rel="nofollow">http://talks.php.net/show/lca04/29</a><br />
<a href="http://talks.php.net/show/lca04/30" rel="nofollow">http://talks.php.net/show/lca04/30</a></p>
<p>The difference between this and Ryan&#8217;s is that I strongly prefer a template-driven approach in the sense that the template gets control instead of some dispatch script that then chooses a template as in his suggested architecture.  Beyond that the architectures and guidelines are very similar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-194</link>
		<dc:creator>Andrei</dc:creator>
		<pubDate>Tue, 20 Jan 2004 23:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-194</guid>
		<description>Before Smarty, I wrote SmartTemplate, which was never released. But I think Monte actually came up with the name.
</description>
		<content:encoded><![CDATA[<p>Before Smarty, I wrote SmartTemplate, which was never released. But I think Monte actually came up with the name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-193</link>
		<dc:creator>Coder</dc:creator>
		<pubDate>Tue, 20 Jan 2004 23:05:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-193</guid>
		<description>Hey Andrei - why&#039;s it named &quot;Smarty&quot;?
</description>
		<content:encoded><![CDATA[<p>Hey Andrei &#8211; why&#8217;s it named &#8220;Smarty&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-192</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 20 Jan 2004 20:38:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-192</guid>
		<description>Coder - you example is ok i guess, so long as the contents of those functions don&#039;t do things that belong on the middle tier (e.g. mysql_query(...)).  Otherwise, your PHP that does the template work should do something like:

$links = get_links();
$template-&gt;assign(&#039;links&#039;, $links);

That way, if you change the template layer, you can override an assign() method that performs the same thing smarty does, and it may not neccesarily disrupt your template, and shouldn&#039;t disrupt your &quot;Action&quot; either.  The more I think about it, the more I don&#039;t like the idea of plugins either - but I largely use plugins to write UI components anyhow.
</description>
		<content:encoded><![CDATA[<p>Coder &#8211; you example is ok i guess, so long as the contents of those functions don&#8217;t do things that belong on the middle tier (e.g. mysql_query(&#8230;)).  Otherwise, your PHP that does the template work should do something like:</p>
<p>$links = get_links();<br />
$template->assign(&#8216;links&#8217;, $links);</p>
<p>That way, if you change the template layer, you can override an assign() method that performs the same thing smarty does, and it may not neccesarily disrupt your template, and shouldn&#8217;t disrupt your &#8220;Action&#8221; either.  The more I think about it, the more I don&#8217;t like the idea of plugins either &#8211; but I largely use plugins to write UI components anyhow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-191</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 20 Jan 2004 20:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-191</guid>
		<description>I&#039;ve written my own which fits the needs of the apps I work with better than I think a generic framework can.  Java has a leg up in terms of being able to accomodate frameworks that require large scale, complex configuration because of the VM.

Faces is UI, however, the goal is to make it so that people who use Struts or other Java MVC frameworks can interchange Struts for something else without changing their templates (e.g. currently, you&#039;d have to recode your Struts Tag Library stuff to whatever you were changing to, like Velocity).
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve written my own which fits the needs of the apps I work with better than I think a generic framework can.  Java has a leg up in terms of being able to accomodate frameworks that require large scale, complex configuration because of the VM.</p>
<p>Faces is UI, however, the goal is to make it so that people who use Struts or other Java MVC frameworks can interchange Struts for something else without changing their templates (e.g. currently, you&#8217;d have to recode your Struts Tag Library stuff to whatever you were changing to, like Velocity).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-190</link>
		<dc:creator>Coder</dc:creator>
		<pubDate>Tue, 20 Jan 2004 20:32:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-190</guid>
		<description>BTW, is Smarty used at Yahoo? I saw a presentation by Rasmus once, and based on the code he showed, I don&#039;t think he&#039;s a tiered kind of guy ;).
</description>
		<content:encoded><![CDATA[<p>BTW, is Smarty used at Yahoo? I saw a presentation by Rasmus once, and based on the code he showed, I don&#8217;t think he&#8217;s a tiered kind of guy <img src='http://zmievski.org/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-189</link>
		<dc:creator>Coder</dc:creator>
		<pubDate>Tue, 20 Jan 2004 20:29:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-189</guid>
		<description>Nah, just because it&#039;s an object doesn&#039;t mean it&#039;s business logic. You could have an object with the following methods:

get_links()
get_article()
get_title()
get_comments()

and so on. With individual functions it&#039;s a much bigger hassle - importing global settings, multiple files, registering each function, etc. An object is much much more convenient.
</description>
		<content:encoded><![CDATA[<p>Nah, just because it&#8217;s an object doesn&#8217;t mean it&#8217;s business logic. You could have an object with the following methods:</p>
<p>get_links()<br />
get_article()<br />
get_title()<br />
get_comments()</p>
<p>and so on. With individual functions it&#8217;s a much bigger hassle &#8211; importing global settings, multiple files, registering each function, etc. An object is much much more convenient.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder</title>
		<link>http://zmievski.org/2004/01/loose-coupling/comment-page-1#comment-188</link>
		<dc:creator>Coder</dc:creator>
		<pubDate>Tue, 20 Jan 2004 20:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.gravitonic.com/n/?p=71#comment-188</guid>
		<description>So do you use Mojavi (or other PHP MVC framework)? I&#039;ve been looking for one I like. I tried phrame, but, well, I don&#039;t know...

I thought Faces was just UI components.
</description>
		<content:encoded><![CDATA[<p>So do you use Mojavi (or other PHP MVC framework)? I&#8217;ve been looking for one I like. I tried phrame, but, well, I don&#8217;t know&#8230;</p>
<p>I thought Faces was just UI components.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

