<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Delivering Quality &#187; symfony</title>
	<atom:link href="http://www.markdeepwell.com/tag/symfony/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markdeepwell.com</link>
	<description>A Software Developers View of the World</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:44:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Debugging Form Errors in symfony 1.3+</title>
		<link>http://www.markdeepwell.com/2010/04/debugging-form-errors-in-symfony-1-3/</link>
		<comments>http://www.markdeepwell.com/2010/04/debugging-form-errors-in-symfony-1-3/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 16:19:13 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[form validation]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=503</guid>
		<description><![CDATA[Symfony 1.3 (or symfony 1.4) provides an incredibly helpful feature to help debug forms. This new feature is included in the developer toolbar and shows valuable information about the forms on the page. To access the detailed form information, click on the view button, click on the template or partial that the form is in, [...]]]></description>
			<content:encoded><![CDATA[<p>Symfony 1.3 (or symfony 1.4) provides an incredibly helpful feature to help  debug forms. This new feature is included in the developer toolbar and shows valuable information about the forms on the page. To access the detailed form information, click on the <em>view</em> button, click on the template or partial that the form is in, and then click to expand the form. It lists each form widget and if any errors for a given widget exist they are shown   right under it. Errors are also highlighted to make them easy to   spot.</p>
<p><a href="http://www.markdeepwell.com/wp-content/uploads/2010/04/form-widget-view.jpg"><img class="aligncenter size-full  wp-image-508" title="form widget view" src="http://www.markdeepwell.com/wp-content/uploads/2010/04/form-widget-view.jpg" alt="" width="435" height="202" /></a></p>
<p>The symfony debug toolbar will look like this when there is a validation error in one of the forms on the current page. This is one of the most incredibly useful features I&#8217;ve seen and greatly  improves productivity while building forms in the symfony framework. Congratulations to the symfony developers who came up with this tool!</p>
<p><a href="http://www.markdeepwell.com/wp-content/uploads/2010/04/symfony-debug-toolbar-1.4.jpg"><img class="aligncenter size-full  wp-image-509" title="symfony debug toolbar 1.4" src="http://www.markdeepwell.com/wp-content/uploads/2010/04/symfony-debug-toolbar-1.4.jpg" alt="" width="492" height="21" /></a></p>
<p>Have symfony 1.1 or 1.2? read <a href="http://www.markdeepwell.com/2009/07/catch-symfony-form-errors/">catch symfony form errors</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/04/debugging-form-errors-in-symfony-1-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Alternative to symfony&#8217;s schema.yml</title>
		<link>http://www.markdeepwell.com/2009/08/an-alternative-to-symfonys-schema-yml/</link>
		<comments>http://www.markdeepwell.com/2009/08/an-alternative-to-symfonys-schema-yml/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 04:13:07 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[database schema]]></category>
		<category><![CDATA[Propel]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=96</guid>
		<description><![CDATA[The symfony web framework provides two methods for building the database model files when using the Propel Object-relational mapping (ORM) toolkit. The recommended method by the symfony team is to use the schema.yml file, where you explicitly explain your table structure. The second method is to generate a schema.xml file directly from the database. schema.yml: [...]]]></description>
			<content:encoded><![CDATA[<p>The symfony web framework provides two methods for building the database model files when using the <a href="http://propel.phpdb.org/">Propel Object-relational mapping</a> (ORM) toolkit. The  recommended method by the symfony team is to use the  <a href="http://www.symfony-project.org/book/1_2/08-Inside-the-Model-Layer#chapter_08_symfony_s_database_schema">schema.yml</a> file, where you explicitly explain your table structure. The second method is to generate a <a href="http://www.symfony-project.org/book/1_2/08-Inside-the-Model-Layer#chapter_08_sub_beyond_the_schema_yml_the_schema_xml">schema.xml</a> file directly from the database.</p>
<h3>schema.yml:<img class="alignright size-full wp-image-97" title="symfony schema yml" src="http://www.markdeepwell.com/wp-content/uploads/2009/08/symfony-schema-yml.png" alt="symfony schema yml" width="209" height="102" /></h3>
<p>Just edit config/schema.yml and list your tables, columns, column types, and foreign keys in YAML form. Build the model files by running:</p>
<pre>./symfony propel-build-model</pre>
<p>Pros:</p>
<ul>
<li> Interfaces better with  plugins because most, if not all, plugins use the schema.yml method</li>
<li>Can be used to create the database tables</li>
<li>Overall easier to use because it is the most common method</li>
</ul>
<p>Cons:</p>
<ul>
<li> Requires duplicate data by having the database structure in a text file, which can be outdated when the database is updated directly</li>
</ul>
<h3>schema.xml:</h3>
<p>To create the model files simply run:</p>
<pre>./symfony propel-build-schema xml
./symfony propel-build-model</pre>
<p>Pros:</p>
<ul>
<li>Supports ALL  database features</li>
<li>Supports the most complex schemas</li>
</ul>
<p>Cons:</p>
<ul>
<li>Errors while building the XML file are cryptic and time consuming to track down (eg: om-template)</li>
</ul>
<h3>Comparison</h3>
<p>The schema.yml method supports most projects with relative ease, but is limiting if you need to use more advanced database features that are not supported (propel only supports limited <a href="http://propel.phpdb.org/trac/wiki/Users/Documentation/1.3/ColumnTypes">column types</a>). Although, there are tricks to get around these limitations. For example, if you need to use column types that aren&#8217;t supported, like ENUM, you can simply declare the column as a varchar and Propel won&#8217;t know any better. This works fine for ENUM because it&#8217;s simply a text field, but may work for other column types too.</p>
<p>I recommend the schema.xml file for projects that have a very complex schema that cannot be represented in the yml file, or for projects already using XML files to define the database scheme.</p>
<p>I have used both methods on different large projects and have found the schema.yml method to provide faster  application development, have more  developer support, and easier to work with. I full recommend use of the schema.yml method in all but the most exceptional projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2009/08/an-alternative-to-symfonys-schema-yml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Catch Symfony Form Errors</title>
		<link>http://www.markdeepwell.com/2009/07/catch-symfony-form-errors/</link>
		<comments>http://www.markdeepwell.com/2009/07/catch-symfony-form-errors/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 18:43:11 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=68</guid>
		<description><![CDATA[Have you built a form while developing with the symfony form framework that appears to work fine but fails because of an unknown error? Here is the simplest and easiest way to catch most errors. First open the web page with the form and fill it in with valid input. Then, open the form php [...]]]></description>
			<content:encoded><![CDATA[<p>Have you built a form while developing with the <a href="http://www.symfony-project.org/forms/1_2/en/01-Form-Creation">symfony form framework</a> that appears to work fine but fails because of an unknown error? Here is the simplest and easiest way to catch most errors. </p>
<p>First open the web page with the form and fill it in with valid input. Then, open the form php file, temporarily delete all your custom form render code and replace it with echo $form. Go back to the web page and click your form submit button. It should show you any validation errors that appear in the form but were missing on your customized version, because this time it's rendering the form with the default settings. At the very least it could show you something you missed and hint at the solution. </p>
<p>Your test form would look like this:</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;form action=<span style="color:#FF0000;">"&lt;?php echo url_for('user/'.($form-&gt;getObject()-&gt;isNew() ? 'create' : 'update').(!$form-&gt;getObject()-&gt;isNew() ? '?id='.$form-&gt;getObject()-&gt;getId() : '')) ?&gt;"</span> method=<span style="color:#FF0000;">"post"</span> <span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#0000FF;">$form</span>-&gt;<span style="color:#006600;">isMultipart</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> and <a href="http://www.php.net/print"><span style="color:#000066;">print</span></a> <span style="color:#FF0000;">'enctype=&quot;multipart/form-data&quot; '</span> ?&gt;&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;table&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;tfoot&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;tr&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;td&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$form</span>-&gt;<span style="color:#006600;">renderHiddenFields</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &lt;input type=<span style="color:#FF0000;">"submit"</span> value=<span style="color:#FF0000;">"Save"</span>&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &lt;/td&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;/tr&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;/tfoot&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;tbody&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$form</span> <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;/tbody&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/table&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/form&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2009/07/catch-symfony-form-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony CRUD Generator</title>
		<link>http://www.markdeepwell.com/2009/07/symfony-crud-generator/</link>
		<comments>http://www.markdeepwell.com/2009/07/symfony-crud-generator/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 01:01:22 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[code generation]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=35</guid>
		<description><![CDATA[The symfony CRUD generator is a very useful tool for speeding up your web development. When you need a list of items that you can list and edit, you are most likely building a standard CRUD (create-read-update-delete) interface. This is common functionality that is found in most applications. Since this is such a common task, [...]]]></description>
			<content:encoded><![CDATA[<p>The symfony <a href="http://www.symfony-project.org/forms/1_2/en/04-Propel-Integration#chapter_04_the_crud_generator">CRUD generator</a> is a very useful tool for speeding up your web development. When you need a list of items that you can list and edit, you are most likely building a standard CRUD (create-read-update-delete) interface. This is common functionality that is found in most applications. Since this is such a common task, it makes perfect sense that the symfony <a href="http://www.symfony-project.org/">web framework</a> has a tool to build it for you.</p>
<p>For example: Lets say your web application allow users to sign-up (surprise!) and you  need a user management tool in the admin section to manage these users. To create this in symfony, you'd run the following:</p>
<pre><code>./symfony propel:generate-crud admin user User
</code></pre>
<p>This assumes you have an admin application, and a User model file. With that one line, it will create a listing of all users with the ability to edit and delete them. It generates HTML and PHP code that you can modify to your requirements. Fantastic for less than a minute of work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2009/07/symfony-crud-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
