250 likes | 303 Views
Giving your Legacy Applications a Makeover. Legacy Makeover.
E N D
Legacy Makeover • This course will demonstrate how easy it is to enhance your legacy online applications without touching your COBOL programs. Through the variety of emulators used by the end users over the past years, many unique processes have been developed to aid in the productivity for the users. We will show you how to manipulate the ASP (active server page) and VBS (visual basic script) and JS (jave script) files to create unique processes under the NVT emulation.
Legacy Makeover • We will be tackling two actual user request that will allow the users to: • Create “Hot Keys” to instantly fill in form fields at the press of a key • Reset / Clear Form Fields at the press of a key
Legacy Makeover • GDT Thin Client User Interface
Understanding the Basics • Deployment • No Software Setup or Configuration of User’s PC • Single copy of Software on Server • NVT.OCX and ASP/ASPX scripts on Web Server • Automatic Update of new versions • New build versions detected & downloaded by Internet Explorer onto the client workstation • User Customization • Preferences stored as 'cookies' on User PC
Understanding the Basics • Internet Component Download • Script Entries • Const NVT_BUILD = nnn • <object id="NVT" … • codebase="obj/nvt.ocx#Version=3,0,0,<%=NVT_BUILD%>“ • Download Mechanism • PC checked for reference to nvt.ocx and version • If no nvt.ocx or an older version, then IE will automatically download or prompt for download of new object depending on browser settings. • See IE Tools/Internet Options/Settings/View Objects
Understanding the Basics • Standard Scripts • NVT.ASP (customize as NVT_xxxxx.ASP) • EYESYS_NVT.VBS Client-side script • EYESYS_NVT.JS files • Example Web Server URLs • http://production/eyesys/nvt_acme.asp • http://testsrv/eyesys/nvt_acme.asp • Active Server Page programming is becoming more popular as programming migrates online. ASP is a web server technology from Microsoft that lets developers program interactive parts into web pages using a variety of code languages or scripts. ASP works with your Windows environment as well as your browsers to allow users to do a variety of things online.
Sample User Interfaces • This is the standard issued screen. • You have the ability to change some options dynamically. • You can change other options via the script. • Layout is resolved during the migration process.
Sample User Interfaces • The request by this Customer’s users were the following: • Show Company Logo • Remove Function Key Buttons • Distinguish Production system versus Test system • Change the Default Colors
Sample User Interfaces • The request by this Customer’s users were the following: • No company Logo • Re-labeled function keys • Custom color scheme ability • Username to be saved in cookies • Reset Logon Button • Auto Connection Navigation • Place the user at a designated screen following the login • Buttons that map to transactions • Application retains the last reference
Sample User Interfaces • The request by this Customer’s users were the following: • Use of “Hot Key” setup • Use of “Clear Fields” button to erase contents of fields on a form
The “Hot Key” Example • By pressing the button, a window will be presented at the bottom of the session window that will allow the user to enter the “Hot Key” information.
The “Hot Key” ExampleModifying the .ASP • This shows the HTML code used for the hot key mapping . Here you can see that when someone focuses away from a text field it will execute a JS function “save_macros()”. On keypress it will validate what the user enters to make sure that a reserved char used for delimiting the pairs in the cookie is not being used.
The “Hot Key” ExampleModifying the .ASP • Above that HTML you will find the HTML for the input button “Quick Strings”.
The “Hot Key” ExampleModifying the .JS • Three functions have been added to the Java Script. • The first one is save_macros which will go through all of the text fields and save the corresponding value pairs into the IE cookie. See function for more details.
The “Hot Key” ExampleModifying the .JS • The next function is the validateChar function which will ensure that the users don’t input a reserved character used as a delimiter.
The “Hot Key” ExampleModifying the .JS • The third function added is the “pasteMacroValue” function which will take the provided key and insert the corresponding value into the active field.
The “Hot Key” ExampleModifying the .JS • The checkKeys function is always executed on a keypress. This is used to launch many of the keycombinations available for EYESYS. As you see above, some of the code within the checkKeys function is to check for Alt and Shift keys being pressed. It will paste the string stored into the current location of NVT.
The “Hot Key” Solution • LIVE DEMONSTRATION
The “Clear Fields” Example Press the Clear Fields button to erase contents in all fields on the form.
The “Clear Screen” ExampleModifying the .ASP • The button Clear Fields is created. Upon click of the button, the function ClrFlds will be performed.
The “Clear Screen” ExampleModifying the .ASP • The function ClrFlds. Insert space into the field F? which if 10 fields on the screen, the first iteration of the FOR loop would be to insert spaces into F10.
References http:/www.w3schools.com/tags/