On the topic of reuse, which has been discussed the past weeks. Slightly
offtopic. Still here? Ok, read on :-)
My experience is that whether or not a component is reusable or not is
not something that just "happens"("oh, it was reusble"/"damn, not this
time"), but rather a conscious decision as a parameter during the design
and implementation. To really be able to reap the fruits of reusability
care must be taken so that a component or suite of components are
reusable. Reuse is not easy, and by adding it as a design parameter one
must be aware of that the total cost will probably go up, as it should
be designed to handle needs that are not yet there. There are certainly
rules that helps this process, such as the use of design patterns etc.
The basic reason for doing reusable work is that cost and effort will be
lower in the long term. For me the basic meaning of the word reuse is
"to not reinvent the wheel".
One should also be aware of that reuse is possible at different levels:
* Component reuse: the entire component can be reused in many different
situations without modifications
* Customization: the component has some customizable properties that can
be changed to handle different situations
* Extensibility: the component can be *easily* subclassed to provide
different behaviour. Note that this takes some effort as it requires
that the component designer adds hooks and structured ways to accomplish
this
* Implementation reuse: useful implementation patterns is broken out
into reusable packages (such as generic longlived locking, dirty flag
management, etc.)
* Design reuse: aka Design Patterns, that is some design ideas that
works well for a certain class of problems. For example:
"a stateful session bean can be used to gather information through a
series of wizard-like JSP pages which then can be used to modify the
state of a set of entity beans by use of a shortlived transaction". This
is a simple EJB-ish design pattern that will probably be reusable in
many different applications.
(+ probably some more that I can't think of right now)
When we say "the component is reusable" we (probably) intuitively mean
the first meaning. But if the full range of reusability levels are
considered far more work can be reused, and if done well, can
substantially reduce application development time and effort.
Just my 2 cents... (FWIW etc.)
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".