SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 117 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

DS.'controller.php');
$c = JRequest::getCmd('c', 'DefaultEntity')
$controller = MyextensionController::getInstance($c);
$controller->execute(JRequest::getCmd('task', 'display'));
// redirect
$controller->redirect();
Component Design
[ 86 ]
This list details some important things to consider when designing and
building controllers:
If you have one major entity, you should consider building one controller.
If you have a number of entities, you should consider using a separate
controller for each.
To manage multiple controllers, it can be useful to create another controller,
which instantiates the controllers and siphons tasks to them.
If you have a number of similar entities, you should consider building an
abstract controller, which implements common tasks.
Up to this point, we have hardly mentioned the back and frontends in relation to the
MVC. The way in which the MVC library is constructed leads us to using separate
controllers, views, and models for the front and back ends.
Since we will generally be using the same data in the front and backend, we might
want to use some of the same MVC elements in the frontend and backend.


Pages:
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129