Archives
- ► 2012 (8)
- ► 2011 (157)
- ► 2010 (174)
- ► 2009 (12)
Which topics would you like us to cover more?
Latest comments
- How to reset you Kindle
3, eve...
Thanks for this article and the related "Inside th...
By H K - How to reset you Kindle
3, eve...
How do you drain power on the board? I dont have r...
By Grace - How to reset you Kindle
3, eve...
You're welcome!
By Bas - How to reset you Kindle
3, eve...
Thanks man....removing the battery worked like a c...
By DaveMan - nHapi
example
Hi Slypete, Thank you for your comment. This way w...
By Bas - nHapi
example
Hello, Employing .Net dynamics, one can implement ...
By slypete - Implementing MLLP in C#
Hi Mayura, I'm not sure I understand your question...
By Bas - Implementing MLLP in C#
I have used SSL stream to secure the MLLP transact...
By Mayura
Latest tweets
| REST and SOAP: what and when |
| Written by Division by Zero |
| Thursday, 01 April 2010 08:34 |
|
There has been a great debate between SOAP and REST services over the past years. It seems that the truth is in the middle: both are valuable and we must choose the technique where it is appropriate. Here's a short description of the two and where we should use them. REST REST is heavily based on the HTTP protocol. Actually it is the HTTP protocol plus data. This means that you'll get all the benefits of HTTP and the solutions around it, like security, but it also means you must use HTTP. The data can be formatted as XML, JSON, Atom, etc. HTTP defines the operations that you get over the data (GET, PUT, POST, UPDATE, DELETE), so you're only worry is the data. Every service will work in the same way, only the data will be different. The reuse of many standards and widely used HTTP protocol makes REST an easy and understandable protocol. It's simple to develop with almost all frameworks. Even for .Net. It seems to be more work, but I believe it will be even less when you get the hang of it. SOAP SOAP is basically a RPC protocol. It's based on things like CORBA and COM+. SOAP is protocol independent, which means that you can use it over HTTP, TCP, MQ or another protocol of your choice. Using SOAP you will have to define ll the operations and use a WSDL. This makes the service harder to understand and every service needs to be interpreted in it's own way. The beauty of SOAP is WS-*, the addition of different headers. Using these headers can give you security and guaranteed delivery among other things. When to use what The security of REST is on protocol level, thus on connection level. SOAP is able to provide security on message level, or even part of messages. If you're communication has to be secure, for example financial data, SOAP is the best choice. REST is simple and readable. Trough the power of HTTP it is extensible. The URI of the service makes it unique, therefore service versioning is easy. If you want to publish easily usable services, for example on the web, REST is probably your best choice. There's no golden rule, but for corporate solutions SOAP is probably the best choice. For public services REST would be a good choice. Tags:
|
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. - Douglas Adams




