Sunday, 9 December 2012

Putting it all together

I was chatting to Tony Amies, product architect at William Data Systems, about the best way to get information from a mainframe (and about what’s happening on that mainframe) out to someone who has access to a browser. He had a number of nifty techniques that I’d like to share with you.

Assuming you want to get the information from your mainframe to a browser, your first really big decision is do you want to go with two-tier architecture, or do you want to go with three-tier architecture? Tony’s advice was that two-tier was enough.

That leads to the second really important decision to be made, which is where should the processing take place? You’ve got to look at what needs to be done and then make a choice about which platform does that work best on. So, for example, and perhaps quite obviously, if you want to monitor what’s going on with IP, FTP, or EE (Enterprise Extender) on your mainframe, you want that processing to take place on the mainframe. That all seems fairly easy!

But what do you want to do with your results from those different monitors (and indeed any other monitoring software you have running)? Do you want to look like mission control and have a 3270 screen for each monitor that’s running. Now, I remember how impressed visitors used to be when they saw something like that, but if my plan is to get the information to laptop or tablet device running a browser, then I probably need to consolidate the different feeds first. And, again, I want to do that on the mainframe, in the same LPAR (Logical PARtition) that the monitors are running in. It makes sense because much less work has to be done than if I choose to send that data somewhere else for processing.

If you’re familiar with WDS products, you know about their ZEN monitor for their other products. They’re written in Assemble and C and they use a little DLL inside each product that talks to a DLL in ZEN and you can see a nice display of what’s going on – on everything. As a side note, using the DLLs allows the products to talk to each other, so that if the IP monitor spots something, then the IP trace tool can be used to investigate further.

So, using the two-tier architecture, ZEN is logically split into two parts. One part is mainframe friendly and one part is Web friendly. Associated with the Web-friendly part of ZEN are the necessary JavaScript libraries and JQuery libraries, and the usual HTML bits. If you’ve not come across JQuery before, it’s like a lot of clever JavaScript that’s been already written that you can use to make your Web site look very modern. Lots of sites use the jQuery lightBox plugin to show photos.

There’s always a problem with busy Web pages in that lots of information has to come from the server to the browser, resulting in lots of network traffic – and if you’re monitoring your mainframe’s network from a browser there can be even more. So the first technique they’ve used is AJAX (Asynchronous JavaScript and XML), which means that only the parts of the Web page that have changed are sent, the rest of the page stays the same. They also use JSON (JavaScript Object Notation) as a lightweight data-interchange format.

But there’s always an issue with any User Interface and that’s how to separate the actual user interface itself from the business logic behind it. In technical terms, these are known as the view model and the data model. To make this work as effectively as possible, they’re using MVVM (Model View ViewModel), which is a framework or architectural pattern coming originally from Microsoft, but now extended to include JavaScript MVVM. You can get a clearer idea of the sorts of things they’ve done – and perhaps the sorts of things you could do from The site describes itself as “simplifying dynamic javaScript UIs by applying the Model-View-ViewModel (MVVM) pattern”. The WDS developers also familiarized themselves with, a site describing itself as “a foundation for ambitious web user interfaces”. They go on to say: “Prototype takes the complexity out of client-side web programming”.

For WDS, basically an object is requested from the browser by the user. This goes up to ZEN. Using JSON, a data object comes down and binds with the layout defined in the MVVM skeleton. As a user, you see dynamically updated information in your browser. If one new value affects other values, those other values are automatically update appropriately.

I’m not endorsing WDS’s products, I’m saying that they have very effectively made use of the very latest technology at the browser end to make their product work very efficiently. I’m suggesting that the two-tier architecture with really clever stuff on the browser side is definitely worth taking a look at.

No comments: