469,337 Members | 6,592 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,337 developers. It's quick & easy.

pros and cons of AJAX compared to SOAP messaging

I have started learning about Ajax and SOAP Messaging, can someone tell me what are pros and cons of AJAX compared to SOAP messaging
Mar 24 '08 #1
2 1744
5,390 Expert Mod 4TB
hi ...

this is quite a question :) ... SOAP is typically used to invoke webservices and as the name says it has a specific protocol with failure-states etc. while AJAX is used to make an 'ordinary' XMLHttpRequest that requests a resource at the server. even thogh you can send soap-messages through an XMLHttpRequest and invoke a webservice ... so the XMLHttpRequest is the transport object.

SOAP is mainly XML you have an envelope and a body. so in short words ... using soap/xml adds some overhead to your webapp compared to a XMLHttpRequest that just transports json-data for example. but XML is a little bit more comfortable to use. webservices (typically) have a public description ... the WSDL-file that you may read and you know what params you have to send, what methods could be invoked and what response you might get ... while using the XMLHttpRequest method without such comfort you have to know! how the service is to be invoked and what you get ...

hope this gets you on track with your further investigations on that interesting topic ... but there is much more to say as it could be done here :)

kind regards
Mar 25 '08 #2
Since we are talking pros and cons, I would say this from my experience in dealing with Paypal SOAP as well as many different Ajax applications. With the caveat that this is my opinion.

1. Generally more secure.
2. Less likely to allow an incorrect transaction to pass through. (IE the data is validated in the process of the transaction)
3. More structured, allowing you to control certain pieces of the transport of data.
1. More complicated to understand.
2. More difficult to implement (as there is much more to do).
3. Not as well supported (SOAP didn't achieve the popularity that many thought it would, so you will have trouble finding companies that prefer this protocol).

1. Extremely flexible. Can handle whatever you want it to.
2. Makes your application much more responsive and user-friendly.
3. Easy to understand. There are some quirks that make it seem strange, but once you get the general idea it's a piece of cake.
1. Security will take extra work. This a whole can of worms. You're opening up a whole new avenue to exploit. This may not be an issue depending upon what you expose, but you need to make sure you know it's secure before opening your database or other important information to Ajax calls.
2. Increased development time over "traditional" methods. It will always take a little bit longer to make something in Ajax than just a post or something similar. Of course, you will tend to see a good ROI in that time as the application will be much easier to use.

I don't know if the two things are really apples to apples, but that should give you enough information to have a better idea as to what kind of solution should work for you.

Again, this is my opinion. Not all of these things are true in all cases (of course)!
Mar 25 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Stephen Chell | last post: by
5 posts views Thread by Fred | last post: by
10 posts views Thread by Steve | last post: by
3 posts views Thread by Andrea | last post: by
42 posts views Thread by kenneth.m.mcdonald | last post: by
62 posts views Thread by estherschindler | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.