GWT Lifecycle Flow - gwt

Hi i am new to GWT but i have gone through and understood the Functionalities and what GWT do ! but i was not able to understand the Lifecycle or Work Flow of GWT when we will create a project
Example
I have created the GWT project so after i deploy it from where it will start like
web.xml or *.gwt.xml
and where it will go to
Please guide me through this.what is the Flow for GWT from where it will start and proceed.

What you are looking for is called the GWT bootstrap process. It is explained quite well in the official documentation, see the points 1 to 5.
Mind that the above explanations are only correct for production mode (once you app is compiled and deployed). Running the app from your IDE using the GWT developer mode is a whole different story.

Your question sounds to me a little bit ambiguous or too much generic.
For a better understanding of GWT Projects you have to read this: https://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects

from gwt.xml you will specify the entry point class which is the starting point of the gwt. The entry point class contains the onload module function which will be called first. So from onmoduleload() you will start writing the first code to execute.
GWT UI is build over the root panel, so all the widgets that you put will bind over the root panel in the onmoduleload() code.
Hope this helps for first shot

Related

Is it possible to use mvp4g to create a library?

I'm creating a GWT application using mvp4g. As part of the application, I'm also creating a library in another gwt module; this library follows the mvp4g pattern, but here I'm creating everything by myself, Views, Presenters, Events, Handlers.
The library is used in different parts of the main application. Basically, the library gives a main widget which is configured depending on the section of the application, that's enabling features by adding other widgets (from the same library) to the main widget.
Also, the library is suposed to be used in other projects, therefore other widgets can be created and added to the main widget.
So, I'd like to know if there's a way to use mvp4g to create this library, or if mvp4g is only used for applications. Is there any other mvp library that allow to accomplish this?
Thanks in advance.
mvp4g allows you to follow a structured approach to developing with gwt code. It should be usable in a library project without entry point as easily as in project with entrypoint.
It is possible to create one or more client libraries and add them as dependencies to a webapp you are compiling using the GWT compiler.
See Dividing code into multiple modules, here:
https://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects.
Maven or Gradle are good options for collecting, building and packaging your code into functional units.

how to debug GWT 2.4 in sigel with eclipse?

Exists some way to do hot redeploy when developing with gwt 2.4 in eclipse so i can make some change in the view like the text of a label and then press refresh or something like that and the modification appear? that problem is because the project i'm running takes at least 50 minutes to compile and wait 50 minutes just for one text of a label for example is hard...
Well ok, you're question is somewhat vague, but here's some points that hopefuly will help:
Yep, GWT compilation is slow. If you have a big GWT project, it might take good minutes for it to compile. This is sort of a known issue. What you can do to solve this is split your project into multiple GWT libraries and just compile the library you're currently working with.
Regarding hot deploy: your gwt project has two types of code: client code and server side code. The client side code (which is translated to Javascript by the GWT compiler) is hot-deployable. If you follow the instructions here:
https://developers.google.com/web-toolkit/gettingstarted
you'll have a "magic button" that lets you hot deploy your project into any of the more popular browsers. This means that you can modify your client-side code, refresh your browser and it's updated.
For the server-side code that doesn't work. AFAIK, you need to re-compile your project for those modification to be taken into account.
Have you tried GWT Designer?
Read more : https://developers.google.com/web-toolkit/tools/gwtdesigner/

How can I configure the GWT Designer in the Google eclipse plugin

I created a GWT project and everything was great, but then I decided to change the entry point of the application.
It turns out that the class implementing EntryPoint has to be at top level inside the client package.
com.company.project.myui.client.WebUI was my original setup - I changed it to
com.company.project.myui.client.ui.NewEntryPoint
When I realized that this is not a supported configuration, I changed it back and everything is compiling, but now the GWT designer expects my views to be somewhere under
com.company.project.myui.client.ui.client which is wrong and it wont parse any of the ui classes.
I can't figure out where it is getting this configuration from.
Any help will be greatly appreciated!
You should provide a test case and a more complete error description (a complete stack trace at minimum).
Fixed it by deleting the second bundle and its bundle.xml configuration file.
Still, in my opinion this was unexpected behavior from the GWT designer.

Large scale application with GWT

I'm using GWT (2.0.x) to develop a large scale and modularized application, but some modules have a lot of classes.
I'm facing a problem with GWT in development, because the DevMode it's taking a long time (processing) when I change every client-side class and refreshing at the browser.
My last option is to split more that modules, but I'm thinking to edit the GWT-DEV source code and "tell him" to do hotdeploy only on selected classes.
I have another option rather than edit GWT-DEV source code ?
Try using GWT.runAsync() to lazy load your code. If you can load only those modules that you need. You can make fairly complex web apps using GWT which run very fast. Hope you are following the MVP architecture recommended by google. Any extra information regarding the number of your classes etc will be helpful if figuring out if you need to reconsider your architecture or not.

GWT: UiBinder or GWT Designer?

I have my first GWT project that I created using UiBinder (GWT 2.0 way) which I found to be easier than write my UI creation Java source code (GWT 1.0 way).
But I saw this thing called GWT Designer that Google are releasing for free. It has nice features and wizards which were missing with the standard Google Eclipse Plugin. I like it, but I still think that using UiBinder is better. I think GWT Designer will be really useful when it can help you write UiBinder XML files (GWT 2.0 way), and not just source code (GWT 1.0 way).
What do you think about it?
Do I need to migrate to GWT Designer project?
Will it be better if I migrate but still keep UiBinder UI creation?
The latest GWT Designer now has support for UiBinder, and it works great.
http://download.instantiations.com/D2GWTDoc/continuous/latest/docs/html/wizards/gwt/uibinder_composite.html
UiBinder can give you better performance and a better optimized download than traditional widget construction; to me that's enough of a reason to stick with UiBinder. If your app is light and fast enough as it is then the choice probably comes down to what style of development suits you best.
I wouldn't go as far as to port your existing UiBinder templates into the designer. Google will be adding support for them to GWT designer soon enough.
I haven't used the newly-freed GWT Designer yet myself, but I wouldn't expect that it would warrant migrating your entire project over to it if it's already written using UIBinder.
Remember that the two methods of constructing a UI are not mutually exclusive -- you can use the GWT Designer to create a new widget and use it in an existing UIBinder project, and if you decide it's that much better, you can consider migrating at that point. Or not, since they can still happily coexist.
If you are doing professional development in an organization that utilizes experts in CSS and html, then GWt is going to be a tough sell if you don't use something like UIBinder for layouting as well as individual pages. I also think that a CSS designer can do a better job at responding to UI requirement changes than a java developer using GWT layouting techniques.
However if your java staff has control of the requirements and don't have to answer to UI designers, then I suppose choosing between delcarative templates and something like GWT Designer is just a matter preference.
As said in the relaunch announcement:
Now that these products are available again, we hope you’ll start using them within your GWT projects. Meanwhile, our next step is to more deeply unify them into the GWT family of tools by blending the fantastic Instantiations technology into the Google Plugin for Eclipse (GPE). So, there’s much more to come, including things we’re pretty sure you’ll like, such as UiBinder support in GWT Designer.
It wouldn't make sense to get ride of your UiBinder code since GWT Designer will support it soon.
DON'T use the designer plugin. The most recent update (8.1.1 at the time of this post) contains buttons that allow the user to add elements that are incompatible with IE, for instance CellTable, DeckPanel, HorizontalPanel and VerticalPanel.
This means whoever uses the plugin, uses it entirely at their peril. If IE7 tries to pull in these elements, it will load a partial page but fail to load components that use these elements. IE8 may not be able to load the application at all.