Implementing Normal HTML Instead of GWT

276 views
Skip to first unread message

sampath88

unread,
Sep 30, 2012, 3:45:14 AM9/30/12
to google-we...@googlegroups.com

Hi,
     We started using GWT from few months ago. We are about to use normal HTML files, instead of using GWT-HTML.  I have few concerns regarding this.


My Questions:-

If we use normal HTML instead of GWT HTML.

*) Is it possible to Compile both Class-files and HTML files using GWT?

*) Is it possible to maintain session and cookie in GWT. For Ex[In Browse without logging out our session. If we close the browser and if we re-open it. Our session will opened because it will maintain session and cookies. Similarly, Is it possible using normal HTML in GWT ]

*) Is it possible to redirect  from  HTML to GWT and vice-verse?


Please provide your precious suggestion.

Thanks,

Manuel Carrasco Moñino

unread,
Sep 30, 2012, 4:18:24 AM9/30/12
to google-we...@googlegroups.com
On Sun, Sep 30, 2012 at 9:45 AM, sampath88 <arnoldk...@gmail.com> wrote:

Hi,
     We started using GWT from few months ago. We are about to use normal HTML files, instead of using GWT-HTML.  I have few concerns regarding this.


My Questions:-

If we use normal HTML instead of GWT HTML.

*) Is it possible to Compile both Class-files and HTML files using GWT?

You can host your script (gwt generated js) in any html file (static html, dynamic .jsp, etc) and you can interact with the elements of this html, wrapping html elements in widgets, accessing the elements with gwt DOM methods, or using css selectors with gwt-query: https://code.google.com/p/gwtquery/

If you want html stuff inside gwt scripts, you have to use UIBinder: https://developers.google.com/web-toolkit/doc/latest/DevGuideUiBinder
 


*) Is it possible to maintain session and cookie in GWT. For Ex[In Browse without logging out our session. If we close the browser and if we re-open it. Our session will opened because it will maintain session and cookies. Similarly, Is it possible using normal HTML in GWT ]

Yes, cookies is something related with your html page location so gwt scripts in those html pages should maintain the cookies. 
A different thing is how to restore the gwt las status, I mean if in this page gwt has rendered some thing because of  an iteration with user you have to know somewhere that status (cookies, localstorage, url hash, etc)
 


*) Is it possible to redirect  from  HTML to GWT and vice-verse?

No idea what you are asking, but basically a gwt app is a javascript inside an html, and redirections are perform through html, so when you change to other html, your app is unloaded from memory and you have to load it in the new html.
 



Please provide your precious suggestion.

Thanks,

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/SibUkhXAx6IJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Michael Allan

unread,
Sep 30, 2012, 6:44:17 PM9/30/12
to google-we...@googlegroups.com
Manuel Carrasco Mo�ino said:
> ... basically a gwt app is a javascript inside an html, ... so when
> you change to other html [page], your app is unloaded from memory
> and you have to load it in the new html [page].

If anyone needs to avoid page unloading, here's a branch of GWT with
limited support for the BFCache (rapid back-and-forth navigation):
http://zelea.com/project/gwt/

--
Michael Allan

Toronto, +1 416-699-9528
http://zelea.com/

Manuel Carrasco Moñino

unread,
Oct 1, 2012, 12:34:27 AM10/1/12
to google-we...@googlegroups.com


On Mon, Oct 1, 2012 at 12:44 AM, Michael Allan <mi...@zelea.com> wrote:

Manuel Carrasco Moñino said:
> ... basically a gwt app is a javascript inside an html, ...  so when
> you change to other html [page], your app is unloaded from memory
> and you have to load it in the new html [page].

If anyone needs to avoid page unloading, here's a branch of GWT with
limited support for the BFCache (rapid back-and-forth navigation):
http://zelea.com/project/gwt/

Michael, Interesting stuff, a couple of cuestions:
. are you planning to send this to gwt?
. to play with this code, do I have to download the entire kit or may I patch just some classes?
. does it work with 2.5.

- Manolo

 


--
Michael Allan

Toronto, +1 416-699-9528
http://zelea.com/
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

Michael Allan

unread,
Oct 1, 2012, 9:33:10 PM10/1/12
to google-we...@googlegroups.com
Manuel said:
> . are you planning to send this to gwt?
> . to play with this code, do I have to download the entire kit or may I
> patch just some classes?
> . does it work with 2.5.

I plan to merge 2.5 once it's released. I expect it'll work, though
there might be trade offs. We absolutely need the BFCache for our app
because it runs cross-page. So we'd override anything that was
incompatible, if we had to.

If you need to patch it across to the RC meantime, here are the diffs:
http://zelea.com/var/db/repo/gwt/

If anyone else finds it useful, we can look at sending it upstream.

--
Michael Allan

Toronto, +1 416-699-9528
http://zelea.com/


Manuel Carrasco Mo�ino said:
> On Mon, Oct 1, 2012 at 12:44 AM, Michael Allan <mi...@zelea.com> wrote:
>

sampath88

unread,
Oct 2, 2012, 3:48:10 AM10/2/12
to google-we...@googlegroups.com
Hi,

           I have another concern regarding GWT.

Questions:-

*) Is it possible to use both GWT-UI Binder and normal HTML files. For Ex: [So far we have been using GWT UI-Binder. Since we are facing some difficulties. We have   planned to use normal HTML files only for our fore-coming features.].

*) Is it possible to Bundle Normal HTML files with the GWT UI-Binder class files ?.

*) Dynamic Pages can be accessed, in case if we use normal HTML files instead GWT UI-Binder?.

Awaiting for your valuable suggestions.

Advance Thanks,

Manuel Carrasco Moñino

unread,
Oct 2, 2012, 4:02:54 AM10/2/12
to google-we...@googlegroups.com

*) Is it possible to use both GWT-UI Binder and normal HTML files. For Ex: [So far we have been using GWT UI-Binder. Since we are facing some difficulties. We have   planned to use normal HTML files only for our fore-coming features.].

The advantage of GWT-ui files are that they become a gwt-widget available in java code saving many boiler code related with html, layouts, events etc.

If you dont want those widgets, and you just need html fragments to put in your ui, you can use ajax to get that fragments or include those in compile time (See https://developers.google.com/web-toolkit/doc/latest/DevGuideClientBundle#TextResource).

Once you have those html fragments you can insert them in your ui using HTML widget and DOM.
I think a good option is gwtquery so as you can use it to download html fragments (see GQuery.ajax), put them in your ui (even modifying widget contents) , and enhance them adding events etc.

 

*) Is it possible to Bundle Normal HTML files with the GWT UI-Binder class files ?.

afaik no
 

*) Dynamic Pages can be accessed, in case if we use normal HTML files instead GWT UI-Binder?.

Using ajax: yes, otherwise changing between pages need that you insert your gwt script in each one. 
Think that GWT is a typical case of SPI (Single page interface)


- Manolo

Manuel Carrasco Moñino

unread,
Oct 2, 2012, 4:04:26 AM10/2/12
to google-we...@googlegroups.com
On Tue, Oct 2, 2012 at 3:33 AM, Michael Allan <mi...@zelea.com> wrote:
Manuel said:
> . are you planning to send this to gwt?
> . to play with this code, do I have to download the entire kit or may I
> patch just some classes?
> . does it work with 2.5.

I plan to merge 2.5 once it's released.  I expect it'll work, though
there might be trade offs.  We absolutely need the BFCache for our app
because it runs cross-page.  So we'd override anything that was
incompatible, if we had to.

If you need to patch it across to the RC meantime, here are the diffs:
http://zelea.com/var/db/repo/gwt/

If anyone else finds it useful, we can look at sending it upstream.



+1, I find it very  useful  

- Manolo
Reply all
Reply to author
Forward
0 new messages