Posts Tagged ‘WS-*’

COBOL is fifty

Friday, August 14th, 2009

Not today, of course, COBOL celebrated its fiftieth birthday in April. It is the hidden language, no one will openly admit that they have COBOL systems, yet there are millions of lines of COBOL code that no one dares to throw away. The number one reason is “if it ain’t broke, don’t fix it”, closely followed by the fact that software rewrites usually end in tears. Joel Spolsky gives excellent evidence on his blog.

Why is COBOL still out there?

So, how come COBOL has survived for so long? It is an old, cumbersome language; yet, it has modern compilers and runtime environments. You can compile your COBOL program on 32bit Windows, on 32 and 64bit Linux, HP-UX, Solaris, AIX, and many others.
Seven years ago, I worked in Ortex and they (not me, I was the cool new dude) were churning out thousands of lines of COBOL code every day.
I helped replace the aging Windows 3.1-style user interface with something that looked a bit more modern, but underneath the pretty UI, we were still talking to green-screen UNIX COBOL monster. And there lies the key to COBOL’s continued success.

What did COBOL give us?

It did not use complex binary protocols, it relied on the XML of the seventies — fixed width text messages. This simple data exchange format lends itself to easy integration with other systems. As long as your system can read and write fixed-width text, you can talk to COBOL-based systems — OK, I know I’m leaving out details, but bare with me.
Fast forward to 2006 and watch the WS-* approach. Why, did the WS-* people ask, are our systems talking to each other in closed binary formats; why can’t we use an easy to read and write format? Why aren’t we using XML? It turns out that WS-* approach is still cumbersome. For example, you cannot determine what a WS-* call will do just by looking at the endpoint, you need to examine the payload. Hmmf!
Enter REST. Again, we are sending structured plain text, but this time around, we’re making the most of the HTTP protocol. We use the HTTP methods properly and we give meanings to the URIs.