RIP (Rich Internet Pages) instead RIA

53 views
Skip to first unread message

dreamer

unread,
Aug 5, 2011, 9:50:34 PM8/5/11
to Google Web Toolkit
Hi,

How about if it is possible to build Rich Internet Page (RIP), in a
more productive tool like GWT designer and eclipse plug etc
and server serving these pages using some web framework ?

My friend asked why don't you hand code html+ajax, sure that is
perfect, if that magic is possible with GWT, how productive it would
be?

What is wrong with GWT RIA apps, Problem is I don't see pages, I see
entire app,comes onto browser and my server becomes dummy.

What is wrong server being dummy? because Browser is supposed to be
thin and you can use it on 10 devices in single day.

You open browser on cell phone, laptop,desktop where not, still use
the same app. so application can not be one big bundle.

It needs to be page at a time. Ok, then it is not RIA app, then it is
RIP.

So why I don't I settle for a RIP (Rich Internet Page) ? - looks cool
to me. Is it possible to build using my favorite GWT+AppEngine. ?

Stay tuned, I will Let you know

---Dreamer

Magno Machado

unread,
Aug 5, 2011, 10:27:21 PM8/5/11
to google-we...@googlegroups.com
What it your app read a particular parameter on the URL that tell the app what "page" should be rendered, then everytime you need to display a new page, you generate a get request with the parameter for the page you wish to display.

If you use runAsync on each page, the browser will always load only the JS for the current page, not the whole app code


--
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-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Magno Machado Paulo
http://blog.magnomachado.com.br
http://code.google.com/p/emballo/

dreamer

unread,
Aug 5, 2011, 11:49:51 PM8/5/11
to Google Web Toolkit
Thanks for the reply Magno Machado Paulo.

Code splitting is a console, documentation is telling on main page,
for every event click where
ever we need to load composite, suggested to use GWT.runAsync.

But the problem is I ended up getting Async call within Another Async
call, one for loading composite, on success another
async RPC call to get Model, for some reason even main page is not
that fast, in fact I observed some slow.
This is pure implementation issue.

Conceptually, why async call to load another page, why don't we submit
entire page and get fresh page along with model applied to view on
server itself like jsp?
Why don't I use jsp? - I want to develop like a swing app with ajax
capability and drag and drop designer.



On Aug 5, 7:27 pm, Magno Machado <magn...@gmail.com> wrote:
> What it your app read a particular parameter on the URL that tell the app
> what "page" should be rendered, then everytime you need to display a new
> page, you generate a get request with the parameter for the page you wish to
> display.
>
> If you use runAsync on each page, the browser will always load only the JS
> for the current page, not the whole app code
>

Magno Machado

unread,
Aug 6, 2011, 6:07:29 AM8/6/11
to google-we...@googlegroups.com
You could use your server to fetch the data and embed it on the host page. Then when the GWT code is loaded, it can read the data and render the screen without making a new request on the server... For exemple:
The server receives the request, fetch a list of contacts on the DB and write it on the hostpage
The host page is sent back to the browser
The browser loads the host page, which in turn load your GWT code
In your entrypoint, you read what is the current page, make an async call to load the javascript for that page
Instead of making a RPC call to load the data, you can read the data already embeded on the host page

Now the user clicks on an "Edit contact" link on the page
The browser will send a get request for http://your-app.com/?page=editcontact&contactid=1


I don't know how mobile browsers cache pages (maybe for the sake of disk space, they don't?), but hopefully all the JS will get cached on the browser once they're loaded for the first time

dreamer

unread,
Aug 6, 2011, 10:57:34 AM8/6/11
to Google Web Toolkit
Thanks Magno Machado Paulo.
You are suggesting to reverse the calls. Meaning first call RPC to
load model then gwt async to load
view&presenter. second gwt async can be called only on success of
first rpc for model. to make sure model is available in all
conditions.

So there are two async server calls no matter how we do it. more over
code splitting
is not transparent like individual pages, where you send which ever
page you want filled with data to client.

We should have flexibility to serve the page either from client or
server, so that we can get advantage of both worlds.
Every thing on client including decision making may not fit well for
enterprise class solutions as all Enterprise resources
are at server, which are well protected etc.

It would be awesome if we get best of both worlds.

-Venu
http://schoolk12.appspot.com/


On Aug 6, 3:07 am, Magno Machado <magn...@gmail.com> wrote:
> You could use your server to fetch the data and embed it on the host page.
> Then when the GWT code is loaded, it can read the data and render the screen
> without making a new request on the server... For exemple:
> User requesthttp://your-app.com/?page=contactlist
> The server receives the request, fetch a list of contacts on the DB and
> write it on the hostpage
> The host page is sent back to the browser
> The browser loads the host page, which in turn load your GWT code
> In your entrypoint, you read what is the current page, make an async call to
> load the javascript for that page
> Instead of making a RPC call to load the data, you can read the data already
> embeded on the host page
>
> Now the user clicks on an "Edit contact" link on the page
> The browser will send a get request forhttp://your-app.com/?page=editcontact&contactid=1
>
> I don't know how mobile browsers cache pages (maybe for the sake of disk
> space, they don't?), but hopefully all the JS will get cached on the browser
> once they're loaded for the first time
>

Andy Stevko

unread,
Aug 6, 2011, 4:08:53 PM8/6/11
to google-we...@googlegroups.com
You may want to investigate other toolkit frameworks that fit your wants better.

One that comes to mind is Closure which, I have read, allows for the creation of pages in both the browser and server via the use of templates. For clients that have a fast client, the browser loads javascript and renders the page locally. For clients that have a slow client (think phone browser), the server renders the html page and dumps the html only.

http://code.google.com/closure/
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M. Andretti





dreamer

unread,
Aug 6, 2011, 6:40:14 PM8/6/11
to Google Web Toolkit
Thanks for reply Stevko.

Meaning big javascript verses bunch of html pages.

would it be great if some we combine these ?
In module html file we load entire java script, why not small chunk of
javascript
just to render that page? - for outside it is just a html page.

Will multiple modules serves the purpose?
May be I can open different module's html page with "window.open".

One GWT module for page ? - do-able - not sure. Let me try.
Only compromise is client is driving the page flow not server, at
least one step forward.


On Aug 6, 1:08 pm, Andy Stevko <andy.ste...@gmail.com> wrote:
> You may want to investigate other toolkit frameworks that fit your wants
> better.
>
> One that comes to mind is Closure which, I have read, allows for the
> creation of pages in both the browser and server via the use of templates.
> For clients that have a fast client, the browser loads javascript and
> renders the page locally. For clients that have a slow client (think phone
> browser), the server renders the html page and dumps the html only.
>
> http://code.google.com/closure/
>

dreamer

unread,
Aug 6, 2011, 6:54:50 PM8/6/11
to Google Web Toolkit
ya, even with another module we just get view, not model.

Karthik Reddy

unread,
Aug 6, 2011, 9:33:01 PM8/6/11
to google-we...@googlegroups.com
Or you could wait for server-side rendering to be supported by GWT. The GWT team has dropped few hints in a couple of threads indicating that the day could not be very far off when GWT does support server-side rendering. See the following threads:

 ...............It allows us to optimize for different browsers, and it even opens the door for server side rendering.


The latter can be user in a regular JVM to create an HTML string, which will hopefully help with server side rendering in the future.

Another relevant thread I have started regarding GWT, Closure, server-side renderinghttps://groups.google.com/forum/#!topic/google-web-toolkit-contributors/u4fn7zZYmD4

dreamer

unread,
Aug 7, 2011, 9:28:08 AM8/7/11
to Google Web Toolkit

Thanks Karthik for the reply.

Client side rendering (DOM manipulation) and Server side rendering
(HTML manipulation), certainly these
achieve rendering efficiency, but still programming approach is still
same, that client side event programming.

Server can get away from rendering totally, keeping the business logic
with it, and serve view+model+presenter to server, so
that client can what it is best at, and server can what is best at.

Creating event is the only way to get any resource from server in
current GWT during run time. Please correct me , if wrong.
Server could send entire page + presenter as as java script and Model
to client, We can leverage Browser DOM, to apply Model to view as
in today. That way you only serve the java script, really you need.

Programmer can only visualize the page is in AJAX world, I have seen
extreme apps, there is only single page, other extreme our jsp page
with little java script.

Code splitting, server rendering - makes different. But approach
remains same, where client will have entire app and makes server calls
on user events.

We can get the best of both worlds, like every thing on server (jsp
model) and every thing on client (GWT) model.
Server should remain as brain for using Enterprise resources etc, that
server will be able every thing that is need for client, for ajax page
in one shot, Client can do DOM manipulation, little bit of event-ing
if required, like refreshing with new values etc.

Hand written AJAX page should be same as GWT generated page, that GWT
will remain like tool, still programmer will have
flexibility to choose what approach suits for his application. For few
web apps, RIA approach may be more lively.

Is there any easy way in GWT, to post entire page and get new page ?








On Aug 6, 6:33 pm, Karthik Reddy <karthik.ele...@gmail.com> wrote:
> Or you could wait for server-side rendering to be supported by GWT. The GWT
> team has dropped few hints in a couple of threads indicating that the day
> could not be very far off when GWT does support server-side rendering. See
> the following threads:
>
> https://groups.google.com/forum/#!topic/google-web-toolkit-contributo...
> *
>  ...............It allows us to optimize for different browsers, and it even
> opens the door for server side rendering.
>
> *
> *
> *
> *https://groups.google.com/forum/#!topic/google-web-toolkit-contributo...
> *
> *The latter can be user in a regular JVM to create an HTML string, which
> will hopefully help with server side rendering in the future.
> *
> *
> *
> Another relevant thread I have started regarding GWT, Closure, server-side
> rendering* : *https://groups.google.com/forum/#!topic/google-web-toolkit-contributo...
Reply all
Reply to author
Forward
0 new messages