[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [jfw] Re: Discussion - Package Updates for Framework 2.0

On Thursday, April 10, 2014 5:30:57 PM UTC-5, Andrew Eddie wrote:
On 11 April 2014 03:51, George Wilson <> wrote:
> Don was talking about the controller package?

I think we need to rethink the interface and I'd keep an open mind to
any reasonable suggestion. I think you can still make multitask
controllers around a single execute method, but I'm not sure whether
it's worth it any more (to have the execute method, that is).
Decoupling from the Application would make sense. Maybe another
framework has a nice controller interface?

http://docs.phalconphp.com/en/latest/api/Phalcon_Mvc_Controller.html perhaps?

Maybe start with the FrontController and think about the application flow?

Here's what I ended up with --
Interface: https://github.com/CommonApi/Controller/blob/master/FrontControllerInterface.php
Concrete: https://github.com/Molajo/Application/blob/master/Source/Controller/FrontController.php

The Interface is pretty generic (process, scheduleEvent, handleErrors, shutdown methods) --

But it's implemented in a way to interact with the IoCC and handle a set of steps ('initialise', 'authenticate', 'route', 'authorise', 'resource', 'execute', 'response')

Before and after each of those steps an event is created and registered processes are run.

It's kind of hard to provide both a useful and an "open" controller without understanding the extension structure. What really might be more helpful is to show how to fire off a hello world application that pulls in your DI and event/plugin processes. Then, with that structure in place, the MVC might start making more sense.

Andrew Eddie

Framework source code: https://github.com/joomla/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.