<?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: In Symfony, how big should a module be?</title>
	<atom:link href="http://symfonynerds.com/blog/?feed=rss2&#038;p=339" rel="self" type="application/rss+xml" />
	<link>http://symfonynerds.com/blog/?p=339</link>
	<description>Nerds who love the symfony-project</description>
	<pubDate>Wed, 08 Sep 2010 03:38:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Katheryn</title>
		<link>http://symfonynerds.com/blog/?p=339#comment-992</link>
		<dc:creator>Katheryn</dc:creator>
		<pubDate>Thu, 01 Apr 2010 21:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://symfonynerds.com/blog/?p=339#comment-992</guid>
		<description>Hello there, Happy Fool's Day! 

Juggler, driving to his next performance, was stopped by the police. "What are those knives doing in your car?" asked the officer.
"I juggle them in my act."
"Oh yeah?" says the cop. "Let's see you do it." 
So the juggler starts tossing and juggling the knives.
A guy driving by sees this and says, "Wow, am I glad I quit drinking. Look at the test they're making you do now!"
 

Happy April Fool's Day!</description>
		<content:encoded><![CDATA[<p>Hello there, Happy Fool&#8217;s Day! </p>
<p>Juggler, driving to his next performance, was stopped by the police. &#8220;What are those knives doing in your car?&#8221; asked the officer.<br />
&#8220;I juggle them in my act.&#8221;<br />
&#8220;Oh yeah?&#8221; says the cop. &#8220;Let&#8217;s see you do it.&#8221;<br />
So the juggler starts tossing and juggling the knives.<br />
A guy driving by sees this and says, &#8220;Wow, am I glad I quit drinking. Look at the test they&#8217;re making you do now!&#8221;</p>
<p>Happy April Fool&#8217;s Day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lawrence Krubner</title>
		<link>http://symfonynerds.com/blog/?p=339#comment-843</link>
		<dc:creator>Lawrence Krubner</dc:creator>
		<pubDate>Tue, 23 Feb 2010 04:02:43 +0000</pubDate>
		<guid isPermaLink="false">http://symfonynerds.com/blog/?p=339#comment-843</guid>
		<description>David,

You make a good point about front end code. It often demands multiple views. When I look at my own user modules, I see 15 public methods that are there simply to provide data to 15 different templates. The multiplicity of different views leads to bulky modules. 

In theory, of course, there are other ways of handling things. Fabien Potencier has written about how to handle all static pages with a single method: 

http://fabien.potencier.org/article/27/a-symfony-tip-tweak-template-names

But that is for static pages. Dynamic data is more difficult to handle. Here is one area where, initially, it might seem that the web sites built for humans might depart from the needs of an API that is meant only for software robots. But are they really so different?

Richardson and Ruby only request that the verb of a request go in the HTTP headers. They've no objections to other parameters being passed through the URL. One might expect to get back a variety of data views, based on the URL parameters, even when the HTTP verb is always GET. And how is that different from a website where a human uses their browser to make a variety of GET requests? I can imagine having a single method to handle all GET requests. At first I worry that such a method would be bloated, but perhaps refactoring could clean it up. The method might be a switch statement, the rest of the code would be in small, protected methods. 

I am intrigued by the idea of building a web services layer. How does that work in Symfony? Does it run as one application? Do you mean that the part of your site that faces out to humans only makes API calls? It makes no database calls?</description>
		<content:encoded><![CDATA[<p>David,</p>
<p>You make a good point about front end code. It often demands multiple views. When I look at my own user modules, I see 15 public methods that are there simply to provide data to 15 different templates. The multiplicity of different views leads to bulky modules. </p>
<p>In theory, of course, there are other ways of handling things. Fabien Potencier has written about how to handle all static pages with a single method: </p>
<p><a href="http://fabien.potencier.org/article/27/a-symfony-tip-tweak-template-names" rel="nofollow">http://fabien.potencier.org/article/27/a-symfony-tip-tweak-template-names</a></p>
<p>But that is for static pages. Dynamic data is more difficult to handle. Here is one area where, initially, it might seem that the web sites built for humans might depart from the needs of an API that is meant only for software robots. But are they really so different?</p>
<p>Richardson and Ruby only request that the verb of a request go in the HTTP headers. They&#8217;ve no objections to other parameters being passed through the URL. One might expect to get back a variety of data views, based on the URL parameters, even when the HTTP verb is always GET. And how is that different from a website where a human uses their browser to make a variety of GET requests? I can imagine having a single method to handle all GET requests. At first I worry that such a method would be bloated, but perhaps refactoring could clean it up. The method might be a switch statement, the rest of the code would be in small, protected methods. </p>
<p>I am intrigued by the idea of building a web services layer. How does that work in Symfony? Does it run as one application? Do you mean that the part of your site that faces out to humans only makes API calls? It makes no database calls?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Brewer</title>
		<link>http://symfonynerds.com/blog/?p=339#comment-836</link>
		<dc:creator>David Brewer</dc:creator>
		<pubDate>Sun, 21 Feb 2010 07:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://symfonynerds.com/blog/?p=339#comment-836</guid>
		<description>I love the RESTful approach to building web services, but I have my doubts about being able to write code for dual use as a web service and a human-targeted interface.  I find that I need more flexibility when deciding how the frontend of the site is going to work.

The approach I've been taking recently is to always build a web service layer in any database-driven project.  The frontend of the site talks only to this layer and never accesses the database directly.  You do pay a cost in performance, but has several big advantages:
 * Your frontend code becomes much simpler, and it's much easier to split up the work of building a large website into frontend and backend concerns.
 * You have the freedom of changing your frontend technology without big changes on the backend.  This has come in handy on some projects when, for instance, we abandoned a Flash frontend in favor of an HTML frontend.
 * The web service layer is a natural place to optimize performance using caching, etc.</description>
		<content:encoded><![CDATA[<p>I love the RESTful approach to building web services, but I have my doubts about being able to write code for dual use as a web service and a human-targeted interface.  I find that I need more flexibility when deciding how the frontend of the site is going to work.</p>
<p>The approach I&#8217;ve been taking recently is to always build a web service layer in any database-driven project.  The frontend of the site talks only to this layer and never accesses the database directly.  You do pay a cost in performance, but has several big advantages:<br />
 * Your frontend code becomes much simpler, and it&#8217;s much easier to split up the work of building a large website into frontend and backend concerns.<br />
 * You have the freedom of changing your frontend technology without big changes on the backend.  This has come in handy on some projects when, for instance, we abandoned a Flash frontend in favor of an HTML frontend.<br />
 * The web service layer is a natural place to optimize performance using caching, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Closer To The Ideal &#187; Blog Archive &#187; RESTful architectures and Symfony: how big should modules be?</title>
		<link>http://symfonynerds.com/blog/?p=339#comment-834</link>
		<dc:creator>Closer To The Ideal &#187; Blog Archive &#187; RESTful architectures and Symfony: how big should modules be?</dc:creator>
		<pubDate>Sun, 21 Feb 2010 02:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://symfonynerds.com/blog/?p=339#comment-834</guid>
		<description>[...] I&#8217;ve a new post up at Symfony Nerds. In it, I look at the implications of a RESTful architecture for Symfony. Should every module just have 4 actions, read, write, update and delete? [...]</description>
		<content:encoded><![CDATA[<p>[...] I&#8217;ve a new post up at Symfony Nerds. In it, I look at the implications of a RESTful architecture for Symfony. Should every module just have 4 actions, read, write, update and delete? [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
