I've been thinking about using XML to pass data structures between method calls/processes instead of the traditional 'value beans' (JavaBeans with just private properties and get/set methods). I use a strict MVC architecture to keep the UI, business logic, and connector code separate. Has anyone seen any good examples or code for doing this? Bill Hines Hershey Foods
In general XML only makes sense for transfers between different systems or media. Using XML for internal interfaces could incur quite a large performance hit for encoding/decoding. If you have enough shared context to pass in-memory beans (or any other Java objects) directly, then you should carry on doing that. If you already have to serialize your beans to get them between VMs or between machines, then the case is a lot less clear cut. Using beans is probably faster, using XML is probably more flexible in terms of plugging in non-Java components to your system. Look at one of the many XML-RPC proposals (SOAP, SML-RPC etc.) for examples of passing simple data types. Any search engine should be able to find references.
Thanks for the reply Frank. That was my suspicion, possible performance hit, but I wasn't sure. It would be good to have these structures defined in XML, but I won't proceed at that cost. In-memory (value) beans will suffice for now, as our interfaces are internal. I'm interested in web services, and see some very cool stuff out on www.xmethods.com using UDDI and SOAP. P.S. What's with this 'greenhorn' label on me? I'm certified! I guess there can be only one sheriff in town, haha. Thanks for the help Clint!
Bill Hines<BR>Hershey Foods
posted 18 years ago
"greenhorn" only means that you have posted less than 32 messages so far. Once you reach 32 you are automatically promoted to "Ranch Hand" to show you are familiar with using the Big Moose Saloon. Promotion to "Bartender" requires that you calmly and knowledgeably reply to a lot of peoples questions, and also that you are recommended by at least two existing bartenders or sheriffs. Promotion to Sheriff is done only in very special cases.