You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy Timm <ja...@yahoo.com> on 2001/12/21 07:09:43 UTC

Struts and Expresso?

Hi all.  I've been dilegently working away on my first
'real' webapp - learning Struts as I go.  Now I'm
reading emails suggesting the use of Expresso for DB
management.  I've already written my own methods with
straight SQL - and everything is working.  However, I
can see that much of the code will NOT be reuseable in
a different DB schema.  Is it worth my time to learn
Expresso and integrate with my Struts app?  Wait til
the next project?  What pieces of my Struts app do I
forfeit in an Expresso integration (ie. have to
rewrite)?  After very briefly scanning the docs for
expresso, it looked like I'd have to rewrite most of
my Actions.  I'd appreciate any advice from both
perspectives...

What IS the 'best practice' for manipulating objects
in the DB?  Are there open source 'persistance layers'
that do work for you?  I now have a connection pool
object that I start when I init the webapp, and pass
this pool into a 'getThisThing(pool,primKey)' method
or a 'updateThisThing(pool, thisThing)' method.  These
methods (at the moment are all in one 'jdbcBean'
class) and are just prepared statements.  I haven't
gotten as far as writing a pretty UI displaying
multiple results from a query, so I know I have some
shortcomings to wade through with resultsSets.  Again,
I appreciate the 'free' education and hopefully soon
I'll have something to contribute.  Andy Timm

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts and Expresso?

Posted by Vic Cekvenich <vi...@basebeans.com>.
I use RowSet in my FromBeans to accomplish this. Pretty simple. No SQL, 
other then select.
Very reusable.

(also, as you implied in another message, printlns are a bad practice, 
many alternatives).
Vic

Andy Timm wrote:

>Hi all.  I've been dilegently working away on my first
>'real' webapp - learning Struts as I go.  Now I'm
>reading emails suggesting the use of Expresso for DB
>management.  I've already written my own methods with
>straight SQL - and everything is working.  However, I
>can see that much of the code will NOT be reuseable in
>a different DB schema.  Is it worth my time to learn
>Expresso and integrate with my Struts app?  Wait til
>the next project?  What pieces of my Struts app do I
>forfeit in an Expresso integration (ie. have to
>rewrite)?  After very briefly scanning the docs for
>expresso, it looked like I'd have to rewrite most of
>my Actions.  I'd appreciate any advice from both
>perspectives...
>
>What IS the 'best practice' for manipulating objects
>in the DB?  Are there open source 'persistance layers'
>that do work for you?  I now have a connection pool
>object that I start when I init the webapp, and pass
>this pool into a 'getThisThing(pool,primKey)' method
>or a 'updateThisThing(pool, thisThing)' method.  These
>methods (at the moment are all in one 'jdbcBean'
>class) and are just prepared statements.  I haven't
>gotten as far as writing a pretty UI displaying
>multiple results from a query, so I know I have some
>shortcomings to wade through with resultsSets.  Again,
>I appreciate the 'free' education and hopefully soon
>I'll have something to contribute.  Andy Timm
>
>__________________________________________________
>Do You Yahoo!?
>Check out Yahoo! Shopping and Yahoo! Auctions for all of
>your unique holiday gifts! Buy at http://shopping.yahoo.com
>or bid at http://auctions.yahoo.com
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts and Expresso?

Posted by "Luis M. Rosso" <lr...@up2u.com.ar>.
I haven't studied Expresso yet but, in order to develope reusable objects to
manage data persistence (and a lot more!!!), and take full advantage of the
J2EE framework, why don't you consider EJBs? And its open source
implementation: JBoss (www.jboss.org)?

Luis

----- Original Message -----
From: "Andy Timm" <ja...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Friday, December 21, 2001 3:09 AM
Subject: Struts and Expresso?


> Hi all.  I've been dilegently working away on my first
> 'real' webapp - learning Struts as I go.  Now I'm
> reading emails suggesting the use of Expresso for DB
> management.  I've already written my own methods with
> straight SQL - and everything is working.  However, I
> can see that much of the code will NOT be reuseable in
> a different DB schema.  Is it worth my time to learn
> Expresso and integrate with my Struts app?  Wait til
> the next project?  What pieces of my Struts app do I
> forfeit in an Expresso integration (ie. have to
> rewrite)?  After very briefly scanning the docs for
> expresso, it looked like I'd have to rewrite most of
> my Actions.  I'd appreciate any advice from both
> perspectives...
>
> What IS the 'best practice' for manipulating objects
> in the DB?  Are there open source 'persistance layers'
> that do work for you?  I now have a connection pool
> object that I start when I init the webapp, and pass
> this pool into a 'getThisThing(pool,primKey)' method
> or a 'updateThisThing(pool, thisThing)' method.  These
> methods (at the moment are all in one 'jdbcBean'
> class) and are just prepared statements.  I haven't
> gotten as far as writing a pretty UI displaying
> multiple results from a query, so I know I have some
> shortcomings to wade through with resultsSets.  Again,
> I appreciate the 'free' education and hopefully soon
> I'll have something to contribute.  Andy Timm
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts and Expresso?

Posted by Pete Carapetyan <pe...@datafundamentals.com>.
> I've already written my own methods with
> straight SQL - and everything is working.  However, I
> can see that much of the code will NOT be reuseable in
> a different DB schema.  Is it worth my time to learn
> Expresso and integrate with my Struts app?

1. Expresso is not your only alternative. There are also commercial products that
cost thousands, but offer many cool features. I believe that TopLink, CoCoBase,
and Javelin are in the mix. You may also find other open source models.

2. If you do try Expresso, be sure NOT to try and integrate your existing
database and app server for the ten minute test. Do that ONLY after you get a
feel for whether you like it. Instead, use the complete download that comes with
it's own test database and Tomcat. It goes up in ten minutes, all you have to do
is set JAVA_HOME and go. Integrate your own stuff only after you decide it's
worth the effort of setting up all the -config.xml files, which can take a few
more minutes or a few more days, depending on whether you are hitching up to a
common database such as mySQL or a less commonly used engine such as SQL Server.

3. Expresso is more than just data access objects, though many of us like that
feature best. It is a community of goofy guys like me that enjoy sharing a
framework and code base. Allows you to really get some work done quickly, and
focus instead on what makes your apps unique and valuable, not solely on the
plumbing. For example, logins, complex registrations, role base security for darn
near everything, stuff like that can happen almost instantly. Very cool, if
that's what flips your trigger.

--
Pete Carapetyan
http://datafundamentals.com
Java Development Services

Open standards technology for commercial profitability



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>