Jim,

I've never written a web app.  If I planned to write one, I would do my best
to separate the user interface parts from the business logic parts from the
persistence layer parts.  I know that it may not be entirely possible to
achieve a complete separation of layers, but we should strive to do so as
much as is possible for each application.

With such a separation of layers, you could unit test the model, or business
logic, of your application separately from the user interface (the web
pages) or the persistence layer (Entity Beans).  Other people on this and
other lists, like the JUnit, Test-Driven Development, Refactoring and
Extreme Programming lists at http://groups.yahoo.com, have reported success
with such a design.  Perhaps you could seek some advice from those lists re:
unit testing applications like yours.  If I find the time, I will do some
searches.

Craig

> -----Original Message-----
> From: Jim Crossley [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, December 10, 2002 3:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Testing EJB's
> 
> 
> These are good points, and I appreciate yours and others' prompt 
> replies.  However, the solutions presented so far seem to force me to 
> complicate my object model to facilitate testing.
> 
> I agree that an app that is difficult to test probably 
> suffers from poor 
> design, but web apps by their very nature are difficult to test.
> 
> The app I'm currently working on is very CRUD-ish; it does simple 
> read/write maintenance on a bunch of related objects.  I 
> don't want the 
> web tier to access the Entity beans directly -- this would 
> violate the 
> transactional requirements -- so they go through a Session Facade. 
> Creating additional POJO's through which the session beans 
> interact with 
> the entities only adds an unnecessary layer of complexity IMHO.
> 

snipped the rest...


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to