Tonny Kohar wrote: > Interesting read. So if it is more toward non directed rather than > stacked graph. Then current envisage graph (currently as tree) is not > suitable representation of such things. How about the old visualizer > (boxed and stacked) ? Or How about network graph, is it more suitable > representation ?
Good questions, I'm not sure what is best here. One thing I am realizing now is that it is actually possible to get it into a directed graph still, but the UI layer has to be split into two: one with the controller and one with the view. The controller sits on "top" of everything, and connects itself to the view to get UI events, which it forwards to the application. The view is the setup with UI controls, and implements various Observer interfaces that will be called by the application code. Example: // This is always true applicationLayer.uses(domainLayer); // This can be replaced with tests and mocks uiControllerLayer.uses(applicationLayer); uiControllerLayer.uses(uiViewLayer); applicationLayer.uses(uiViewLayer); --- It would even be possible to split it one more time, so that there is one layer which connects the view with the controller, separately: uiPresenterLayer.uses(uiControllerLayer); uiPresenterLayer.uses(uiViewLayer); uiControllerLayer.uses(applicationLayer); applicationLayer.uses(uiViewLayer); --- It is still a directed graph, and there is no dependency from controller to view and no dependency from model to view, other than the fact that the view implements interfaces that the model hooks into. All the "nasty UI code" is in the uiPresenterLayer, which does all the hooking. Controllers are simple, views are just passive views, and the application gets inputs which it uses to call the domain, transform the application state, and then finally call the view (indirectly through its own SPI) to get it updated. Nice and tidy! /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

