On 12/15/01 4:26 PM, "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:

[snip]

(1)
> * A bean object that represents a Row from a JDBC ResultSet
> (the names and types of the column properties cannot be known
> in advance because they are based on the SELECT statement).

(2) 
> * A way to construct and use "value objects" that extract the
> properties of an EJB into a structure that can be utilized by a
> presentation tier technology such as JSP pages, without having
> to hand code the value object.

(3)
> * A way to capture *all* of the request parameters from a servlet
> request as a single object.

(4)
> * A way to dynamically represnt XML input data as a tree of Java objects.

To me (1) and (4) seem like like anti patterns where objects are created
from the structure of the data instead of starting with the object model and
letting a persistence layer retrieve/save to whatever particular format
you've decided upon.  I just feel that the object model is the expression of
an application or process.

I'm playing the devil's advocate here but in the case of (1) what happens to
the objects application programmers are using when the DBA decides to change
a schema? In something like a persistence layer where the mappings between
the object model and data are stored in a data dictionary the application
programmer is not affected by underlying changes in the data structure. I
suppose you could protect the application programmer if you were using views
in conjunction with ResultSets. I may be off the mark here as I never use
ResultSets directly.

Maybe you have designed a way to allow a particular model to remain the same
even when the underlying data structure changes. Like I said, just playing
the devil's advocate.

For (3) that would be excellent. So you could match up the dynamic
properties produced by the request with an object? That would be very cool!

For (2) I'm not sure I understand what you mean. I don't use JSP or EJB's so
I'm not clear on how using a DynaBean in a JSP would differ from using the
EJB directly in the JSP?

Just a quick set of comments :-)

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to