[dev] The Content Controller / ApplicationController - How does this work
Michael J Rubinsky
mrubinsk at horde.org
Mon Feb 20 19:07:05 UTC 2017
Quoting Ralf Lang <lang at b1-systems.de>:
> 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: lang at b1-systems.de
> 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: dev-unsubscribe at lists.horde.org
--
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3282 bytes
Desc: S/MIME Signature
URL: <https://lists.horde.org/archives/dev/attachments/20170220/b1bd3beb/attachment.bin>
More information about the dev
mailing list