Tuesday, July 31, 2007

REST, JSON, SOAP, integration, and migration

Rest, JSON, SOAP, integration, and migration


REST -- I read the paper. The real thing is what I already know, cgi is the best. Do not try to "improve" it, keep it simple; and make it simpler (not more complex!) by introducing some simple regularity.

XML is not the way to go. It is not simple; so, it must go! JSON is simple, so, it will stay.

With JSON, with simple http (based on tcp/ip) protocol support of get and post, with simple convention (e.g. everything goes into JSON, no need of separate parameters. Just one string for JSON), and JSON parsing (~100 lines simple code -- it can be done and is already done in any and every language easily), then, we have a distributed computing system!


As a result, I do not like SOAP. Yes, it can support JSON. However, you have to handle SOAP. Too complicated.

However, for political reasons, I have to use SOAP, sometimes.

So, I will use both. However, I will use asp's page to implement REST, and the primary work horse.

Direct reasons:

(a) It is much easier to handle the cross-domain thing. M$ insists on no-cross domain. The only way to support it is to use scripttag-callback. M$ web service does not support it.

(b) It also makes using Ext easier.

(c) I can use it in VB3 code (ya, go nuts!), after I use a plain dll that support http and cut/paste json code!!

All three examples shows that REST is so flexible, because it is so simple!!!

Note: cut/paste http calls and Json code is OK, it is not duplicate business logic. This is important, because the same mechanism is for VB6 -- by doing this, we can take out VB3/VB6 code piece by piece. Some people argue that for VB6, you should use a dll. That creates dll registering issue, and unnecessarily makes thing complicated. Non-business logic code duplication is fine. Give me a break -- we need to get things done, while remove old code -- this is the only way!


Long live Json+rest! Cgi forever -- my insight and experience from perl cgi and javascript more than ten years ago are still extremely relevant -- it is amazing, especially in Internet time.

Note that cgi philosophy is directly form unix philosophy: text based, small programs glued with scripting ...

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home