<?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: Improving the Forms: Field Groups</title>
	<atom:link href="http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/feed/" rel="self" type="application/rss+xml" />
	<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/</link>
	<description>On The Art Of Web Development</description>
	<lastBuildDate>Mon, 30 Aug 2010 03:06:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Pete BD</title>
		<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/comment-page-1/#comment-314</link>
		<dc:creator>Pete BD</dc:creator>
		<pubDate>Mon, 13 Jul 2009 10:25:13 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=195#comment-314</guid>
		<description>@Rubino: The YAML layer you describe could be built on top of this programmatic interface easily.  But one will always need to have the option of programmatic (i.e. PHP) declaration and modification of forms.

Here is an idea: you could use YAML to generate the base form classes in the same way that Doctrine generates model classes.  Then you could easily derive a custom class from this base class to fiddle with at run-time.</description>
		<content:encoded><![CDATA[<p>@Rubino: The YAML layer you describe could be built on top of this programmatic interface easily.  But one will always need to have the option of programmatic (i.e. PHP) declaration and modification of forms.</p>
<p>Here is an idea: you could use YAML to generate the base form classes in the same way that Doctrine generates model classes.  Then you could easily derive a custom class from this base class to fiddle with at run-time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rubino</title>
		<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/comment-page-1/#comment-62</link>
		<dc:creator>Rubino</dc:creator>
		<pubDate>Mon, 11 May 2009 00:42:49 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=195#comment-62</guid>
		<description>An interesting proposal but wouldn&#039;t it be better to completely delegate form generation to something yml based.  Forms are generally static definitions associated with actions or components - we already use yml for the admin side - the implementation could be reused and enhanced in a more general way.  If something dynamic is needed then you can hand-craft - an exception rather than the rule if it&#039;s implemented well.

Allow for proper type definition of form elements (including types, defaults, validation), include field level security attributes and with clever use of the translation engine allow better default error messages &amp; tooltips.  Field grouping would be possible follows the same pattern we have in the generator.yml.

The use of the translation engine would allow text from resource files to be used in this scenario.  The main changes needed to translation would be to implement a form of inherited lookup - best illustrated with an example:

all:
  name:
    label: Name
    tooltip: Enter the name
    validationError: You need to enter the name
...
registration:
  name:
    label: Login Name
    tooltip: Enter the login name you&#039;d like to use
    validationError: 
      default: You need to register with a valid name
      validationFail:  That name already exists, try with another.

In the context of registration - the specific details would be used for the field - otherwise the site default would be used.  

Generally what you&#039;ve outlined is interesting - but while it&#039;s simpler syntax - it&#039;s much the same as we have already.  I&#039;d like to see something more flexible generally - where form fields are more component based and where the project structure defines more the defaults.

Something like:
  lib\form\fields contains:
   input.class.php [for the generic input field]
  apps\thisApp\lib\form\fields:
    input.class.php [overriding it for this application]
  apps\thisApp\modules\thisMoule\form\fields:
    input.class.php [overriding it for this module]</description>
		<content:encoded><![CDATA[<p>An interesting proposal but wouldn&#8217;t it be better to completely delegate form generation to something yml based.  Forms are generally static definitions associated with actions or components &#8211; we already use yml for the admin side &#8211; the implementation could be reused and enhanced in a more general way.  If something dynamic is needed then you can hand-craft &#8211; an exception rather than the rule if it&#8217;s implemented well.</p>
<p>Allow for proper type definition of form elements (including types, defaults, validation), include field level security attributes and with clever use of the translation engine allow better default error messages &amp; tooltips.  Field grouping would be possible follows the same pattern we have in the generator.yml.</p>
<p>The use of the translation engine would allow text from resource files to be used in this scenario.  The main changes needed to translation would be to implement a form of inherited lookup &#8211; best illustrated with an example:</p>
<p>all:<br />
  name:<br />
    label: Name<br />
    tooltip: Enter the name<br />
    validationError: You need to enter the name<br />
&#8230;<br />
registration:<br />
  name:<br />
    label: Login Name<br />
    tooltip: Enter the login name you&#8217;d like to use<br />
    validationError:<br />
      default: You need to register with a valid name<br />
      validationFail:  That name already exists, try with another.</p>
<p>In the context of registration &#8211; the specific details would be used for the field &#8211; otherwise the site default would be used.  </p>
<p>Generally what you&#8217;ve outlined is interesting &#8211; but while it&#8217;s simpler syntax &#8211; it&#8217;s much the same as we have already.  I&#8217;d like to see something more flexible generally &#8211; where form fields are more component based and where the project structure defines more the defaults.</p>
<p>Something like:<br />
  lib\form\fields contains:<br />
   input.class.php [for the generic input field]<br />
  apps\thisApp\lib\form\fields:<br />
    input.class.php [overriding it for this application]<br />
  apps\thisApp\modules\thisMoule\form\fields:<br />
    input.class.php [overriding it for this module]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daily Digest for 2009-04-20 &#124; Pedro Trindade</title>
		<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/comment-page-1/#comment-42</link>
		<dc:creator>Daily Digest for 2009-04-20 &#124; Pedro Trindade</dc:creator>
		<pubDate>Tue, 21 Apr 2009 07:11:55 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=195#comment-42</guid>
		<description>[...] Web Mozarts » Blog Archive » Improving the Forms: Field Groups [...]</description>
		<content:encoded><![CDATA[<p>[...] Web Mozarts » Blog Archive » Improving the Forms: Field Groups [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/comment-page-1/#comment-40</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 20 Apr 2009 09:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=195#comment-40</guid>
		<description>This is great. I&#039;ve tinkered with the Django framework and liked the readability of the the form configuration code (which, if I remember rightly, is part of the schema definition). I&#039;ve not really seen this done better, not that I&#039;ve spent time looking or anything.

Symfony forms are awesome but I do feel an improved interface would simplify real-world projects, where (maybe due to my own inadequacies) I often spend most time tweaking with and/or fixing forms. 

I&#039;d definitely use this and encourage you to continue!</description>
		<content:encoded><![CDATA[<p>This is great. I&#8217;ve tinkered with the Django framework and liked the readability of the the form configuration code (which, if I remember rightly, is part of the schema definition). I&#8217;ve not really seen this done better, not that I&#8217;ve spent time looking or anything.</p>
<p>Symfony forms are awesome but I do feel an improved interface would simplify real-world projects, where (maybe due to my own inadequacies) I often spend most time tweaking with and/or fixing forms. </p>
<p>I&#8217;d definitely use this and encourage you to continue!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernhard</title>
		<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/comment-page-1/#comment-38</link>
		<dc:creator>Bernhard</dc:creator>
		<pubDate>Sun, 19 Apr 2009 22:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=195#comment-38</guid>
		<description>@Marijn: You couldn&#039;t really do the above things with embedded forms, because embedded forms are not integrated in the whole value binding and validation process.</description>
		<content:encoded><![CDATA[<p>@Marijn: You couldn&#8217;t really do the above things with embedded forms, because embedded forms are not integrated in the whole value binding and validation process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marijn</title>
		<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/comment-page-1/#comment-37</link>
		<dc:creator>Marijn</dc:creator>
		<pubDate>Sun, 19 Apr 2009 22:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=195#comment-37</guid>
		<description>I really like your ideas, but... Isn&#039;t this currently handled by using embedForm? As far as I know this can all be done already with a slightly different interface..

Well anyway great to see some community action around sfForm:-)</description>
		<content:encoded><![CDATA[<p>I really like your ideas, but&#8230; Isn&#8217;t this currently handled by using embedForm? As far as I know this can all be done already with a slightly different interface..</p>
<p>Well anyway great to see some community action around sfForm:-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dereck</title>
		<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/comment-page-1/#comment-36</link>
		<dc:creator>dereck</dc:creator>
		<pubDate>Sun, 19 Apr 2009 16:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=195#comment-36</guid>
		<description>I think it&#039;s worth having a look at the way Zend Framework handles this tasks http://framework.zend.com/manual/en/zend.form.html</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s worth having a look at the way Zend Framework handles this tasks <a href="http://framework.zend.com/manual/en/zend.form.html" rel="nofollow" target="_blank" class="liexternal">http://framework.zend.com/manual/en/zend.form.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://webmozarts.com/2009/04/19/improving-the-forms-field-groups/comment-page-1/#comment-35</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 19 Apr 2009 15:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://webmozarts.com/?p=195#comment-35</guid>
		<description>That&#039;s even more than what I had in mind when thinking about form groups, and I really like the concept. The only thing not yet mentioned is how this can be used with formatters, but I think the whole formatter topic is yet something to be discussed in detail.</description>
		<content:encoded><![CDATA[<p>That&#8217;s even more than what I had in mind when thinking about form groups, and I really like the concept. The only thing not yet mentioned is how this can be used with formatters, but I think the whole formatter topic is yet something to be discussed in detail.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
