Saturday, April 24, 2010

From TUI to WUI, not that simple

Mainframes 3270 interfaces are usually text based. Even though, graphics are possible on mainframes, they are rarely used. Users of such systems are familiar with the black background and green/blue text but more importantly, they are also familiar with the function key paradigm.
With 3270, nothing is transmitted to the host until a function key is pressed. Very little validation occur when the user fills in the input forms. This is not unlike HTML forms which are only posted when a command button is clicked.
For that reason, most solutions available today for scraping 3270 interfaces are based on HTML/JSP technologies.
One of the drawbacks though is the "flickering effect" that HTML/JSP suffers from when forms are posted. The entire web page is refreshed every time you interact with the host.
The 3270 protocol was smarter and able to refresh only those parts of the display that had actually changed. Many users living the transition from TUI to WUI complain about this. 3270 could optimize screen refresh because terminals were dumb. Terminals new very little about the semantics of the data they received (hence the limited local validation they could perform). Data was fundamentally just a stream of characters and associated positions/attributes on screen.
WUI have evolved past the "function key" and flickering effect by adopting the Ajax technologies so you might think that Ajax-based screen scraping solutions would be a perfect solution.
In reality though, Ajax is useless if you don't transfer logic from the host to the browser. The real Ajax added value is in allowing web applications to behave more like "rich clients".
What this all means is that if you have a mainframe 3270-based application that you are not willing to modify, there is little chance you will be able to build a rich, web-based, user interface to it.