<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/wordpress-mu-1.0" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Making your life easier with Factory design patterns</title>
	<link>http://symfony.sopca.com/2007/01/05/making-your-life-easier-with-factory-design-patterns/</link>
	<description>Symfony, PHP and web development directly from the horse's mouth</description>
	<pubDate>Thu, 20 Nov 2008 12:39:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=wordpress-mu-1.0</generator>

	<item>
		<title>by: pixelslut</title>
		<link>http://symfony.sopca.com/2007/01/05/making-your-life-easier-with-factory-design-patterns/#comment-11</link>
		<pubDate>Tue, 23 Jan 2007 15:50:20 +0000</pubDate>
		<guid>http://symfony.sopca.com/2007/01/05/making-your-life-easier-with-factory-design-patterns/#comment-11</guid>
					<description>&lt;p&gt;Well ive been doing this with little knowledge of the pattern associated - just because im im "lazy" and didnt want to write the same lines of criteria or custom SQL code over and over. But i have a question... is there an easy way to update all these method in my model? For example i currently have 2 collections of these types of methods, one set dealing with a status type and another set dealing with timestamps. Ive noticed that i need to refactor these to make minor adjustments (this is probably due to poor planning - but it still happens) like add an additional parameter, or stich a parameter from a simple value to a criteria or an array. For the time being ive been jsut keeping them in a seperate file and cutting and pasting them back in when needed. I do have them tagged in a special comment string though for which i had planned to wite a batch to do this for me when i have time... but i figure theres go to be a better way...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Well ive been doing this with little knowledge of the pattern associated - just because im im &#8220;lazy&#8221; and didnt want to write the same lines of criteria or custom SQL code over and over. But i have a question&#8230; is there an easy way to update all these method in my model? For example i currently have 2 collections of these types of methods, one set dealing with a status type and another set dealing with timestamps. Ive noticed that i need to refactor these to make minor adjustments (this is probably due to poor planning - but it still happens) like add an additional parameter, or stich a parameter from a simple value to a criteria or an array. For the time being ive been jsut keeping them in a seperate file and cutting and pasting them back in when needed. I do have them tagged in a special comment string though for which i had planned to wite a batch to do this for me when i have time&#8230; but i figure theres go to be a better way&#8230;</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Krof Drakula</title>
		<link>http://symfony.sopca.com/2007/01/05/making-your-life-easier-with-factory-design-patterns/#comment-4</link>
		<pubDate>Sun, 07 Jan 2007 21:36:08 +0000</pubDate>
		<guid>http://symfony.sopca.com/2007/01/05/making-your-life-easier-with-factory-design-patterns/#comment-4</guid>
					<description>&lt;p&gt;True, but the whole point in creating specialized Peer methods is in simplifying the functions used while making them more verbose when used in an action.&lt;/p&gt;

&lt;p&gt;But, it all depends on the user's preferences... Your method probably applies to more advanced and complex queries where using the Criteria object passed into the function makes it easier to handle.&lt;/p&gt;

&lt;p&gt;Either way, good point.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>True, but the whole point in creating specialized Peer methods is in simplifying the functions used while making them more verbose when used in an action.</p>
<p>But, it all depends on the user&#8217;s preferences&#8230; Your method probably applies to more advanced and complex queries where using the Criteria object passed into the function makes it easier to handle.</p>
<p>Either way, good point.</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Marc</title>
		<link>http://symfony.sopca.com/2007/01/05/making-your-life-easier-with-factory-design-patterns/#comment-3</link>
		<pubDate>Sun, 07 Jan 2007 20:01:33 +0000</pubDate>
		<guid>http://symfony.sopca.com/2007/01/05/making-your-life-easier-with-factory-design-patterns/#comment-3</guid>
					<description>&lt;p&gt;I tend to add an optional Criteria parameter too. So instead of creating a new Criteria object the method will use the one that's provided. Basically you want to provide default values without limiting the existing features.&lt;/p&gt;

&lt;p&gt;For anbody that wants more information about Design Patterns check http://www.phppatterns.com/&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I tend to add an optional Criteria parameter too. So instead of creating a new Criteria object the method will use the one that&#8217;s provided. Basically you want to provide default values without limiting the existing features.</p>
<p>For anbody that wants more information about Design Patterns check http://www.phppatterns.com/</p>
]]></content:encoded>
				</item>
</channel>
</rss>
