Geertjan is a DZone Zone Leader and has posted 468 posts at DZone. You can read more from them at their website. View Full User Profile

Screencast: Jaroslav Tulach, "Data, Context, Interaction" and the NetBeans Platform

09.22.2009
| 9162 views |
  • submit to reddit

In this screencast, NetBeans API lead architect Jaroslav Tulach discusses MVC and how this pattern applies to applications created on the NetBeans Platform. He ends up showing how Data, Context, and Interaction (DCI architecture) applies to the NetBeans Platform, in particular in the context of the Lookup concept.

Want to try out the concepts discussed in the screencast? Go here and follow the steps described!

Published at DZone with permission of its author, Geertjan Wielenga.

Comments

Korben Dallas replied on Sat, 2010/08/21 - 5:07am

First I want to say that I like this idea, that the actions are not binded to any of the models inside the application. And I like the lookup concept to change the context of the action dependent on the current state of the application.

 But I don't think, that the DCI and the MVX pattern are exclude each other. May argumentation is the following:

From my point of view, as I understand the MVC pattern, the action (e.g. a menu action) in this case is not really the controller. The action has the responsibility of controlling the state of the menu item, and listen for user interaction (a click on it). On click it looks for the selected context or selected model and executes an operation on this model. But the business logic which is needed in order to perform this operation is dependent on the model. So it is never located directly within the action. All the business logic for the model should be located within the controller of the model. So what the action does is just performing an operation on the controller of the current active model. If we are in a modular application like netbeans, the controller and the model are not always the same. So the action must first lookup the acitive modul (model) and the controller has to implement an interface, often called cookie and implement its method with the business logic which fits to the model.

Matt Coleman replied on Thu, 2012/11/22 - 12:31am

 thank you Geeertjan!!this video helps buffalo freelance website designer  a lot

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.