PDA

View Full Version : GXT MVC implementation maturity



maku
15 May 2008, 1:24 PM
HI,

I played around with the MVC implementation of GXT and wondered about the implementation.

From my point of view the concept of initializing controller and view isn't really helpfull implemented.

For example: when I've to explicitly do the initializing (calling the initialize method) of the controller I've no possibility to set the initialize flag of the controller. But the Dispatcher checks this flag and calls initialize method when it is false (and so on).
For the view initializing, the behaviour is also funny (initializing in context of forwarding an event to a view).

(BTW, the implementation style is not Java like)

Could anybody of you share thoughts about the implementation and the experience with it?


TIA

Martin

gslender
15 May 2008, 1:35 PM
Yep, I tried to add it into my project and then removed it... I'm not sure yet if the implementation lends itself well as I only had short attempt and couldn't model a useful use so I decided to remove it for a later stage.

zaccret
15 May 2008, 10:08 PM
Yep, I tried to add it into my project and then removed it... I'm not sure yet if the implementation lends itself well as I only had short attempt and couldn't model a useful use so I decided to remove it for a later stage.

So what do you use instead ? Did you implement your own MVC design ? Are you massively using Composite widgets like in the GWT samples ?

gslender
15 May 2008, 10:45 PM
Are you massively using Composite widgets like in the GWT samples ?

Yup... and it sucks....!!

darrellmeyer
15 May 2008, 11:36 PM
Martin
I have updated the visibility of most of the fields in Controller and View to be protected including initialized.

maku
16 May 2008, 1:50 AM
Martin
I have updated the visibility of most of the fields in Controller and View to be protected including initialized.

Thanks, this makes life easier. I assume the change will be available in beta3.

BTW, from my point of view it would be helpfull to provide "Java like" getter and setters for working with class members.

zaccret
16 May 2008, 3:24 AM
BTW, from my point of view it would be helpfull to provide "Java like" getter and setters for working with class members.

I agree with you, but only for the cases we want public access to members. Here we wan't protected access so no need for getters/setters. Take a look at http://extjs.com/forum/showthread.php?p=164327#post164327 . By the way, darell, there is still some classes with public members.

zaccret
23 May 2008, 3:17 AM
Yup... and it sucks....!!

I've seen another approach in the explorer demo. There are only 3 Views (Content, App and Navigation) and you have a lot of objects extending LayoutContainer and overriding onRender. This is confusing me, here I don't clearly see the responsibility of View since most of the UI rendering logic is implemented in these Containers.

darrellmeyer
23 May 2008, 3:56 AM
The explorer demo pages are unique as they need to run in isolation. This is why each demo page implements EntryPoint and does not extend any or directly reference any demo specific classes.