[dev] traditional view app best practices

Ralf Lang lang at b1-systems.de
Wed Aug 31 18:18:35 UTC 2011


Am Mittwoch, 24. August 2011, 10:19:24 schrieb Jan Schneider:
> Zitat von Chuck Hagenbuch <chuck at horde.org>:
> > 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).

Wouldn't this tie content validation too strong together with relational/sql 
databases? Maybe one could provide Rdo-like interfaces for Ldap or Kolab or 
[some other datastore] if needed. That said, I really like Rdo and have 
(ab)used it a couple of times. Encapsulating Rdo_Base items inside some 
controlling class probably helps me stop over-using the magic getters.

However your comment helped me understand Horde_View is more than the 
successor to Horde_Template.

Never thought of Horde_View as the V in MVC but with the presence of 
Horde_Controller and Horde_Model it's quite obvious. I'll watch the codebase 
for some usage examples while I go through for the license thing.

> > 
> >> 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.
> 
> We probably want to further flesh out best practices for modern H4
> apps, even when using traditional views, and implement that in skeleton.
> 
I see Jan is right in the middle of this.

-- 
Ralf Lang
Linux Consultant / Developer

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537


More information about the dev mailing list