Now I know this can be done using jsp and adding GWT to the jsp page,
but then I don't get to use the GWT components and the great things
that GWT brings to the table in terms of UI building. I would have to
build the initially loaded page using something else (maybe just
straight up writing html, or use some other framework) and then on top
of that, I could use GWT to work with the page elements after they are
loaded.
Now you may ask why someone would want to do this, and you might say,
well that's not what GWT is made for, but it really limits the
usefulness of GWT if it can't be used in scenarios like this.
Examples: Wiki's, stores/ecommerce systems, social sites, etc. All of
these need to have non-scripted content pages for search engines to
crawl them, they need to have unique URL's for every page and they
need to make the initial page load way faster than the initial load of
a GWT app.
So as for how it could work, it might be something like this:
Your EntryPoint (or a new subclass of EntryPoint) could have another
method such as:
public void onInitialLoad(HttpServletRequest request){
// This method would execute and be written as the original page
request.
// From the request parameter, we could get the URL and query
parameters
// and return the appropriate content, all while being able to use
GWT to build
// the UI.
// Also, the objects created and used here would be sent to the
// client onModuleLoad for a seamless experience.
}
I realize this type of feature would require a Java app server in
production, but this can be an optional feature, just like the RPC
calls, so that shouldn't be a big deal.
Thoughts?
It seems to me that nothing would stop you from doing this - you can
create as many items as you want inside of the body of your page, then
access them from GWT with DOM.getElementById(String id). I think that
you'd just create your webpage in some other environment, then create
a GWT project for it, populate all your panels by calling the DOM and
then go ahead and manipulate! you can create a root panel by using
RootPanel.get(String id) on some item you create to encompass your
app (even make it an <iframe> like GWT does). Maybe I'm confused, but
it seems like there's a lot of good support in GWT for taking existing
web pages and converting them into an AJAX/DHTML app - or am I missing
the point of your post?
-krispy
Travis
> > Thoughts?- Hide quoted text -
>
> - Show quoted text -
I can't think of a good way to do all of this in an entirely automated
manner, but I believe there is a very good reason for that... GWT !=
Dreamweaver. No, really, THEY MAKE TOOLS TO DESIGN STATIC PAGES.
These tools, when used by someone who knows what they are doing (or at
least willing to learn what they should be doing), will make BETTER
code than the GWT output. [I'm not trying to insinuate that GWT
output code is bad, just that table-based layouts tend to be heavier,
more hacked-together, and less robust than standards based layouts;
especially when the tables are generated by a framework that needs to
be able to output an arbitrary layout.] I love GWT dearly. Without
it, I wouldn't have a job, and our website (still in development)
would be years away from what we can do now. That doesn't mean I want
to use it for everything. Much like no screwdriver, no matter how
good at driving screws, will be a very good hammer; GWT just isn't a
good static page layout tool.
-Joshua Yanchar
For example, a page that gets loaded when a non-GWT compatible browser
is found, or, in certain circumstances, when the thing you need to do
is so basic, even the 100k or so of GWT are overkill.
Fortunately, something similar to this already exists:
http://www.kisgergely.com/gwt-server
http://code.google.com/p/gwt-html/wiki/Release_0_1
I haven't looked closely at these tools yet, though.
On Apr 20, 2:22 am, theClassConnection <theclassconnect...@gmail.com>
wrote:
Has anybody tried this gwt-html project?
Travis
> > -Joshua Yanchar- Hide quoted text -