[dev] traditional view app best practices

Chuck Hagenbuch chuck at horde.org
Sun Feb 12 19:36:09 UTC 2012


Quoting Ralf Lang <lang at b1-systems.de>:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 23.08.2011 21:55, schrieb Chuck Hagenbuch:
>> Quoting Ralf Lang <lang at b1-systems.de>:
>>
>>> Just want a confirmation if I understood correctly and if this
>>> still is the current view
>>
>> I'll take a crack at this...
>>
>>> Using the Horde_Form_Renderer is the preferred way of presenting
>>> new forms in traditional mode views compared to writing form html
>>> tags in .inc files.
>>
>> This is okay and probably right for the "right now", but what we
>> (I?) really want is to move to forms generated by reusable
>> Horde_View widgets and stored with Horde_Rdo, with validation to be
>> refactored out of Horde_Form into a separate library (and probably
>> integrated with Horde_Rdo).
>>
>>> Horde_Templates should not be used for new code and factored out
>>> where easily possible.
>>
>> Right.
>>
>>> The templates/ dir is still the canonical place for static html
>>> snippets. (The skeleton has dropped this or maybe git doesn't
>>> care about empty dirs)
>>
>> Using Horde_View partials is preferred to this; they would live in
>> app/views.
>>
>>> Horde_View extensions live somewhere under lib/
>
> I've added /app to the wiki page on filesystem layout.
>
> I've noticed view partials (chora) and Horde_Controller (nag) being
> used in develop but didn't find out yet how/where they are used. I'd
> try converting sesha to this pattern if it is confirmed to be ready
> for primetime.

I don't of a reason it isn't...

> Is Horde_View_Helper_Form ready to replace Horde_Form or is this
> experimental/unfinished?

I think it's reasonable for simple form tags, but it doesn't have even  
10% of the overall functionality of Horde_Form. That is still an  
unsolved problem.

-chuck


More information about the dev mailing list