I'm using templates that provide bean access, not JSP, but I find I'm
doing what Chris is -- there are the real business objects that are
beans, then there are Displayed<thing> beans that handle presentation
issues. They don't do HTML generation but things like getting a menu of
objects filtered according to some criterion, remembering session
state, and so on. They also handle POSTs, so state maintenance and
actions are in a single class. Where to put new methods is not a black
and white issue, but overall the approach keeps things quite clean.

In other words, JSP-specific beans are not necessarily a bad or impure
thing -- they can serve to keep business logic completely free
of irrelevant concerns.

Rod McChesney, Korobora


Christopher Cobb wrote:
>
> Drew Cox wrote:
>
> > ...
> > I firmly believe your "model" classes should not be tied to a particular
> > presentation format (JSP, GUI, ??).  But remember, this is just a class,
> > not a bean.  This "model" class can be composited into, or inherited
> > from, in a JSP-aware bean that handles creating a HTML-(XML) based view
> > of that model.
>
> I usually ended up having two beans:
>
>    * a "pure" bean which had zero knowledge of presentation issues (and is often 
>closely bound to a database entity), and
>    * a derived bean which had presentation support for a particular context.
>
> The base bean is really a bean, because it has properties related to its underlying 
>database entity.
>
> The derived bean uses the properties but adds presentation support.
>
> My point is that what you are calling "just a class, not a bean", I find definitely 
>*should* be a bean, but a "pure" bean, not a "JSP bean".
>
> cc
>
>   ------------------------------------------------------------------------
>
>   Christopher Cobb <[EMAIL PROTECTED]>
>   SW Architect
>   Powerhouse Technologies, Inc.
>
>   Christopher Cobb
>   SW Architect                   <[EMAIL PROTECTED]>
>   Powerhouse Technologies, Inc.  HTML Mail
>                                  Cellular: 703-909-7550
>                                  Fax: 703-648-7475
>                                  Work: 703-648-6725
>   Additional Information:
>   Last Name  Cobb
>   First Name Christopher
>   Version    2.1

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to