PDA

View Full Version : How to apply GXT MVC to a GXT Web desktop application?



blackbox23
19 Jan 2010, 8:35 AM
Hello,

I'm researching on how to apply the internal GXT MVC structure into a GXT desktop application.

I started out integrating the Login dialog from the Maill application (using the MVC structure) into the GXT dekstop. The login is already working and upon a successful login, the desktop and shortcuts are displayed.

Now, I have some questions on how to move forward. I hope you can help me out by pointing me to the right direction. :)

1. I'm just starting out with GXT MVC, and the only guide I have on how to implement it is the GXT mail application sample. To integrate the MVC structure into a a web desktop app, I'm planning to make a Controller and a View that corresponds to a DEsktop Shortcut/window. IS this correct?

Ex:

- My desktop has a shortcut/window called My Machines (A masterlist grid of all the machines, with all machine info and CRUD)

- MachineView -> Constructs the view (grid with CRUD on a window).
- MachineController -> Registers the ShowMachineWindow event. IF the event is dispatched, this controller displays the view MachineView.


This structure is repeated for every shorcut/window in the dektop. IS this how to go about it? OR am I doing it all wrong? What's the best way to do it?

Thanks!

moldoe
11 May 2010, 7:22 AM
I'm curios how did you applied the MVC pattern to your desktop. Thanks!

Daniel

blackbox23
14 May 2010, 6:37 AM
There's a discussion in one of the threads here about using child controllers (using addChild()) instead of a flat controller hierarchy. I used this approach. Ive implemented a main WindowController. Each window has a controller that gets created when the shortcut is clicked and is a child of the WindowController. The WindowController also handles the life cycle of its children.