Steve--
Today, there is an emphasis on "out of container" testing for
application components that is often referred to as TDD (test driven
development). Using TDD, many parts of the application including
Struts actions, Page Flows, JDBC resource access, and business logic
should be testable outside of a running application container
The value of out of container testing is that it is more
generalized, iterative, and usually faster than testing these same
components inside of the context of an application. It's easier to
build iterative tests that don't rely on starting / stopping a server.
One of our goals with all of Beehive should be to enable out of
container testing for every part of the project.
More specifically, imagine sharing an AccountJdbcControl between an
EJB, web service, and a few web applications. The best way to test
such a Control type is to break the problem into pieces and test the
control individually. This makes it easier to isolate and debug
problems with the control and can provide a high level of confidence
that the AccountJdbcControl will work correctly. This is most
effectively done outside of the container so that the focus is just on
testing the JDBC access logic.
Then, integration tests can be written to ensure that the
application logic built around the AccountJdbcControl work in the
context of the EJB, web service, and webapps. Depending on the
application framework, this testing can often be done either inside or
outside of the app container.
Does that make sense?
This is just a brief, high-level overview. For more info, see:
http://www.agiledata.org/essays/tdd.html
http://www.theserverside.com/articles/article.tss?l=TestDrivenDevelopmentPart1
and so on.
Eddie
On 12/8/05, Steve Hanson <[EMAIL PROTECTED]> wrote:
> Yes, I was thinking of my initial resuscitation as a starting place for a
> dedicated JdbcControl sample, which would evolve going forward. I will take
> you list above as a good roadmap for sample.
>
> I never thought of going 'out of container' with a jdbc control, and have a
> bunch of questions. What does that mean from an app architecture point of
> view? By 'out of container' do you mean out of the web container, but in a
> Java container? Why would a user want to take the control out the
> container?
>
> On 12/7/05, Eddie O'Neil <[EMAIL PROTECTED]> wrote:
> >
> > Steve--
> >
> > Having that sample would be great, though we've also got JdbcControl
> > samples in the Petstore which basically demonstrate the same things.
> >
> > Might be more interesting to have a focused JdbcControl sample that
> > runs outside of the container and demonstrates things like calling
> > stored procedures, custom ResultSet mapping, SQL escapes, stored
> > functions, etc. We could even use Derby to demonstrate all of that.
> > Could also demonstrate out-of-container testing, etc.
> >
> > Probably more didactic than another web application.
> >
> > If the system-controls/samples/jdbc sample were brought back, your
> > list would be a good place to start in addition to moving it into the
> > trunk/samples directory.
> >
> > Thoughts?
> >
> > Eddie
> >
> >
> >
> > On 12/7/05, Steve Hanson <[EMAIL PROTECTED]> wrote:
> > > Hey all:
> > >
> > > There are some samples at /trunk/system-controls/samples that could use
> > some
> > > resuscitation.
> > >
> > > Does anyone object to me fixing up the database control?
> > >
> > > Seems to me a fix up requires the following:
> > >
> > > (1) Change the directory structure to match the current netui-blank
> > > structure
> > > (2) Change the .jpf file extensions to .java.
> > > (3) Write doc for the sample
> > > (4) Edit build.dist to ship the sample
> > >
> > > Am I missing anything else?
> > >
> > > -Steve Hanson
> > >
> > >
> >
>
>