|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: "Uh, what do I need this for" (was RE: XML.COM: How I Learne dtoLov
Why not use XML in the DAO layer with XML document as immutable Values, then ? It could be reusable in non-EJB contexts and it would solve your SOAP serialization problem. Regards, Nicolas >-----Message d'origine----- >De : Leigh Dodds [mailto:ldodds@i...] >Envoyé : jeudi 23 août 2001 15:07 >À : Michael Brennan; Nicolas LEHUEN >Cc : 'xml-dev' >Objet : RE: "Uh, what do I need this for" (was RE: XML.COM: How I >Learned toLove daBomb) > > > >> -----Original Message----- >> From: Michael Brennan [mailto:Michael_Brennan@a...] >> Sent: 22 August 2001 21:35 >> To: 'Nicolas LEHUEN' >> Cc: 'xml-dev' >> Subject: "Uh, what do I need this for" (was RE: XML.COM: How >I Learned >> toLove daBomb) > >[...comments on EJB DAO layers...] > >> You'll also notice in Sun's J2EE Blueprints white papers, they >> encourage the notion of "value objects" that can encapsulate >the state of >an entity bean >> in a lightweight object that permits interaction with EJBs at a more >> coarse-grained level. These objects are just data. > >We use a separate DAO layer and immutable Value objects, and they work >very well. One advantage of a separate Data Access Object layer is that >if you're writing a non-EJB oriented application (e.g. batch >update/processing) >that doesn't need to run in a full application server, you can >reuse this >code. In this way Entity beans become adapters to plug your business >logic into the DAO layer. > >One side effect of immutable Value objects I noted recently when >adding a SOAP interface to one of our components, was that I couldn't >take advantage of the Apache SOAP support for automated >(de-)serialisation >of JavaBeans. Value objects aren't JavaBeans because everything is >done in the constructor, and there are no set methods. > >No great loss, but it did mitigate one of the possible >benefits of using >the Apache SOAP framework: I still had to write Serializers and >Deserializers >the same as I would have had to do with a custom XML messaging >format. > >Cheers, > >L. > > >-- >Leigh Dodds, Research Group, ingenta | "Pluralitas non est ponenda >http://weblogs.userland.com/eclectic | sine necessitate" >http://www.xml.com/pub/xmldeviant | -- William of Ockham >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








