struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivo Limmen" <ivolim...@gmail.com>
Subject Re: FRIDAY #1 JavaBeans/Model
Date Fri, 06 Oct 2006 15:27:08 GMT
Hi Wesley,

Our company has just decided to standardize on Struts (1.3.5 currently) and
for database mapping for Hibernate 3 and up.Struts is not limited to a
specific database mapping tool, so you will need to make a selection. iBATIS
is only a small helper tool that will help you to map objects to the
database. This requires a lot of code to write. If you use Hibernate you can
write the mapping and generate your beans. Hibernate does however require
some practice, it has a steep learning curve.

See http://www.hibernate.org for more information.

Hope you figure it out...

On 10/6/06, Wesley Wannemacher <WesW@doubleatrailer.com> wrote:
>
> Hello,
>
> I'm exercising the 'Casual Friday' rule here to ask some general
> questions. I apologize in advance if I break any list etiquette, but I
> subscribed on Monday and have been waiting patiently for Friday so that
> I can get these questions off my chest. Thanks!
>
> I've been working on Java/JSP for a few years now and I recently decided
> to try out struts (better late than never). In the past, I would
> typically write a JDBC wrapper library to help me get to the database,
> then write all of my code with little abstraction from SQL code. Being a
> database guy as well, this made sense to me, and I could do quick easy
> things like a 'QueryToTables' tag that would allow me to paste SQL code
> right into a JSP and have the results of that query pasted nicely into
> the output. For updates, I would build the form I needed (using my own
> custom tags for input fields) and call into my JDBC wrapper to hit
> stored procedures.
>
> I picked up a copy of 'Struts Design and Programming: A Tutorial' and I
> am learning the details of the libraries, but I've never written a
> JavaBean (EJB or regular Bean). It seems that EJB isn't necessary, but
> that regular JavaBeans are used heavily elsewhere. So, I figured I would
> start trying to figure out smart JavaBean Design (I don't really want to
> have to refactor/redesign all of my core classes later when I'm more
> experienced). The problem I have though is that all the books I have
> laying around seem only to refer to plain ol' JavaBeans as GUI
> components. If I understand correctly, to make an object a JB, I really
> only have to have getters/setters for the properties I want to expose,
> but can I have other methods that do other stuff? What suggestions would
> you give someone who has never written a JavaBean before that is going
> to begin working from the ground up on a new project? I figured I would
> use iBATIS for database persistence, so I've been reading about that as
> well. I guess I'm just a bit paranoid about writing the 'middle layer'
> between struts and the SQL code/server, so any advice on gotchas and/or
> suggestions for struts-friendly 'middle layer' design would be much
> appreciated.
>
> -Wes
>
>
> --
> Wes Wannemacher
> Double A Trailer Sales, Inc.
> wesw@doubleatrailer.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message