Re: The Content Controller / ApplicationController - How does this work
Michael J Rubinsky <[email protected]> Mon, 20 Feb 2017 19:07:05 +0000
| Newsgroups | gmane.comp.horde.devel |
|---|---|
| Message-ID | <20170220190705.Horde.FV1r19thZt5Kjj2Rk4F-lKo@h4.theupstairsroom.com> |
Quoting Ralf Lang <[email protected]>: > Hi, > > I'm a little puzzled by Horde_Controller use at the moment. > > Most applications (trean, nag) have controllers in app/controllers > which inherit Horde_Controller_Base and implement abstract > processRequest() to service requests (either one controller per > action or actions separated by a switch statements) > > The content application is different. It does not seem to implement > processRequest(). It provides a base controller > Content_ApplicationController extends Horde_Controller_Base - which > does not implement processRequest. This base controller is used by > TagController (which I would have expected to be > Content_TagController) which also does not implement processRequest. > Individual actions are separate methods. > > Also, content seems to have views living under app, stored by > controller and method, which seem to get processed by some ->render > method (which is not part of Horde_Controller_Base nor > Content_ApplicationController) > > How does this work? Where is the magic part I am missing? > Is this design considered future proof or is this a dead end which I > should not follow designing new applications? To tell the truth, the implementation in Content is probably broken. Chuck wrote that very early on as a POC and it's not used anywhere in out code (we access the API directly, and don't use the routes/controller interface). I would base your code after the way it's done in E.g., Nag or Trean. The Horde website (https://github.com/horde/horde-web) also uses Horde_Controller and Horde_Routes, as well as my personal website (https://github.com/mrubinsk/turweb_blog) if you want to see other examples. > Regards > > Ralf > > > -- > Ralf Lang > Linux Consultant / Developer > Tel.: +49-170-6381563 > Mail: [email protected] > B1 Systems GmbH > Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de > GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 > -- > dev mailing list > Frequently Asked Questions: http://wiki.horde.org/FAQ > To unsubscribe, mail: [email protected] -- mike The Horde Project http://www.horde.org https://www.facebook.com/hordeproject https://www.twitter.com/hordeproject -- dev mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]
smime.p7s
(application/pkcs7-signature, 3.2 KB) - not displayed