• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is XML still worth?

 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • 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?
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • 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
 
Dan Johnsson
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks, I agree with you guys, thanks for sharing.
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!