<?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>Kommentare zu: Agavi vs Zend Framework Part 1 &#8211; Forms</title>
	<atom:link href="http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/</link>
	<description>queer as code!</description>
	<lastBuildDate>Sat, 03 Dec 2011 22:03:07 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Von: Craig Fairhurst</title>
		<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/comment-page-1/#comment-203</link>
		<dc:creator>Craig Fairhurst</dc:creator>
		<pubDate>Tue, 11 May 2010 16:31:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.logaholic.de/?p=64#comment-203</guid>
		<description>I use my own form generator with Agavi. It does not yet handle the validation however does reduce the leg work.</description>
		<content:encoded><![CDATA[<p>I use my own form generator with Agavi. It does not yet handle the validation however does reduce the leg work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Pierre</title>
		<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/comment-page-1/#comment-80</link>
		<dc:creator>Pierre</dc:creator>
		<pubDate>Wed, 29 Apr 2009 09:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.logaholic.de/?p=64#comment-80</guid>
		<description>And I think most of you are talking about obsolete problems. You know any company where the developer does not programm the forms, or at least makes the webdesigner created form a php usable form (e.g. renaming the input fields to match the scripts logic)? ;-)</description>
		<content:encoded><![CDATA[<p>And I think most of you are talking about obsolete problems. You know any company where the developer does not programm the forms, or at least makes the webdesigner created form a php usable form (e.g. renaming the input fields to match the scripts logic)? <img src='http://www.logaholic.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Karsten Deubert</title>
		<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/comment-page-1/#comment-76</link>
		<dc:creator>Karsten Deubert</dc:creator>
		<pubDate>Tue, 28 Apr 2009 19:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.logaholic.de/?p=64#comment-76</guid>
		<description>@Felix:

&quot;Templating guys&quot; is another point where Zend_Form is lacking, in comparison, but as i said before you should keep an eye on those guys not changing the input names ;)
Also, i don&#039;t think we should allow &quot;templating guys&quot; to use evil includes/requires in templates at all.

Without (basic) php skills one can only influence Zend forms via CSS, which sometimes may not be enough.

Parameter remapping as principle is counter-productive imho. Yes, you can correct any bad template with PHP workarounds - but not only in Agavi ;)

I appreciate your deep insights as a certainly more experienced agavi user :)

@Veikko:
Valid point.

&lt;strong&gt;To conclude&lt;/strong&gt; (&lt;i&gt;again&lt;/i&gt;), i&#039;d say that i personlly, for some small html-only forms, which don&#039;t need extensive/non-standard styling, still prefer Zend_Form. I do have disadvantages for not being able to use one validator setup for multiple output types, as Agavi allows me, yes, but it fits for the project ;)

I should add that, working without that templating guy for almost a year now, i had to create the full forms stuff for myself...

I also didn&#039;t want to start any religious framework-fight, dear &quot;Agavi-Polizei&quot; ^^</description>
		<content:encoded><![CDATA[<p>@Felix:</p>
<p>&#8220;Templating guys&#8221; is another point where Zend_Form is lacking, in comparison, but as i said before you should keep an eye on those guys not changing the input names <img src='http://www.logaholic.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Also, i don&#8217;t think we should allow &#8220;templating guys&#8221; to use evil includes/requires in templates at all.</p>
<p>Without (basic) php skills one can only influence Zend forms via CSS, which sometimes may not be enough.</p>
<p>Parameter remapping as principle is counter-productive imho. Yes, you can correct any bad template with PHP workarounds &#8211; but not only in Agavi <img src='http://www.logaholic.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I appreciate your deep insights as a certainly more experienced agavi user <img src='http://www.logaholic.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>@Veikko:<br />
Valid point.</p>
<p><strong>To conclude</strong> (<i>again</i>), i&#8217;d say that i personlly, for some small html-only forms, which don&#8217;t need extensive/non-standard styling, still prefer Zend_Form. I do have disadvantages for not being able to use one validator setup for multiple output types, as Agavi allows me, yes, but it fits for the project <img src='http://www.logaholic.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I should add that, working without that templating guy for almost a year now, i had to create the full forms stuff for myself&#8230;</p>
<p>I also didn&#8217;t want to start any religious framework-fight, dear &#8220;Agavi-Polizei&#8221; ^^</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Felix Gilcher</title>
		<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/comment-page-1/#comment-75</link>
		<dc:creator>Felix Gilcher</dc:creator>
		<pubDate>Tue, 28 Apr 2009 15:28:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.logaholic.de/?p=64#comment-75</guid>
		<description>@Karsten: You&#039;re free to reuse fragments of templates via include() or require() or any other inclusion mechanism your favorite template engine offers. The same is true for validation definitions - you can either predefine and name them in a parent config or use xinclude to pull them from another config file, so given a reasonable buildup you&#039;d have a max of 2n places to adapt. I&#039;d not call relying on a set of names code duplication - it&#039;s more like an interface, especially if you regard in terms or RPC request.

Agavi validation can remap parameter names easily, so you rarely have any case where you really need to change the input names at all. 

Having the HTML-Code for the form separate from any logic is a major advantage IMHO:
- you can have a dedicated template builder change the html at his liking as long as he keeps the parameter names. Often dedicated template builders know HTML very well, but little in terms of real programming language. 

- HTML/CSS offers all required capabilities for arbitrary complex form layouts out of the box. With a form builder you often have to modify program code to achieve a result that was not intended by the developers.

cheers

felix</description>
		<content:encoded><![CDATA[<p>@Karsten: You&#8217;re free to reuse fragments of templates via include() or require() or any other inclusion mechanism your favorite template engine offers. The same is true for validation definitions &#8211; you can either predefine and name them in a parent config or use xinclude to pull them from another config file, so given a reasonable buildup you&#8217;d have a max of 2n places to adapt. I&#8217;d not call relying on a set of names code duplication &#8211; it&#8217;s more like an interface, especially if you regard in terms or RPC request.</p>
<p>Agavi validation can remap parameter names easily, so you rarely have any case where you really need to change the input names at all. </p>
<p>Having the HTML-Code for the form separate from any logic is a major advantage IMHO:<br />
- you can have a dedicated template builder change the html at his liking as long as he keeps the parameter names. Often dedicated template builders know HTML very well, but little in terms of real programming language. </p>
<p>- HTML/CSS offers all required capabilities for arbitrary complex form layouts out of the box. With a form builder you often have to modify program code to achieve a result that was not intended by the developers.</p>
<p>cheers</p>
<p>felix</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Veikko Mäkinen</title>
		<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/comment-page-1/#comment-74</link>
		<dc:creator>Veikko Mäkinen</dc:creator>
		<pubDate>Tue, 28 Apr 2009 14:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.logaholic.de/?p=64#comment-74</guid>
		<description>&quot;In my opinion the dry principle is broken by the need to put the raw html-code for the form in not only one view.&quot;

That&#039;s not true. You can reuse the html template even if you have different Input and Error views.

&lt;code&gt;
//re-use Input template in FooErrorView
$this-&gt;getLayer()-&gt;setTemplate(&#039;FooInput&#039;);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>&#8220;In my opinion the dry principle is broken by the need to put the raw html-code for the form in not only one view.&#8221;</p>
<p>That&#8217;s not true. You can reuse the html template even if you have different Input and Error views.</p>
<p><code><br />
//re-use Input template in FooErrorView<br />
$this-&gt;getLayer()-&gt;setTemplate('FooInput');<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Karsten Deubert</title>
		<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/comment-page-1/#comment-73</link>
		<dc:creator>Karsten Deubert</dc:creator>
		<pubDate>Tue, 28 Apr 2009 13:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.logaholic.de/?p=64#comment-73</guid>
		<description>@Felix:
Thank you for your extensive comment.

In my opinion the dry principle is broken by the need to put the raw html-code for the form in not only one view. If you wanted to change the input-names of the form, you&#039;d have to change them in 2+n places (validation + form + any other place/view you put that form).

I didn&#039;t think of other output types and their validation, but you certainly have a point there. This may be an area where the encapsulation of the Zend_Form has its disadvantages - you should only use it for pure html documents (ajax too). The advantage it gets therefore, in my opinion, is its integration into *any* template engine - by using a __toString() mechanism, you just have to pass a string (which includes the whole form html and errormessages) to your view/template.

Zend provides different classes for SOAP/XmlRpc/JSON-RPC, where you can not (without obstacles) reuse validation from a Zend_Form object.
This is a major design difference imho, and I&#039;d say that both approaches are suitable for different purposes.

Btw, i don&#039;t think my post was neutral, either ;)</description>
		<content:encoded><![CDATA[<p>@Felix:<br />
Thank you for your extensive comment.</p>
<p>In my opinion the dry principle is broken by the need to put the raw html-code for the form in not only one view. If you wanted to change the input-names of the form, you&#8217;d have to change them in 2+n places (validation + form + any other place/view you put that form).</p>
<p>I didn&#8217;t think of other output types and their validation, but you certainly have a point there. This may be an area where the encapsulation of the Zend_Form has its disadvantages &#8211; you should only use it for pure html documents (ajax too). The advantage it gets therefore, in my opinion, is its integration into *any* template engine &#8211; by using a __toString() mechanism, you just have to pass a string (which includes the whole form html and errormessages) to your view/template.</p>
<p>Zend provides different classes for SOAP/XmlRpc/JSON-RPC, where you can not (without obstacles) reuse validation from a Zend_Form object.<br />
This is a major design difference imho, and I&#8217;d say that both approaches are suitable for different purposes.</p>
<p>Btw, i don&#8217;t think my post was neutral, either <img src='http://www.logaholic.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Veikko Mäkinen</title>
		<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/comment-page-1/#comment-72</link>
		<dc:creator>Veikko Mäkinen</dc:creator>
		<pubDate>Tue, 28 Apr 2009 13:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.logaholic.de/?p=64#comment-72</guid>
		<description>&quot;Forms are used in nearly any web application where you expect user-input.&quot;

This is true but it&#039;s not the whole truth - web applications are getting more and more user input from other sources too and this is where built-in form helpers that try to do everything (output rendering, data population, input validation, data re-population, error message injecting etc.) usually start to go sour.

I don&#039;t know much about Zend so I&#039;d be really interested to see how you&#039;d handle a situation where input for an action can come from a HTML form, from another action (forwarding) or JSON. Can you still use Zend_Form? I can tell you this is easy with Agavi :)


-veikko (a long time Agavi user and contributor and probably just as much biased as Felix :)</description>
		<content:encoded><![CDATA[<p>&#8220;Forms are used in nearly any web application where you expect user-input.&#8221;</p>
<p>This is true but it&#8217;s not the whole truth &#8211; web applications are getting more and more user input from other sources too and this is where built-in form helpers that try to do everything (output rendering, data population, input validation, data re-population, error message injecting etc.) usually start to go sour.</p>
<p>I don&#8217;t know much about Zend so I&#8217;d be really interested to see how you&#8217;d handle a situation where input for an action can come from a HTML form, from another action (forwarding) or JSON. Can you still use Zend_Form? I can tell you this is easy with Agavi <img src='http://www.logaholic.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>-veikko (a long time Agavi user and contributor and probably just as much biased as Felix <img src='http://www.logaholic.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Felix Gilcher</title>
		<link>http://www.logaholic.de/2009/04/24/agavi-vs-zend-framework-part-1-forms/comment-page-1/#comment-71</link>
		<dc:creator>Felix Gilcher</dc:creator>
		<pubDate>Tue, 28 Apr 2009 12:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.logaholic.de/?p=64#comment-71</guid>
		<description>I&#039;d argue that agavi does not violate the dry principle here. 

The validation definition is separate for a reason: 

- The validation may incorporate parameters that are not held in the form, but in a cookie, a header, the url or any other source. Splitting the validation up in multiple definitions would be worse.

- The same validation definition is used for form posts, SOAP requests, XML-RPC, JSON-RPC or any other request method.

- The same validation mechanism can be used for pure PHP templates, Tal/Metal templates, Dwoo, Smarty or any other templating engine you choose to use. How does Zend integrate with those?

I also don&#039;t get the point where code duplication occurs? Are you referring to the fact that agavi encourages you to create a separate error view? I&#039;d argue that the error view serves a different purpose than the input or success view - it&#039;s less obvious when you&#039;re using pure HTML, but saves you a ton of work when you&#039;re using any other response type - JSON, AJAX, SOAP, name it.

However, I admit that I&#039;m certainly opinionated here as I&#039;m an agavi developer.

Cheers 

felix</description>
		<content:encoded><![CDATA[<p>I&#8217;d argue that agavi does not violate the dry principle here. </p>
<p>The validation definition is separate for a reason: </p>
<p>- The validation may incorporate parameters that are not held in the form, but in a cookie, a header, the url or any other source. Splitting the validation up in multiple definitions would be worse.</p>
<p>- The same validation definition is used for form posts, SOAP requests, XML-RPC, JSON-RPC or any other request method.</p>
<p>- The same validation mechanism can be used for pure PHP templates, Tal/Metal templates, Dwoo, Smarty or any other templating engine you choose to use. How does Zend integrate with those?</p>
<p>I also don&#8217;t get the point where code duplication occurs? Are you referring to the fact that agavi encourages you to create a separate error view? I&#8217;d argue that the error view serves a different purpose than the input or success view &#8211; it&#8217;s less obvious when you&#8217;re using pure HTML, but saves you a ton of work when you&#8217;re using any other response type &#8211; JSON, AJAX, SOAP, name it.</p>
<p>However, I admit that I&#8217;m certainly opinionated here as I&#8217;m an agavi developer.</p>
<p>Cheers </p>
<p>felix</p>
]]></content:encoded>
	</item>
</channel>
</rss>

