2008年10月19日星期日

Re: [fw-mvc] Creating a Zend_Dojo_View_Helper

>
> I originally went down this path, but quickly ran into difficulties. The
> current solution was actually suggested (and the original implementation
> provided) by Peter Higgins of the Dojo project. The rationale is that
> dojo.parser is actually somewhat "smarter" than doing instantiation,
> particularly when you have nested dijits. The alternative requires a
> fairly complex knowledge of the document structure, to ensure that
> parent/child relationships are created in the correct order.
There's a good reason Steven. Besides, the odd empty div isn't too much
of a problem especially when it represents a uniquely identifiable dijit
which can be easily fetched and manipulated later on.

Matthew Weier O'Phinney wrote:
> -- Daniel Skinner <skinner@destiny-denied.co.uk> wrote
> (on Sunday, 19 October 2008, 10:43 PM +0100):
>
>> Perhaps, and I have not thought this through at all, the programmatic syntax
>> should use constructors instead of attaching attributes to DOM nodes. This
>> would be fine for Tooltip except that the view helper would need to know in
>> advance whether declarative mode is enabled or not (and this may change even
>> after the helper is called). Also, even in programmatic mode the dijit form
>> helpers must return markup.
>>
>> I will think about this further if I get some time.
>>
>
> I originally went down this path, but quickly ran into difficulties. The
> current solution was actually suggested (and the original implementation
> provided) by Peter Higgins of the Dojo project. The rationale is that
> dojo.parser is actually somewhat "smarter" than doing instantiation,
> particularly when you have nested dijits. The alternative requires a
> fairly complex knowledge of the document structure, to ensure that
> parent/child relationships are created in the correct order.
>
>

没有评论: