Saturday, 19 May 2012

Making it look nice for CICS users

Let’s look at an archetypal MVS site. Kenny wrote most of the original Assembler and quite a bit of the COBOL code that drove the business all those years ago. He was a big man and a real hippie. He even came to work in his sandals and decorated his office with album covers. He thought that writing comments in code was just a waste of time. Doug, who took over from Kenny was an absolute troglodyte. Whereas Kenny was fun to go for a drink with – and boy could he drink – Doug was forever under the floor connecting high speed back-up technology that no-one else really understood. He was great because he’d help everyone with code problems, but he seldom turned up to meetings or understood the concept of budgets. But everything worked like a dream and the company made money.

Nowadays we’ve got Ross heading up software on our z/OS CICS system. He does attend meetings – lots of them. He’s on the committee at a local user group and he’s given presentations at SHARE. He’s even got a wife and children! The problem is that much of the code that Ross looks after is quite old and doesn’t have many comments. There was an effort in 1999 to document everything, but it’s now out-of-date since the SOA (Services-Oriented Architecture) project.

The trouble at many sites is that their Ross is kept very busy at the mainframe end of his CICS system and thinks that the bit of AJAX on the Web browser front-end is enough to keep the end users happy. The truth is, end users are never happy! So what if someone at a conference told Ross there was an easy way (well, perhaps not easy, but fairly straightforward certainly) to make the end user experience of his CICS applications look like it was written in 2012 and not 1912!?!? Do you think Ross would be interested?

Before we look at what this amazing solution might be, let’s briefly look at Web design. Back in 1999, a Web site was pretty much made up of static pages. Someone wrote the pages in HTML and, over time, people updated the information on those pages. Then we had PHP and MySQL. This provided a database that users could update as necessary, and the PHP pages pulled out the latest information. They still looked like static pages, but they were easier to update. Then, we had JavaScript that gave us programming capabilities and all the flexibility that goes with that. Then we had JQuery, which was JavaScript with all the hard work already done for us. You’ve seen Web sites with JQuery-like effects – the ability to click on a thumbnail image and see it large in the middle of the page while much of the rest of the screen is covered with a semi-transparent layer. An example would be clicking on a photo in Facebook.

So let’s tell Ross about the Dojo Toolkit from the Dojo Foundation. Now at Version 1.7, the Web site at http://dojotoolkit.org/ says: “Dojo saves you time and scales with your development process, using web standards as its platform. It’s the toolkit experienced developers turn to for building high quality desktop and mobile web applications.” Now, suppose there was some way to plug that into CICS. So while Ross was looking after the CICS applications, Dojo was making sure that the end users had a good experience.

The Virtual CICS user group (www.fundi.com/virtualcics/) heard from Stephen Mitchell, Managing Director of Matter of Fact Software Limited, earlier this month. He gave a talk entitled: “Utilizing the Dojo Toolkit for Web browser-driven applications from CICS”, which really got to grips with how CICS and the Dojo Toolkit could be integrated. The base functionality of the Dojo Toolkit is made available to a Web page by including a link to dojo.js. This includes plenty of features like CSS-based queries, event handling, animations, AJAX, class-based programming, and a package system that makes getting access to the rest of Dojo very easy.

There are additional stable (but optional) components for advanced animations, I/O, data, drag-and-drop, and much more with Dojo Core. Dijit is Dojo’s theme-able, accessible, easy-to-customize UI library. Dijit requires Dojo Base and various Dojo Core modules to use. It allows for the creation of widgets. For the more adventurous, there’s DojoX, which contains a number of sub-projects based on the Dojo Base. Each project has a varying states of maturity – from very stable and robust to alpha.

Stephen’s company recognized a need to control the Dojo Toolkit that was being used by their PlexSpy application status monitor product. And they decided that if it was an issue for them, it was most likely an issue for others. So they created a generic server solution that could be used by anyone with CICS on z/OS. As a consequence, the Dojo Toolkit has been taken into the mainframe environment and is served from CICS out of PDSs. This brings the strengths of the mainframe to sites using the Dojo Toolkit – providing the control over it that those sites needed.

Ross can now put his feet up at home with his family knowing that his end users are happy with their working environment. And the code Kenny and Doug wrote is still doing its job for another generation.

1 comment:

Anonymous said...

Our generic server solution is called CICS JS/Server. It can be down loaded for a free trial by clicking HERE.

Our website also provides sample COBOL source code that demonstrates how simple it can be to use the Dojo Toolkit to achieve web browser effects from CICS applications.

Stephen.Mitchell@matteroffactsoftware.com