As a ASP.NET developer, we are also migrating our apps to GWT. Knowing someone who has gone through this already, will really help. Any pointers for an ASP.NET developer as I make my transition to GWT?
On Thursday, April 15, 2010 7:21:18 PM UTC-4, DrG wrote:
-- On Thursday, April 15, 2010 7:21:18 PM UTC-4, DrG wrote:
I am developing a website and have a what might be relatively easy
question for a GWT native. The question surrounds how to create and
initialise objects within GWT. I am a former ASP.Net developer so my
questions are along the lines of how I do something I would have
previously done in that framework in the new GWT format.
*** Question
Well, if I have a GWT application which consists of one
Application.Html file which is the holder for the application. This
translates to one EntryPoint and one "Main" application module. Now
if this application consists of various visual elements which can be
shown according to the interactions of the user then where is the best
place to instantiate and initialise these objects.
For instance if I have a MenuHeader UI Declarative objects and a
SideMenu Object and a MainArea object. These are all rendered at
start up in the EntryPoint module. Now the MainArea object could
display say 20 different other objects depending on what the user is
doing in the application, and the choice of object displayed is
dependent on the users selections in other child objects. My question
surrounds on the best way of handling this interaction.
*** Solution 1: Bubble events up to Main Application Module
Do I implement an event bubbling mechanism where events are raised up
the main level and then objects are instantiated there and rendered
accordingly?
*** Solution 2: Pass listeners to child objects
In the mail application supplied by Google they add this code in the
entry point module:
// Listen for item selection, displaying the currently-selected
item in
// the detail area.
mailList.setListener(new MailList.Listener() {
public void onItemSelected(MailItem item) {
mailDetail.setItem(item);
}
});
So does this mean for every event I would expect then in the Main
module I have to create a listener?
*** Solution 3: Something I am not aware of.
Solutions 1 and 2 do not seem to be good solutions for large
applications so is there something I am not aware of that GWT does or
some coding practice that someone else can suggest.
There maybe a good open source application I can refer to that deals
with this problem so any links to good examples are warmly welcomed.
Regards
Gene Conroy-Jones
www.sohoappspot.com
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com .
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com .
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en .
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment