Wednesday, 28 April 2010

Web 2.0 & CICS

Just been putting the finishing touches to a demo that I want to present at Impact 2010. I'm presenting a piece about web 2.0 and how it relates to CICS. Once part of the web2.0 story is the ability to render data as ATOM feeds and expose that feed to external consumers.

I wanted to show how easy it was to expose a CICS file as a ATOM feed and then consume it within a AJAX web page. This would allow me to respond to a users request via a web page without having to reload the entire page. Making the UI cleaner, more efficient and well 'sexier'!

The demo took very little time to create. I took the CICS File A sample and quickly created the necessary CICS resources to allow CICS to expose it as a ATOM feed. A quick test in the browser showed me that all was working well and that I now had a REST style interface for my file. CICS still handled the file and ensured that authentication was properly handled. My existing demos that use that file didn't have to change, BUT I had managed to levarge this file to new consumers. Ah my next point - writing that AJAX web page.

I am not an AJAX (Asynchronous JavaScript and XML) programmer. To be honest I haven't written anything 'webby' for quite a while so my skills were a little rusty. However I had a quick google and found lots of snippets of code that I could use to allow me to make a asynchronous call to CICS to get some data:

The nice thing was a I was able to use standard AJAX calls to interact with CICS. I didn't need any special IBM framework just standard Javascript. Also I didn't need to be an amazing javascript programmer. I just bolted some code snippets together and got something really cool to work.

In a real company this would mean that we would be able to create web 2.0 components that connected directly to CICS. This would provide a up to date interface that customers expect. You wouldn't even think that CICS was involved.
Post a Comment