PHP programmer - is GWT for me?

0 views
Skip to first unread message

pappfer

unread,
May 12, 2009, 10:23:01 AM5/12/09
to Google Web Toolkit
Hi!

I'm a web programmer. I mainly code in PHP with MySQL and also
familiar with XHTML and CSS. I also have some Java and basic
JavaScript knowledge.

But I never used Ajax before. I was thinking that it might not worth
to study how Ajax works cause it'd take lots of time and I thought
using a Javascript library would probably be a better choice. I read a
lot about them and I found Dojotoolkit to be the best for me.
But then I read about GWT that it makes super-fast Javascript which
would be great for me and I would also get more into Java. So it
seemed perfect for me. I read the documentation and saw how to make a
simple client application.

But then as a web programmer the most important thing for me was to
make use of client-server communication to put some Ajax power into my
PHP applications. But I found this part quite difficult.
I use Eclipse PDT and the GWT's Eclipse plugin. I realized that when
creating a new web application and I'm copying my PHP files onto that
application folder I can't use PDT's tool for PHP cause I can only see
the project if I'm using Java perspective.

Overall, my goal is to put some Ajax power in my PHP applications. For
example I have a website about mobile phones and I store all phones
and all the data in a MySQL database. I want them to be searchable
without reloading the page. Or I want to click on a "Next phone"
button to see the next phone in the database without reloading the
page or a "Compare phones" button and want to compare two selected
phones without reloading the page.

My questions are:
- Is GWT for me? Or I'd rather use Dojotoolkit or another Javascript
library?
- What's the best way to set up (organize) a PHP project and connect
it with GWT? (I mean folder structure and everything)
- What's the best to use for client-server communication: JSON, XML or
something else? (if I want to do stuffs like at the above examples)

Arthur Kalmenson

unread,
May 13, 2009, 9:49:46 AM5/13/09
to Google-We...@googlegroups.com
> - Is GWT for me? Or I'd rather use Dojotoolkit or another Javascript
> library?

That's a hard question. IMHO, GWT is primarily for building a complete
JS based web application, not for sprinkling some AJAX in a few
places. However, there are a lot of examples of websites that have
AJAX functionality that's built with GWT. Personally, I think if
you're adding some minor javascript tweaks, you're probably better off
using some JS library. If you want to build large components of the
site that are interactive, GWT would probably be a good choice.

> - What's the best way to set up (organize) a PHP project and connect
> it with GWT? (I mean folder structure and everything)

Since the PHP code is server side, I'd probably just keep it in a
separate project.

> - What's the best to use for client-server communication: JSON, XML or
> something else? (if I want to do stuffs like at the above examples)

Check out the gwtphp project (http://code.google.com/p/gwtphp/) which
allows you to use GWT's native GWT-RPC.

Regards,
--
Arthur Kalmenson

Jeff Chimene

unread,
May 13, 2009, 10:15:51 AM5/13/09
to Google-We...@googlegroups.com
On Wed, May 13, 2009 at 6:49 AM, Arthur Kalmenson <arthu...@gmail.com> wrote:

> - Is GWT for me? Or I'd rather use Dojotoolkit or another Javascript
> library?

That's a hard question. IMHO, GWT is primarily for building a complete
JS based web application, not for sprinkling some AJAX in a few
places.

That's short-changing Dojo. I've worked w/ Dojo since late 2007. One can build complex Web client systems using that toolkit. It has an extensive widget subsystem, and other features that GWT has yet to match.

Dojo and GWT address different requirements.

One of GWT's great strengths is to provide a web client development environment that leverages Java tools and knowledge.

There exists an excellent "executive overview" presentation by Bruce Johnson on Scribd that describes GWT. You might spend 15-20 minutes reading it as a way of helping you decide a direction.


Steven Jay Cohen

unread,
May 13, 2009, 4:24:15 PM5/13/09
to Google Web Toolkit
My situation is quite similar to yours. I've decided to take all
future PHP faceless and use GWT to build all client-facing pages. I
can communicate with my PHP libraries by passing variables around.

Having done some Object Oriented PHP code, picking up Java hasn't been
that difficult. And, as I get better with GWT, I plan on upgrading
existing client-facing PHP to GWT. I am looking into tools like
extGWT, but haven't made any decisions yet on toolkits.

Steven
Reply all
Reply to author
Forward
0 new messages