Re: K3 form library
Bharat Mediratta <[email protected]> Wed, 20 Mar 2013 18:04:18 -0700
| Newsgroups | gmane.comp.web.gallery.devel |
|---|---|
| Message-ID | <CAESa+_=rDuZsEUqRn3THaozvy6OByg6QgeUs0oBJcO=DhDi-Yg@mail.gmail.com> |
Based on very little outside of your email, I think Formo is a reasonable way to go. I had a long talk with the Kohana devs a couple of years ago about whether to use Form/Validation or Forge. Their opinion was that Forge was unnecessary overhead, but without Forge I was unable to solve the problem of allowing modules to extend forms, provide validation and do error handling. We need that capability which means that we need a form object of some kind that we can pass around. Converting will be a pain, but that's ok - let's do it and not look back. -Bharat On Wed, Mar 20, 2013 at 5:52 AM, Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> wrote: > Hey gang, > > So, the Forge we used in K2 is gone. Replacing it is probably going to be > one of the stickier points of the K2->K3 process, especially for contrib > modules. > > I've started peeking at K3-compatible alternatives, and have found three > principal options: > 1. Formo module > 2. Forge module > 3. the built-in Form and Validation classes > > -- > > FORMO > > In fact, version 1.x (K2 compatible) was suggested a long time ago ( > https://sourceforge.net/apps/trac/gallery/ticket/652). Version 2.x is > for K3, and is here: > https://github.com/bmidget/kohana-formo > > It seems to be fairly actively maintained... and it has docs! > https://github.com/bmidget/kohana-formo/blob/master/guide/formo/menu.md > > This seems to be a pretty good way to go. > > -- > > FORGE > > I stumbled across this: > https://github.com/kohana-addons/forge > > ... which appears to be a K3-compatible version of Forge. Excited by the > prospect of a simpler swap, I took a glance at its source... and learned > that it doesn't seem to share the same API as the old one. In other words, > it doesn't appear to be any easier/harder to implement than Formo. > > However, it does appear to have less documentation and less active > maintenance (only a single commit). > > -- > > BUILT-IN CLASSES > > We could also forgo using object-oriented forms altogether and use the > base Form class to make the views and the base Validation class to check > the entries before we write them. In fact, googling around for K3 form > modules lands upon several sites that suggest that this is the simpler way > to go. > > Some pros: > - no extra modules to keep up with and/or go out of date > - easier division of view and controller (Form is used in the view to make > the form, Validation is used in the controller to process the inputs) > Some cons: > - need to implement our own error messages, etc. > - no tie-in with ORM (although I think this is a Forge/Formo capability we > don't really use anyway, no?) > - not object-oriented > - probably harder to translate existing modules to use this method > > -- > > My current opinion is that Formo is the way to go. Thoughts? > > Take care, > Shad > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > __[ g a l l e r y - d e v e l ]_________________________ > > [ list info/archive --> http://gallery.sf.net/lists.php ] > [ gallery info/FAQ/download --> http://gallery.sf.net ] > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ]