[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Java and XML



The only scenario where this would make sense is if your app was designed as a collection of web services. Again, this makes sense if it's large heterogeneous corporate app where clients written in different languages are accessing it.
 
-----Original Message-----
From: Kevin O'Neill Stoll [mailto:kevinostoll@yahoo.com]
Sent: Tuesday, February 19, 2002 11:18 AM
To: Nedim Colic; ajug-members@www.ajug.org
Subject: Re: Java and XML

The binary compatibility is a VB issue. Apparently if a VB developer compromises binary compatibility they lose reference to the COM object in which they are working with. Don't want to get off topic with this one....
 
 
Personally, I agree with you in regards to passing an XML document as arguments. I think that is just creating more work for the Session Bean. I would guess it would be only beneficial in VB because they have no way of overloading a method. They have to alter the public interface by adding required or optional parameters to an existing procedure or function.
 
 
I still would like to hear some feedback in regards to using XML as the return value from a Collection type method.

 
----- Original Message -----
Sent: Tuesday, February 19, 2002 11:31 AM
Subject: RE: Java and XML

By using XML as argument passing mechanism, you're adding one more layer of complexity that is going to have impact on the performance among other things. The problem is that XML parsing is expensive operation and in this scenario doesn't buy you much. Maintaining session beans APIs is by far easier than maintaining your XML structure and parsing classes even if you use JAXB. Marshalling/unmarshalling of arguments is already done for you by ejb mechanisms and it works fine, why mess with it?
 
Why is binary compatibility important? Not having to change the signature (interfaces) of your session beans can be achieved in other ways if that's really important to you. Pass Collection or Map as an argument (I'm not suggesting you do this thou).
 
Nedim.
-----Original Message-----
From: Kevin O'Neill Stoll [mailto:kevinostoll@yahoo.com]
Sent: Tuesday, February 19, 2002 10:42 AM
To: ajug-members@www.ajug.org
Subject: Java and XML

Got a question about Java and XML:
 
    Let's say you are interacting with some sort of Session bean and the method you are going to access is going to return a collection. It seems to me that you could do this just as easily by returning an XML string to the client. The problem that I am having is that I can't find anyone who supports this idea, via examples or in technical articles, so it makes me wonder if I am wrong but I just don't know it yet :P
 
 
    As well, I spoke to a VB developer friend of mine and they use XML to pass a method parameters. He said this was extremely useful because if he wants to add a parameter to a public method that he does not have to break his binary compatibility. Once again, this sounds great for Java but I have not been able to find any examples in how-to's or technical articles.
 
 
    I'm interested in hearing some feedback on the up's and down's of using XML to send parameters and return collections or lists. As well as, where I might find some examples of how someone else has implemented it.
 

Thank you,
 
Kevin O'Neill Stoll
http://kevinstoll.org/
(770) 569-7251