• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML vs Value Objects

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which would perform better....returning data as XML or as a JavaBean ?
What are the pros and cons of using either technique.
Please suggest
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Performs better: JavaBean. You don't have to serialize/ deserialize the Java datatypes to xml.
This is alwas the prefered way if you communicate java to java.
If you have a communication between java and e.g. VB than XML might be an option (see WebServices), but consider CORBA too.
XML between java environments might be an option if you really need decouple the service from it's consumers, or if you anyway need to transform it into XML for later XSL transformations.
So no clear answer, it depends on what you intend to do.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your application is restricted to single JVM, then Beans are the best option but if its distributed go for XML. Then u can expose u service to whole world....
reply
    Bookmark Topic Watch Topic
  • New Topic