Modules
Hi,
I thought you could incorporate some of the ideas of Guice into Robotlegs framework. In particular, modules. Instead of creating bootstrap classes, Robotlegs can have something like:
public class AbatrctModule
{
// helpers
protected function bindSignalCommand() {};
protected function bindClass() {};
protected function bindModel() {};
// ...
// to be overriden
protected function bindSignalCommands() {};
protected function bindClasses() {};
protected function bindModels() {};
// ...
public function onRegister()
{
bindSignalCommands();
bindClasses();
bindCommands();
}
}
public class NavigationModule extends AbatrctModule
{
// to be overriden
protected function bindSignalCommands() {};
protected function bindClasses() {};
protected function bindModels() {};
}
It will group the binding in logical modules.
Cheers,
Ramin
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Ondina D.F. closed this discussion on 27 Aug, 2012 10:38 AM.