How do I start ?

12 views
Skip to first unread message

Rohan Dhruva

unread,
Apr 28, 2007, 4:51:02 AM4/28/07
to Google Web Toolkit
Hi,

I am new to GWT. I want to create dynamic and good looking ajax
enabled websites like meebo. Nothing of that large a scale, I just
want to start out.

I thought, instead of using notepad and editing javascript, I'd rather
use GWT, as it will make my work simpler. However, I know nothing of
Java, or JavaScript. I do know HTML ;)

However, I am very eager to learn. Can someone please advise me how do
I get started with using GWT ? Do I need to learn Java first ? Is
there some kind of a step-by-step tutorial ? Do I need to know eclipse
inside-out ? I tried reading the source of example apps, but I am too
confused :(

Regards,
Rohan.

Md Mozammel Haque

unread,
Apr 28, 2007, 5:23:22 AM4/28/07
to Google-We...@googlegroups.com
Why don't you start by buying a book on GWT? There are quite a number of books available now in the market. Just search for GWT, you will find the titles.

- Mozammel

Rohan Dhruva

unread,
Apr 28, 2007, 7:48:21 AM4/28/07
to Google Web Toolkit

On Apr 28, 2:23 pm, "Md Mozammel Haque" <mozam...@gmail.com> wrote:
> Why don't you start by buying a book on GWT? There are quite a number of
> books available now in the market. Just search for GWT, you will find the
> titles.
>
> - Mozammel
>

Yes, I was considering that, but the book mentioned on the GWT website
- http://code.google.com/webtoolkit/thirdparty.html - the one by the
google developers, is not out yet :( The pragmatic programmer book
also assumes some Java knowledge..

Any other book recommendations / favorites, which teaches GWT from
ground up, without assuming any previous knowledge at all ? I do see
many books listed on amazon, but any specific titles for my needs ? :)

Regards,
Rohan.

Md Mozammel Haque

unread,
Apr 28, 2007, 10:36:42 AM4/28/07
to Google-We...@googlegroups.com
I guess to work with GWT you will need at least the basic knowledge of java. As GWT client codes are generated from java (like) source codes, you will not be fluent writing GWT codes unless you know the basics of java. So, my recommendation would be, you should first learn basic java, and then GWT. As far as I know, there is no book in the market that teaches you basic java, and GWT both, so you may have to go for two books here.

- Mozammel

On 4/28/07, Rohan Dhruva <rohan...@gmail.com> wrote:

Reinier Zwitserloot

unread,
Apr 28, 2007, 10:48:57 AM4/28/07
to Google Web Toolkit
Diving into web programming with no knowledge of javascript, AND no
knowledge of java - that won't exactly be a cakewalk.

Have you ever actually worked with a programming language (PHP doesn't
usually count), or are you new to programming in general? That would
make a rather large difference in your approach to learn.

Meebo is extra complicated because meebo uses a lot of server push,
which requires some advanced knowledge for the server side elements;
you cannot, for example, use the majority of web frameworks out there
(like e.g. RoR, django, turbogears, PHP, and many others), and for
others you'll need special setups (java servlets can only do server
push on jetty with some hacks, for example). If you want to do that
too, you're really biting off far more than you can chew.

Start simpler.


On Apr 28, 1:48 pm, Rohan Dhruva <rohandhr...@gmail.com> wrote:
> On Apr 28, 2:23 pm, "Md Mozammel Haque" <mozam...@gmail.com> wrote:
>
> > Why don't you start by buying a book on GWT? There are quite a number of
> > books available now in the market. Just search for GWT, you will find the
> > titles.
>
> > - Mozammel
>
> Yes, I was considering that, but the book mentioned on the GWT website

> -http://code.google.com/webtoolkit/thirdparty.html- the one by the

Reinier Zwitserloot

unread,
Apr 28, 2007, 11:21:01 AM4/28/07
to Google Web Toolkit
Fairly sure it'll presume java knowledge and a basic understand of
javascript, but:

http://roberthanson.blogspot.com/2007/04/gwt-in-action-its-baby-book.html

Robert -just- released a new book!

On Apr 28, 4:48 pm, Reinier Zwitserloot <reini...@gmail.com> wrote:
> Diving into web programming with no knowledge of javascript, AND no
> knowledge of java - that won't exactly be a cakewalk.
>
> Have you ever actually worked with a programming language (PHP doesn't
> usually count), or are you new to programming in general? That would
> make a rather large difference in your approach to learn.
>
> Meebo is extra complicated because meebo uses a lot of server push,
> which requires some advanced knowledge for the server side elements;
> you cannot, for example, use the majority of web frameworks out there
> (like e.g. RoR, django, turbogears, PHP, and many others), and for
> others you'll need special setups (java servlets can only do server
> push on jetty with some hacks, for example). If you want to do that
> too, you're really biting off far more than you can chew.
>
> Start simpler.
>
> On Apr 28, 1:48 pm, Rohan Dhruva <rohandhr...@gmail.com> wrote:
>
> > On Apr 28, 2:23 pm, "Md Mozammel Haque" <mozam...@gmail.com> wrote:
>
> > > Why don't you start by buying a book on GWT? There are quite a number of
> > > books available now in the market. Just search for GWT, you will find the
> > > titles.
>
> > > - Mozammel
>
> > Yes, I was considering that, but the book mentioned on the GWT website

> > -http://code.google.com/webtoolkit/thirdparty.html-the one by the

Rohan Dhruva

unread,
Apr 28, 2007, 12:24:44 PM4/28/07
to Google Web Toolkit

On Apr 28, 7:48 pm, Reinier Zwitserloot <reini...@gmail.com> wrote:
> Diving into web programming with no knowledge of javascript, AND no
> knowledge of java - that won't exactly be a cakewalk.
>

Yes, I am prepared to take efforts :)

> Have you ever actually worked with a programming language (PHP doesn't
> usually count), or are you new to programming in general? That would
> make a rather large difference in your approach to learn.

I am quite proficient with C++, and I had done some (very very basic)
Java stuff. So, I can read and understand the syntax, but nothing
more.

>
> Meebo is extra complicated because meebo uses a lot of server push,
> which requires some advanced knowledge for the server side elements;
> you cannot, for example, use the majority of web frameworks out there
> (like e.g. RoR, django, turbogears, PHP, and many others), and for
> others you'll need special setups (java servlets can only do server
> push on jetty with some hacks, for example). If you want to do that
> too, you're really biting off far more than you can chew.
>
> Start simpler.
>

Ofcourse, I do not intend to code stuff like meebo in a day. I used
meebo just because it was the first example of AJAX enabled website
that came to my mind. ATM, even if I can code a Hello World, I'd
consider it a start :)

Great, I'll look into that back, but it's not published yet. I am
currently referring -
http://www.amazon.com/Google-Web-Toolkit-Java-Programming/dp/1847191002/ref=pd_bbs_sr_1/002-0463839-9745645?ie=UTF8&s=books&qid=1177760683&sr=1-1

Any more pointers or tips for me ? :)

Regards,
Rohan.

Reinier Zwitserloot

unread,
Apr 28, 2007, 3:31:35 PM4/28/07
to Google Web Toolkit
GWT fortunately lends itself well to 'just diving right in' - hello
world is trivial (the applicationCreator/projectCreator scripts that
set you up, see the 'getting started' tutorial on the GWT page -
actually create 'hello world'-like stubs for you), and the examples
supplied are decent enough to get cracking with.

Unfortunately, java is actually a very hard to fully understand
language, though your C background helps a bit there.

There are a number of serious caveats - things that "you just can't do
in GWT java", and without any experience in javascript, you won't know
what they are. This can be very problematic, because you'll be
programming something with an assumption of how you'll do some part of
the project which turns out to be impossible. Here's a very small
list:

multi threading: can't do it. javascript (and hence GWT) is completely
'event based' - all code is kickstarted by an 'event', from page load,
to the user clicking something, to a network call returning
(successfull or not), to a timer running out.

blocking: because multi threading doesn't work, you can't block
either. 'blocking' is the act of freezing a thread to wait for a
certain event that depends on stuff outside of the processor/memory
combo, to finish. The traditional example is file access (depends on
disk, which is waaaay slower than the cpu/memory bus), but that's
something javascript just can't do, so in javascript the example is a
network call: You can make a network call but you won't know the
result. You can only leave code snippets (usually in something called
'anonymous inner classes', a relatively advanced java tactic that
you'll have to use a lot in GWT to make any headway, due to this whole
no multi threading issue) that must be executed 'on success' and 'on
failure'.

disk access: completely can't be done. Browsers won't let you. You can
ONLY talk to the server.

access a database, client-side running software (example: drag and
drop an image from the desktop onto your web app - can't be done),
intranet authentication servers, HTTP connections to any site that
isn't your own (e.g. google maps API), and other things very normal in
a desktop app: Can't do it, the browser won't let you: remember, your
code is 100% untrusted, it might as well be some spam king's popup's
javascript. For all of that, you need to make a connection to your
server, and IT can run a database, make HTTP connections to other
servers, interface with the local intranet's authentication stuff,
etc.

copy or paste any data*: Can't be done - clipboard might contain a
password and you are untrusted. CTRL/CMD+C/V/X do work, but you can't
programmatically enforce this.

play sound or video*: Web browsers just plain aren't standardized
enough to reliably pull this off. I know all about the <object> tag.
Forget about it.

locally store anything*: Cookies hold about 4k, that's it. Anytime a
user closes the browser or even navigates away, and the user returns,
you'll have to re-transfer all relevant data from the server again.

run a continuous connection**: You can't create a 'live' connection
between webapp and client. Let's say you want to write 2 player pacman
in GWT, with the two players connected through your server: Can't
really be done; every time a player hits a key, you have to submit a
complete HTTP request, with at least 200 bytes worth of headers and
the like in there.

asynchronously talk from server to client**: You can't report status
updates to the client on a whim. The client needs to connect to YOU,
so you get stuck in inefficient polling mechanisms, where the client
continually asks the server: "has anything changed yet??".


*) has a theoretic workaround but they are in all cases ugly and not
available just yet for GWT. It mostly involves talking to a 'flash
dot' - a 1x1 embedded flash file which due to their insecure nature
allow stuff it shouldn't be allowing, like copy and paste. Sound and
Video also work seamlessly there, of course, and flash apps get more
local storage (FireFox 3 also has local storage facilities, and there
are some extensive hacks in dojo.offline which no one has even begun
integrating in GWT yet as of this writing, but it's at least on the
horizon).

**) Using server push (what meebo does, and jetty continuations) you
can actually asynchronously talk from server to client, though it
takes a lot of work on both client and server side to make it work
right. Sending small packets of data, like e.g. keystrokes, from
client to server is still impossible: you need a whole header block
every time)

> currently referring -http://www.amazon.com/Google-Web-Toolkit-Java-Programming/dp/18471910...

Rohan Dhruva

unread,
Apr 28, 2007, 5:16:30 PM4/28/07
to Google Web Toolkit

On Apr 29, 12:31 am, Reinier Zwitserloot <reini...@gmail.com> wrote:
> GWT fortunately lends itself well to 'just diving right in' - hello
> world is trivial (the applicationCreator/projectCreator scripts that
> set you up, see the 'getting started' tutorial on the GWT page -
> actually create 'hello world'-like stubs for you), and the examples
> supplied are decent enough to get cracking with.
>

-snip-


> right. Sending small packets of data, like e.g. keystrokes, from
> client to server is still impossible: you need a whole header block
> every time)
>

Thanks a lot for all this :)
I am saving this post for future reference, and will refer to it while
learning Java.

Regards,
Rohan.

Reply all
Reply to author
Forward
0 new messages