struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Hookom" <>
Subject RE: [OT]RE: Persistence Framework Comparison?
Date Fri, 04 Oct 2002 23:57:26 GMT

| -----Original Message-----
| From: David Graham []
| Sent: Friday, October 04, 2002 6:39 PM
| To:
| Subject: [OT]RE: Persistence Framework Comparison?
| I'm concerned about the piece of your code that returns a Method
| I
| assume this is the Method class from the reflection package.  It
| strike me as a very good use of reflection and poor OO technique.  Of
| course, your code snippet doesn't show what you ultimately do with the
| Method object.

My implementation acts as a wrapper extending the functionality of an
object, you could say that it's the same as an Action in Struts.  Is
that poor programming? ;-)  Since you may add pre-compiled Methods via
the config, I chose this execution pattern to provide additional
flexibility in writing your own methods.  Plus I'm thinking of adding a
listener pattern to the methods to allow O/R mapping events to be passed
around the DaoBroker.

The User.class is being passed as the BO interface.  Dao's are stored in
a map under the class defined in the config.  So I may use
UserImpl.classs in the config, but if daos.get(User.class) returns null,
then it will search to see if the User.class is an interface of any Dao
and store an additional mapping for quick access next time.

| Aspect oriented programming might suit your needs here and may be a
| cleaner
| design.  This isn't C where we pass around functions and execute them.
| Dave


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message