java - Criteria to select b/w soap and restful ws and why rest is cacheable? -


i have read lot whats difference b/w soap , restful web services. have got specific doubts did not answers. here :-

what goes in favor of restful web services in nutshell seems preferring restful web services on soap. main reason behind easy develop , understand. faster because of light weight data exchange format json. in performance in restful web services better because less data traveled on network(soap involves layer of saop message under http request). far good.

accepted answer @ how restful web services better soap based webservices says

rest naturally fits web/cloud api's, whilst soap fits distributed computing scenarios.

i did not whats difference between web , distributed computing scenarios. web case of distributed computing scenarios. n't ? how come 1 better web while distributed scenarios ? (q1)

what goes in favor of soap :-

same answer says soap caters stateful operations. per understanding not true. if need maintain state need maintain thru code sending unique id in both request/response relates them n't it? (q2) if thats case can done in restful web services also.

some says soap better in terms of security. don't security soap provides rest not? (q3)

soap better in 1 sense has wsdl(that generated tools) doc thru clients can generate respective stubs. in restful webservices developer has create comprehensive doc himself client knows input request parameters. correct ? (q4)

note :- have referred q question(q1 question1)

there 3 reasons prefer rest on soap

  1. resources have urls identify them. if want share result of api operation friend, don't have instruct them verbally on api method call , parameters pass. instead, can share him url. (for safe operations only). great example restaurant sites built in flash. if want share friend menu of restaurant, can't easily. can tell him buttons press when flash page loads.

  2. with rest can take advantage of existing http infrastructure on internet lot of work, i.e. caching, resource conflict management, , on. don't have reinvent wheel.

  3. related #2, many developers used working rest architectures. if use rest cut down on learning curve new devlopers have incur when learning how use service.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -