PDA

View Full Version : About MVC paradigm



zaccret
7 May 2008, 6:58 AM
I would like to have other users experience on the use of View/Controller from gxt. Does it REALLY helps ? Does it seems better/easier than writing sort of "one-shot Composite widgets", like Panels, Popup, etc... widgets we find in KitchenSink sample (in gwt bundle) ?

maku
7 May 2008, 9:41 AM
I've no idea about the Ext Gwt MVC stuff and how Ext Gwt MVC is implemented because I'm new with Ext Gwt.

Im my last Gwt (research) project with (with Gwt Ext) I implemented a clean MVC solution with the combination of some patterns (MVC, Observer, Chain of Responsibilty, Command etc.)

When you have experience with UI development (e.g. in Swing but of course also in GWT) you will realize that every non trivial application has to be separated carefully.

From my point of view it is necessary to base on a powerfull well thought framework and to establish rools how the different parts of your app communicate with each other in a well defined way. When you do the development with the "one-shot Composite widgets" approach you will end up in a maintenance nightmare rather soon.

Grandiosa
8 May 2008, 1:23 AM
+1

It's all about maintenance, which in IMHO is greatly underappreciated by many project owners during initial application development. It's often just about shipping the first version regardless if future maintenance agility will suffer.
As your application grows and when new developers get involved for maintenance it will pay off if your application architecture follows the MVC pattern. That's when the true value of the codebase will be become visible.

It can be difficult to do good MVC, even if you have a "framework" like in Ext-GWT. In pure MVC everything would be based on Events, so you will use asynchronous response handling everywhere, as supposed to having your Controller call the view directly or vice versa. And synchronisation between model objects and views typically happen with Listener callbacks. In my opinon MVC doesn't really shine before you're framework also provides bindings between your Models and Views. That will make your Views much more compact and, I think, maintainable....

By the way, the Ext-GWT implementation is nice and simple to use.

fangzhouxing
15 Feb 2009, 6:28 PM
I have compared the design of MVC between Ext-GWT and gwt-mvc(http://code.google.com/p/gwt-mvc/).The first impression is that the design of gwt-mvc is better than that of Ext-GWT.

In the coming Ext-GWT 2.0, can we expect an improved design of MVC?

EagleEye666666
16 Feb 2009, 3:02 PM
I have compared the design of MVC between Ext-GWT and gwt-mvc(http://code.google.com/p/gwt-mvc/).The first impression is that the design of gwt-mvc is better than that of Ext-GWT.

In the coming Ext-GWT 2.0, can we expect an improved design of MVC?

To this i have another opinion. The keyword for GXT MVC is that it is a LIGHTWEIGHT solution. This gwt-mvc is far away to be a lightweight one. :)

I think the GXT mvc is very nice, clear, easy to handle and fits for basic needs.

Like it has been said already to follow to implement a clear mvc can be a hell of work.
I had serveral problems to find one of thousend possible solutions. This search for the good one can kill :D

regards

sdc
17 Feb 2009, 1:55 AM
I don't know a lot about the GWT-MVC but it looks close to the GXT MVC framework.
I also think that the GXT solution is lightweight.

The only issue some people encounter is that it depends on GWT History so it cannot be tested in pure JUnit : http://extjs.com/forum/showthread.php?t=58837

wokier
9 Jun 2009, 2:03 AM
Hope the second version will satisfy someone looking for a testable gwt mvc framework.
http://code.google.com/p/gwt-mvc/

Jose Jeria
10 Jun 2009, 9:10 AM
You should definitely look into GXT's MVC implementation. It is not so well documented though and might led to some confusion at first. Refering to the mail application source code is not the same as documentation.

There are several blog entries on this that you might wanna check out. Some of them very (http://raibledesigns.com/rd/entry/gxt_s_mvc_framework) explanatory (http://christianposta.com/blog/?p=6) and others very critical (http://blog.gerardin.info/archives/40/comment-page-1) on how its implementation.

fedearne
21 Jun 2009, 1:12 PM
Am I the only one not liking that the controllers are responsible for making their respective views visible?

I find both GXT's MVC and gwt-mvc to be poor mvc implementations (although they might usefull in the context in which they are used).