Thanks for the information.

I feel fairly comfortable with GWT and GWT-RPC now.  I implemented the
command pattern & MVP pattern as per Ray Ryans talk, for my communication
over RPC.   That gave me a pretty good crash course!  I am sure there are
details in there I'll be learning along the way though!

As for Hibernate, I am just trying to decide if its something to invest time
in now.     Cause I really hate using technology just for
whiz-bang/bandwagon reasons.   It sounds like hibernate, when integrated
into my app, allows me to avoid having to worry about the lower level
SELECTs & parsing results etcetc?   All that code is handled by hibernate,
so I can just make calls to classes for accessing/storing data and
everything is persisted behind the scenes for me by hibernate?

Is that correct?


-pj

On Wed, Sep 23, 2009 at 12:30 PM, Trevis <trevistho...@gmail.com> wrote:

>
> I dont have any tutorials at hand but your understanding of where the
> DB code lies is correct.  It's totally on the server side and has
> nothing to do with GWT.  Your GWT app would get access to the data via
> RPC.  The RPC methods would in turn get data from the DB.
>
> Hibernate is an ORM (object relational mapper) which allows you to tie
> Classes to DB tables in a way that is largely transparent to your
> application.  One problem though in using hibernate with GWT is that
> the classes created via hibernate cant be serialized to the client via
> RPC (not that i know of anyway) so a lot of people use different
> libraries to make clones of the faux-POJO's so that they can be
> serialized.  (I do this in the project that i'm working on but i did
> it by hand)  (um, POJO means plain old java object).
>
> If you're interested in using hibernate you should probably use it
> from the start because retrofitting the application after the fact
> would on undoubtedly be extremely painful. But with that said and with
> as much as i love hibernate if you're using all of these new
> technologies together for the first time you may become overwhelmed
> and hibernate is a fairly involved framework so you might be better
> off getting a good grip on GWT and GWT's RPC mechanism first.
>
> but as always, ymmv
>
> On Sep 23, 10:53 am, PJ Gray <pj4...@gmail.com> wrote:
> > I am writing a fairly large web app using GWT in Eclipse.    My
> background
> > is as a c++ desktop developer, so while I have used java before,
> sometimes I
> > stumble on easy stuff.
> >
> > Anyway, I am currently attempting to implement a database to store data
> from
> > my webapp.   I am far from an expert in SQL, but I have done some desktop
> > programming of SQL before, so I feel comfortable enough doing SELECTs and
> > whatnot.   (Most recently I did some development using the iPhone Sqlite
> > stuff).
> >
> > Can someone point me to a good tutorial or something that gives an
> example
> > of storing simple user data in a database from a GWT app?  I found a
> servlet
> > based java/mysql example, so I am concentrating on classes like
> datasource
> > right now.   I can only assume the SQL stuff needs to be contained on the
> > server side of a GWT app anyway, so I was going to start there.  But I
> had
> > questions like:
> >
> > - what is the process for connecting to a database in hosted mode?     Is
> > just left to me to get something like MySql installed locally, and then
> > follow instructions like listed here (
> http://humblecode.blogspot.com/2009/05/gwt-16-using-jndi-datasource.html)
> in
> > order to connect?
> >
> > - when I do deploy to a live webserver, is it just a matter of switching
> the
> > database config (username/password, database name etc)? (as long as I
> have
> > everything setup in mysql on my live webserver obviously)
> >
> > - how does 'Hibernate' fit into all this?   I read about it, and see it
> > mentioned everywhere.    It looks like a library for persisting my java
> > objects in the database, rather than pulling information out of my
> objects
> > and storing the data only?  Is that accurate?    If so, I could write my
> > persistance layer in such a way that I could start by storing the data
> raw
> > (Strings, longs whatever), then later as my app becomes more complex, I
> > could implement Hibernate to start storing my model objects directly?
> >
> > Thanks in advance!
> >
> > -pj
> >
>

--~--~---------~--~----~------------~-------~--~----~
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-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to