Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Is XML still worth?

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
some people may have already heard (at least once i think) that XML is the basis of e-commerce applications.

I have an old book for example (when it was published, j2ee was in 1.2 version) for e-commerce application that is all based in XML for transporting data.

I know that XML is totally needed and worth for integration with legacy systems and for some other peculiarities. However, i'd like to know if with all support and nice technologies associated with J2EE 1.3 and 1.4 we still need XML to transport data over layers.

It's just the using DTOs is a lot more simpler, as i can use them from jsps to entity beans (or whatever other o/r mapper).

Can anyone share a comment?
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IMHO, XML is a TERRIBLE, TERRIBLE idea for inter-layer communication. It's slow, inefficient, and defeats the whole purpose of object-oriented programming. Yes, it's great for allowing programs to communicate with each other (when talking on a wire that is) but there's no good reason I can think of to ever use it instead of DTO's inside your program. All of the arguments I've heard for it (it's more flexible when data changes, sometimes people just don't need objects) just don't hold water.

Kyle
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kyle Brown:
IMHO, XML is a TERRIBLE, TERRIBLE idea for inter-layer communication. /.../ Yes, it's great for allowing programs to communicate with each other (when talking on a wire that is) but there's no good reason I can think of to ever use it instead of DTO's inside your program.
Kyle



I agree and would like to quantify it even further.

XML might be a good way to exchange information between systems with very loose coupling and infrequent/non-critical communication. However, between tightly integrated systems within an enterprise it is often better to use a non-text format.

/Dan
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I agree with you guys, thanks for sharing.
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup, good points. I do not use XML much in my job, but it has been on the 'To Do' list, so these posts were useful.
Kyle, your other post abt JSTL was helpful too. thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic