struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter A. J. Pilgrim" <pet...@xenonsoft.demon.co.uk>
Subject Re: Architecture advice....
Date Thu, 01 Aug 2002 01:42:27 GMT
Greg Hess wrote:
> Hi,
> 
> I have designed our service layer using normal classes, I initialize the
> service layer on application start up and place them in the ServletContext.
> I have been looking at this strategy and considering using Static methods as
> well, as the only state in these classes is the jdbc driver and base data
> source. My persistency layer implementation handles concurrency issues and I
> don't think I would run into any issues having the application distributed
> to more than one server.
> 
> Wish I could offer more help, but I am in the same boat.
> 
> Greg
> 

In the past I have build a persistence layer interface or an abstract class
and then extended with a concrete implementation that talks to a database.

interface PersistenceLayer {
    public OrderDetail  processOrder()
    ...
}

class OraclePersistenceLayer extends PersistenceLayer {
    public OrderDetail  processOrder()
    ...
}

class SybasePersistenceLayer extends PersistenceLayer {
    public OrderDetail  processOrder()
    ...
}

I used a factory to connect to right persistence layer at start up time.

The bad thing thing I built or we built up huge Java source
class 1000s of lines long over time.
Now I would divide up the persistence layer using
a mini BusinessDelegate patterns. I would refactor parts or factor
the application into essential delegate parts. This helps reduce
expensive RMI throughput in a EJB application. Have a look a Floyd
Marinescu EJB patterns for more ideas

Have a look Chuck Cavaness book has a IStoreFrontSecurity interface
for user login. I would do the same with many interface for each
part of the business application.

ICustomerDetails

IProcessOrders

IShipping

IConfirmation


-- 
Peter Pilgrim         +-----\ +-++----++----+
Java Technologist     |     | | ||    ||    | 'n' Shine
                       |  O  | | ||  --+| ---+
         /\            | ._  / | | \  \ |    |
        /  \           | | \ \ | |+--  || ---+ A new day
       /_  _\  "Up"    | | | | | ||    ||    | is coming
         ||            +-+ +-+ +-++----++----+
<home page="http://www.xenonsoft.demon.co.uk/" />


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message