Are we as developers trying to put a square peg into a round hole with REST, so whyt not XMLRPC?
Recently I was tasked to take an old web service pre SOAP/REST era and bring it up to par with current web service "standards". It's pretty straight forward service, HTTP(s) POST XML, do stuff and respond with XML a very message oriented service.


The two most popular options for "web" services are SOAP and REST...


Though technically speaking SOAP would fit my application perfectly, it feels quite heavy handed and none of the WS-* features are really needed. I mean OK it does do SSL and simple username/password auth, but WS-*!@$@$@1!!! who needs it?! Well not me at least and my condolences for those who do (I'm sure in the right scenarios it's fine piece of technology ;))


Now I like REST because it's seems lite-weight. In fact I was able to take a very popular REST framework like Jersey and implement every single feature of the web service. In fact I managed to reduce the code base from thousands of lines of code to couple 100 lines of code. The obvious being lots of manual work was being done in the old service to parse the XML and map to the right function calls etc...


Whats wrong with REST?


On a high level? Nothing really (You can sit and argue the pros and cons till the cows come home). And this post/question isn't a flame war of SOAP vs REST. But why is it that most chose to go down this route?


Though I was able to implement 100% of the service using Jersey and REST I pretty much managed to break all the rules of "REST" if there are any.
- It doesn't server named resources
- It's not cacheable
- it's more complexe then CRUD
- Everything is a POST
- Everything is returned as 200 OK

But it works fantastic! :) But I'm breaking the rules :P

One example, my app has hundreds of "error" codes. The REST guys like to say map to 400 Bad Request and put your reason in the body. But I say why bother when I can just simply return the code in the XML response. Why confuse the client (Developer), when they can simply parse one code?


So if SOAP is heavy and REST is really for CRUD, what are the options for lite-weight "web" services? XMLRPC? Why are people square pegging into REST? or did i miss something?


Let the fun begin! :)





Are we as developers trying to put a square peg into a round hole with REST, so whyt not XMLRPC?
===

Recently I was tasked to take an old web service pre SOAP/REST era and bring it up to par with current web service "standards". It's pretty straight forward service, HTTP(s) POST XML, do stuff and respond with XML a very message oriented service.


The two most popular options for "web" services are SOAP and REST...


Though technically speaking SOAP would fit my application perfectly, it feels quite heavy handed and none of the WS-* features are really needed. I mean OK it does do SSL and simple username/password auth, but WS-*!@$@$@1!!! who needs it?! Well not me at least and my condolences for those who do (I'm sure in the right scenarios it's fine piece of technology ;))


Now I like REST because it's seems lite-weight. In fact I was able to take a very popular REST framework like Jersey and implement every single feature of the web service. In fact I managed to reduce the code base from thousands of lines of code to couple 100 lines of code. The obvious being lots of manual work was being done in the old service to parse the XML and map to the right function calls etc...


Whats wrong with REST?


On a high level? Nothing really (You can sit and argue the pros and cons till the cows come home). And this post/question isn't a flame war of SOAP vs REST. But why is it that most chose to go down this route?


Though I was able to implement 100% of the service using Jersey and REST I pretty much managed to break all the rules of "REST" if there are any.
- It doesn't server named resources
- It's not cacheable
- it's more complexe then CRUD
- Everything is a POST
- Everything is returned as 200 OK

But it works fantastic! :) But I'm breaking the rules :P

One example, my app has hundreds of "error" codes. The REST guys like to say map to 400 Bad Request and put your reason in the body. But I say why bother when I can just simply return the code in the XML response. Why confuse the client (Developer), when they can simply parse one code?


So if SOAP is heavy and REST is really for CRUD, what are the options for lite-weight "web" services? XMLRPC? Why are people square pegging into REST? or did i miss something?


Let the fun begin! :)




