Google Web Toolkit

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Google Web Toolkit

Andi Gutmans
Hi all,

Some of you might have seen the new Google Web Toolkit
(http://code.google.com/webtoolkit/). It looks pretty cool and I
think it can be a very elegant ways for making it easier for certain
folks to get into the Ajax world.

Unfortunately I was disappointed that the server-side component which
Google are putting out is Java-only. I see no reason why we couldn't
have a nice PHP server-side component for this and it's an
opportunity for the Zend Framework project show how that can be done nicely.

Anyone interested in checking it out and making a proposal (or maybe
teaming up on creating one)? It would preferably also try and mimic
the Java types and API on the client side so that it makes it easy
and straightforward to use PHP instead of Java.

Thanks,
Andi

Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

Ondrej Ivanič
Hi

> Some of you might have seen the new Google Web Toolkit

Yes, it's nice and simple.

> Unfortunately I was disappointed that the server-side component which
> Google are putting out is Java-only. I see no reason why we couldn't
> have a nice PHP server-side component for this and it's an
> opportunity for the Zend Framework project show how that can be done nicely.
>
> Anyone interested in checking it out and making a proposal (or maybe
> teaming up on creating one)? It would preferably also try and mimic
> the Java types and API on the client side so that it makes it easy
> and straightforward to use PHP instead of Java.

I'm playing with this web tookit only few days (less than two weeks). I can't
see easy way howto replace Java with PHP backend. There is one good staring
demo:
http://code.google.com/webtoolkit/documentation/examples/kitchensink/demo.html

Create PHP backend ist'n easy because the JavaScript and HTML files are
generated using GWT compiler. You use the GWT compiler to run your GWT
applications in web mode.

--
Ondrej Ivanic
([hidden email])

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
Reply | Threaded
Open this post in threaded view
|

RE: Google Web Toolkit

Jared Williams-3
In reply to this post by Andi Gutmans
 

> -----Original Message-----
> From: Andi Gutmans [mailto:[hidden email]]
> Sent: 18 May 2006 07:07
> To: [hidden email]
> Subject: [fw-general] Google Web Toolkit
>
> Hi all,
>
> Some of you might have seen the new Google Web Toolkit
> (http://code.google.com/webtoolkit/). It looks pretty cool
> and I think it can be a very elegant ways for making it
> easier for certain folks to get into the Ajax world.
>
> Unfortunately I was disappointed that the server-side
> component which Google are putting out is Java-only. I see no
> reason why we couldn't have a nice PHP server-side component
> for this and it's an opportunity for the Zend Framework
> project show how that can be done nicely.
>
> Anyone interested in checking it out and making a proposal
> (or maybe teaming up on creating one)? It would preferably
> also try and mimic the Java types and API on the client side
> so that it makes it easy and straightforward to use PHP
> instead of Java.

Hmm, interesting, seems a similar process to Morfik (www.morfik.com) thou they have used a some OO Pascal variant, and built a
complete IDE for it.

The core of this is a java to javascript compilation step. Whilst a (limited) PHP to javascript is possible, is it desirable?

Jared

Reply | Threaded
Open this post in threaded view
|

RE: Google Web Toolkit

Andi Gutmans
At 05:24 AM 5/18/2006, Jared Williams wrote:

>Hmm, interesting, seems a similar process to Morfik (www.morfik.com)
>thou they have used a some OO Pascal variant, and built a
>complete IDE for it.
>
>The core of this is a java to javascript compilation step. Whilst a
>(limited) PHP to javascript is possible, is it desirable?

No. I didn't mean copying the Java part and the code generator. I'm
just talking about having the PHP classes that provide the
server-side for their RPC. This would mean that developers use Java
(it's pretty lightweight) to write the front-end stuff, but can then
write the server-side in PHP. Otherwise this is off limits to PHP users.

Andi

Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

Andi Gutmans
In reply to this post by Ondrej Ivanič
See my previous email. I'm just talking about the server-side RPC part:
http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.html
http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.CreatingServices.html

Andi

At 05:23 AM 5/18/2006, [hidden email] wrote:

>Hi
>
> > Some of you might have seen the new Google Web Toolkit
>
>Yes, it's nice and simple.
>
> > Unfortunately I was disappointed that the server-side component which
> > Google are putting out is Java-only. I see no reason why we couldn't
> > have a nice PHP server-side component for this and it's an
> > opportunity for the Zend Framework project show how that can be
> done nicely.
> >
> > Anyone interested in checking it out and making a proposal (or maybe
> > teaming up on creating one)? It would preferably also try and mimic
> > the Java types and API on the client side so that it makes it easy
> > and straightforward to use PHP instead of Java.
>
>I'm playing with this web tookit only few days (less than two weeks). I can't
>see easy way howto replace Java with PHP backend. There is one good staring
>demo:
>http://code.google.com/webtoolkit/documentation/examples/kitchensink/demo.html
>
>Create PHP backend ist'n easy because the JavaScript and HTML files are
>generated using GWT compiler. You use the GWT compiler to run your GWT
>applications in web mode.
>
>--
>Ondrej Ivanic
>([hidden email])
>
>-------------------------------------------------
>This mail sent through IMP: http://horde.org/imp/

Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

John Herren
 From what I can tell--and I could be way off--is that the server side
and client side code are combined in the java code, and the compiler
seperates it into server side RPC and client side javascript. Here's the
Hello World example with my own comments:

public class Hello implements EntryPoint {

  public void onModuleLoad() {
    //client side
    Button b = new Button("Click me", new ClickListener() {
      public void onClick(Widget sender) {
        //server side
        Window.alert("Hello, AJAX");
      }
    });
    //client side again
    RootPanel.get().add(b);
  }

}

It seems to me that you would have to implement the GWT supported parts
of java.lang and java.util (these get translated to javascript) in PHP.
See http://code.google.com/webtoolkit/documentation/jre.html


Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

Andi Gutmans
According to:
http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.PlumbingDiagram.html

the server side is handwritten.
Andi

At 07:44 AM 5/18/2006, John Herren wrote:

> From what I can tell--and I could be way off--is that the server
> side and client side code are combined in the java code, and the
> compiler seperates it into server side RPC and client side
> javascript. Here's the Hello World example with my own comments:
>
>public class Hello implements EntryPoint {
>
>  public void onModuleLoad() {
>    //client side
>    Button b = new Button("Click me", new ClickListener() {
>      public void onClick(Widget sender) {
>        //server side
>        Window.alert("Hello, AJAX");
>      }
>    });
>    //client side again
>    RootPanel.get().add(b);
>  }
>
>}
>
>It seems to me that you would have to implement the GWT supported
>parts of java.lang and java.util (these get translated to
>javascript) in PHP. See
>http://code.google.com/webtoolkit/documentation/jre.html
>

Reply | Threaded
Open this post in threaded view
|

RE: Google Web Toolkit

Jared Williams-3
In reply to this post by John Herren


>  From what I can tell--and I could be way off--is that the
> server side and client side code are combined in the java
> code, and the compiler seperates it into server side RPC and
> client side javascript. Here's the Hello World example with
> my own comments:
>
> public class Hello implements EntryPoint {
>
>   public void onModuleLoad() {
>     //client side
>     Button b = new Button("Click me", new ClickListener() {
>       public void onClick(Widget sender) {
>         //server side
>         Window.alert("Hello, AJAX");
>       }
>     });
>     //client side again
>     RootPanel.get().add(b);
>   }
>
> }

But the onClick event handler there is completely implemented in javascript, and does not appear round trip, on the event handling.

function me(ne){oe('Hello, AJAX');}
function oe(Fh){yh();$wnd.alert(Fh);}

Jared







Reply | Threaded
Open this post in threaded view
|

RE: Google Web Toolkit

Jared Williams-3
>
> >  From what I can tell--and I could be way off--is that the
> server side
> > and client side code are combined in the java code, and the
> compiler
> > seperates it into server side RPC and client side
> javascript. Here's
> > the Hello World example with my own comments:
> >
> > public class Hello implements EntryPoint {
> >
> >   public void onModuleLoad() {
> >     //client side
> >     Button b = new Button("Click me", new ClickListener() {
> >       public void onClick(Widget sender) {
> >         //server side
> >         Window.alert("Hello, AJAX");
> >       }
> >     });
> >     //client side again
> >     RootPanel.get().add(b);
> >   }
> >
> > }
>
> But the onClick event handler there is completely implemented
> in javascript, and does not appear round trip, on the event handling.
>
> function me(ne){oe('Hello, AJAX');}
> function oe(Fh){yh();$wnd.alert(Fh);}
>

Yes, just got the packet sniffer out and it doesn't round trip the onClick event.

Jared

Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

Stanislav Malyshev
In reply to this post by Andi Gutmans
AG>>See my previous email. I'm just talking about the server-side RPC part:
AG>>http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.html
AG>>http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.CreatingServices.html

I don't see there any description of the protocol, however. I wonder if
Google has it or one has to reverse-engineer what it is?
--
Stanislav Malyshev, Zend Products Engineer
[hidden email]  http://www.zend.com/ +972-3-6139665 ext.115
Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

John Herren
In reply to this post by Jared Williams-3
Jared Williams wrote:

>>> From what I can tell--and I could be way off--is that the
>>>      
>>>
>>server side
>>    
>>
>>>and client side code are combined in the java code, and the
>>>      
>>>
>>compiler
>>    
>>
>>>seperates it into server side RPC and client side
>>>      
>>>
>>javascript. Here's
>>    
>>
>>>the Hello World example with my own comments:
>>>
>>>public class Hello implements EntryPoint {
>>>
>>>  public void onModuleLoad() {
>>>    //client side
>>>    Button b = new Button("Click me", new ClickListener() {
>>>      public void onClick(Widget sender) {
>>>        //server side
>>>        Window.alert("Hello, AJAX");
>>>      }
>>>    });
>>>    //client side again
>>>    RootPanel.get().add(b);
>>>  }
>>>
>>>}
>>>      
>>>
>>But the onClick event handler there is completely implemented
>>in javascript, and does not appear round trip, on the event handling.
>>
>>function me(ne){oe('Hello, AJAX');}
>>function oe(Fh){yh();$wnd.alert(Fh);}
>>
>>    
>>
>
>Yes, just got the packet sniffer out and it doesn't round trip the onClick event.
>
>Jared
>
>
>  
>
LiveHTTP Headers extension in Firefox tells me the same. Time to dig a
little deeper!

Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

Andi Gutmans
In reply to this post by Stanislav Malyshev
I'll get in touch with them and ask.

At 09:02 AM 5/18/2006, Stanislav Malyshev wrote:
>AG>>See my previous email. I'm just talking about the server-side RPC part:
>AG>>http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.html
>AG>>http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.CreatingServices.html
>
>I don't see there any description of the protocol, however. I wonder if
>Google has it or one has to reverse-engineer what it is?
>--
>Stanislav Malyshev, Zend Products Engineer
>[hidden email]  http://www.zend.com/ +972-3-6139665 ext.115

Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

gneustaetter
though quite different, this reminded me of the new Ruby on Rails feature RJS templates, where you write ruby code that gets translated to JavaScript on-the-fly...

http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html
http://scottraymond.net/articles/2005/12/01/real-world-rails-rjs-templates

On 5/18/06, Andi Gutmans <[hidden email]> wrote:
I'll get in touch with them and ask.

At 09:02 AM 5/18/2006, Stanislav Malyshev wrote:
>AG>>See my previous email. I'm just talking about the server-side RPC part:
>AG>> http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.html
>AG>> http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.CreatingServices.html
>
>I don't see there any description of the protocol, however. I wonder if
>Google has it or one has to reverse-engineer what it is?
>--
>Stanislav Malyshev, Zend Products Engineer
>[hidden email]  http://www.zend.com/ +972-3-6139665 ext.115


Reply | Threaded
Open this post in threaded view
|

RE: Google Web Toolkit

Jared Williams-3
In reply to this post by John Herren
 > >>>

> >>But the onClick event handler there is completely implemented in
> >>javascript, and does not appear round trip, on the event handling.
> >>
> >>function me(ne){oe('Hello, AJAX');}
> >>function oe(Fh){yh();$wnd.alert(Fh);}
> >>
> >>    
> >>
> >
> >Yes, just got the packet sniffer out and it doesn't round
> trip the onClick event.
> >
> >Jared
> >
> >
> >  
> >
> LiveHTTP Headers extension in Firefox tells me the same. Time
> to dig a little deeper!

Aye, at some point it appears to use AJAX

{var wK=this.xK();try{wK.open('POST',sK,true);wK.setRequestHeader('Content-Type','text/plain; charset=utf-8');if(vK)
{wK.setRequestHeader('X-GWTCallingModule',vK);}

which seems common. And judging from the calendarXX.txt used in DynTable example, the response is some json with extra bits.

Jared

Reply | Threaded
Open this post in threaded view
|

Re: Google Web Toolkit

Matthew Ratzloff
In reply to this post by Andi Gutmans
There was some discussion earlier of Google Web Toolkit and potentially
integrating it into Zend Framework in some way.  Ajaxian had a brief
article about it on Saturday called "Google Web Toolkit: The correct level
of abstraction?":

http://ajaxian.com/archives/google-web-toolkit-the-correct-level-of-abstraction

One of the comments made a good point.  Eventually you're going to run
into a bug in GWT and then... where do you go?  Google?  GWT is
closed-source.  So do you comb through the nightmarish JavaScript it
generates then, or what?

-Matt