>It sounds like hibernate, when integrated into my app, allows me to avoid 
>having to worry about the lower level
SELECTs & parsing results etcetc?

That is true for the most part but as Charlie said it's not a pure win
because getting it to do what you want, how you want it to do it can
be very tricky.  I've been using it for oh, maybe a year and a half
now and i still feel like i'm just getting my arms wrapped around it.

I haven't really dug into IBATIS but it sounds like it may be an
easier to use ORM.  For me, the hibernate full text search is very
valuable. It can be very fast but you really need to understand how it
works to get it to do things right.  The way the handle lazy
instantiation often feels obtuse to me and i'm continually getting a
better handle on it.  There are a few books out on it if you're really
interested as well as a lot of documentation online.  If you do use it
just never trust that it will query for data the way you expect it
to.  You have to stay on top of it or else it is very easy to cause
situations where it will query repeatedly for data that you should be
able to get with one round trip.

On and BTW, i'm also a huge fan of the MVP pattern.  I'm very glad
that i saw Ray Ryan's presentation before i got to far into my
project.  He saved me from having to write a *lot* of boilerplate
code.

Are you also using Gin? I was reluctant at first because i was getting
framework fatigue but it is pretty handy for being able to unittest
your presenters.


On Sep 23, 11:45 am, PJ Gray <pj4...@gmail.com> wrote:
> 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