Web-Enabling Legacy Applications Jeff Haym Data Access Worldwide Consulting.

Slides:



Advertisements
Similar presentations
MFA for Business Banking – Security Code Multifactor Authentication: Quick Tip Sheets Note to Financial Institutions: We are providing these QT sheets.
Advertisements

JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
PHP Reusing Code and Writing Functions.
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Chapter 9 Chapter 9: Managing Groups, Folders, Files, and Object Security.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
This presentation will guide you though the initial stages of installation, through to producing your first report Click your mouse to advance the presentation.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Copyright 2007, Information Builders. Slide 1 Maintain & JavaScript: Two Great Tools that Work Great Together Mark Derwin and Mark Rawls Information Builders.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Structured COBOL Programming, Stern & Stern, 9th edition
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Cookies & Sessions.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
15 Maintaining a Web Site Section 15.1 Identify Webmastering tasks Identify Web server maintenance techniques Describe the importance of backups Section.
COLD FUSION Deepak Sethi. What is it…. Cold fusion is a complete web application server mainly used for developing e-business applications. It allows.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Inside the WebApp Classes John Tuohy Data Access Worldwide.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
HTML Hyper Text Markup Language A simple introduction.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Tap the wells of legacy data using the DataFlex WebApp Server.
1 TEISS Case Project Introduction Melinda Ronca-Battista and Angelique Luedeker ITEP/TAMS Center.
The business logic engine for Microsoft IIS Speaker T.M. Arnett.
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
240-Current Research Easily Extensible Systems, Octave, Input Formats, SOA.
Microsoft Access. Microsoft access is a database programs that allows you to store retrieve, analyze and print information. Companies use databases for.
Rev.04/2015© 2015 PLEASE NOTE: The Application Review Module (ARM) is a system that is designed as a shared service and is maintained by the Grants Centers.
 Distributed file systems having transaction facility need to support distributed transaction service.  A distributed transaction service is an extension.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
13-1 Sequential File Processing Chapter Chapter Contents Overview of Sequential File Processing Sequential File Updating - Creating a New Master.
Implementing and Using the SIRWEB Interface Setup of the CGI script and web procfile Connecting to your database using HTML Retrieving data using the CGI.
Leaders of Learners: eduphoria! Update September 2012.
L.T.E :: Learning Through Experimenting Using google-svn for MtM Docs Development Denis Thibault Version 3.2 Mar 12 th, 2009.
13- 1 Chapter 13.  Overview of Sequential File Processing  Sequential File Updating - Creating a New Master File  Validity Checking in Update Procedures.
The world leader in serving science Overview of Thermo 21 CFR Part 11 tools Overview of software used by multiple business units within the Spectroscopy.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
The business logic engine for Microsoft IIS Speaker T.M. Arnett.
Open Solutions for a Changing World™ Copyright 2005, Data Access Worldwide June 6-9, 2005 Key Biscayne, Florida Table Types and Programming Styles John.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
The business logic engine for Microsoft IIS Speaker T.M. Arnett.
ITM © Port,Kazman 1 ITM 352 Cookies. ITM © Port,Kazman 2 Problem… r How do you identify a particular user when they visit your site (or any.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Quick Test Professional 9.2. Testing Process Preparing to Record Recording Enhancing a Test Debugging Running the Test and Analyzing the Results Reporting.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Retele de senzori Curs 2 - 1st edition UNIVERSITATEA „ TRANSILVANIA ” DIN BRAŞOV FACULTATEA DE INGINERIE ELECTRICĂ ŞI ŞTIINŢA CALCULATOARELOR.
Sitecore.net Training, Oct ECM 2.1 UPDATE 2 PART 1 CRAWL BEFORE YOU WALK.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
Lawson Mid-America User Group Spring 2016 Meeting.
Core ELN Training: Office Web Apps (OWA)
Connectivity in DataFlex 19.0
WWW and HTTP King Fahd University of Petroleum & Minerals
19.10 Using Cookies A cookie is a piece of information that’s stored by a server in a text file on a client’s computer to maintain information about.
Deploying and Configuring SSIS Packages
Web Caching? Web Caching:.
Building Web Applications
JavaScript.
Please use speaker notes for additional information!
Presentation transcript:

Web-Enabling Legacy Applications Jeff Haym Data Access Worldwide Consulting

Legacy Applications Found in corporate environments and even in today’s vertical markets. Generally procedural code. Hundreds of programs in application. Years to write and test. Modified FMAC or DFRun. Years of data entry means lots of data.

Keeping Legacy Apps Users resist change. Application is stable and has earned trust and confidence from users. Reputation is on the line and rewriting and deploying might jeopardize that. If we have invested a lot of time and money and a total re-write is not feasible. If we don’t want to re-train our users nor rewrite training manuals. We can continue to use legacy apps to their full capacity without modifying a line of code and have it work with WebApp server modules.

Opportunities For Those Who Maintain A Legacy App Break free from legacy technology get into ASP / VB Script / Java Script programming. Moving procedural app to object oriented is quicker with WAS as understanding UI system messages not necessary. Knowing business rules and using ddb makes it easier to learn and understand DD methods. User feedback puts us ahead of the game – less prototyping. Optimal solution for remote access - Client / Server. Reuse rules on other back ends without re-writing server side stored procedures. HTML is similar to procedural DataFlex. Get the RAD development for the web as you have come to expect from DAW products.

Add Web Based Functionality One Module At A Time Publish reports on the web Enable Data entry Remote access via the web WebApp programs are fully compatible with 2.3 runtime and up. (File structure changes performed by dbb will upgrade file to Rev. 3 and 2.3 runtime will not work)

DD’s Strength Hooks that can be programmed to allow for ‘any situation’ (mature methodology) Consistently enforce these rules in every transaction (save edit and delete) Ensure transaction integrity for multiple file saves in a DD structure.

Are DD’s Required? Although they automate so much work, and we recommend using them, they are not required. However, it is best to let the dbb create them just for the sake of running the wizards to generate ASP code with forms, that work with Web Business Objects, even if you do not initially use them to enforce business rules. Modify wizard generated code to add procedural style reports, procedural style saves / edits / deletes.

New Workspace / Empty DDs Creating a new workspace will keep new development isolated from old. Copy data file components into W/S data directory. - When ready to go “live” switch DataPath in WebApp workspace to look at “live” data. GRADUALLY move business rules to DDs, 1 by 1 as needed by web based modules.

Reporting - Probably The Best Place To Start. Let anyone anywhere see data. Data is already stored and that is the most valuable part of any system. Can use familial looping techniques, and use WriteHTML to output data. (repeat … until, while [found]… end) Embed HTML into values being written.

Procedural Report Example (ASP) <% oVote1.call "msg_ListIdeas", TopicID %>

Procedural Report (WBO) Procedure ListIDeas integer iTopicID integer iCount string sCountURL sCount for_all thread by index.2 constrain thread.topicid eq iTopicID do increment iCount move iCount to sCount move ("Vote1Zoom.asp" - "?RecId=" - (string(thread.recnum))) to sCountURL get HTMLLink sCountURL sCount to sCountURL send writehtml sCountURL send writehtmlbreak (' ' + thread.title ) end_for_all End_Procedure Send RegisterInterface msg_ListIdeas "msg_ListIdeas" "iTopicID" "Lists and numbers topic ideas"

Procedural Save (ASP) <% If request("Request_method")="POST" Then if Request("SubmitButton")<>"" then oVote1.call "msg_SubmitVote", CastVote, UserName, TopicID end if %>

Procedure SubmitVote integer iVote string sUserName integer iTopicID integer iCount string sCountURL sCount clear progress move iTopicID to progress.topicid move sUsername to progress.user_name find eq progress by index.1 [found] begin if (progress.voted gt 0) begin send writehtmlbreak '' send writehtml "Current User Has Already Voted" procedure_return end for_all thread by index.2 constrain thread.topicid eq iTopicID do increment iCount if iVote eq iCount begin // found the one that was voted for reread increment thread.votes saverecord thread unlock end end_for_all End_Procedure

Migrating To DDO’s We do not want to initially move business rules contained in 100’s of programs at once to DD’s. Allow time to test the business rules. Even though DDs are the most manageable to development and maintain business rules, we do not want to leap before looking.

Tips for Creating Data Dictionaries Different runtimes enforce relationships differently. WAS / VDF runtime will check: relating field is same size and type. Uniquely indexed parent. Child relates to parent, n : 1 Remove multiple relationships between two files. Start by analyzing relationships first to harness the DF methodology, rather than or fight hundreds and hundreds of messages. Remove circular relationships - diamond relationships are OK. How To Check relationships DDB > Reports > Check Relationships.

Relationship Tree

Circular Relationship Since children always find their parents in a DD structure, the record in A must be the parent of B and C and Grand parent of D.

Legacy Circular Relationship. One possibility is to remove the relationship and re-write the legacy app. That would probably contradict what ever reason(s) is keeping the app still running. Set_relate MyChild.Child_Key to |FN0,0 in WebApp will programmatically clear the relationship when WebApp runtime executes the command but old flx’s will still rely on the relationship in the data file header.

#1 Difference Between Procedural vs. OO Programming Learning the distinction between using global buffer and dd (and its local buffer) is key. Clearing a file buffer (clear MyFile) will not automatically clear a dd. Whenever getting values a user has entered it use dd msgs.

Global Record Buffer Perfectly legal to code using the global file buffer inside a DD. The key is to know when. Any DD method that is called as a result of a request_save Programmer can enforce transactions with Begin_transaction / End_Transaction outside of DD’s.

Procedure Style Code To Deduct Quantity Sold From Inventory REREAD … // find correct records in buffer Move (Invt.QtyOnHand - OrderItem.qty) to; Invt.QtyOnHand) Saverecord Invt.qty_on_hand …. // UNLOCK

OOP Style Code To Deduct Quantity Sold From Inventory Move (Invt.QtyOnHand - OrderItem.qty) to; Invt.QtyOnHand) Saverecord Invt.qty_on_hand Same code! Just in different places.

USE Global Buffer In The “Hooks” Called By Request_save Validate_save Validate_delete Creating Destroying Update Backout

DDO Structures Must Be Seeded For a DD to find a child the parent buffers must be seeded. To Save a child DD the parent DDs must be seeded Transactional integrity is achieved by seeding all values at once and sending save of a child most file.

Saving Grace: Preparing DD Structure (Ex 1) Seed buffer to find records, Clear MyParentFile_DD Move iSomeValue to MyParentFile.MyField Send request_find of MyParentFile_DD EQ ; MyParentFile.File_Number 1 // index 1 Ready to save children records (Set field changed value, send request_save)

Saving Grace: Preparing DD Structure (Ex 2) Clear MyFile Move iSomeValue to MyFile.MyField Find EQ MyFile by index.1 If (found) send find_by_recnum to ; MyFile_DD MyFile.File_Number MyFile.recnum

Recnum Recnum can be used to seed a DD Concept may seem outdated but it is supported. DB Drivers support Recnum – automatic increment field. Methodology relies on it DF PKG’s. Clear my file Move iSomeValue to MyFile.MyField Find eq MyFile by recnum Send Find_By_Recnum to myFile_DD MyFile.file_number MyFile.recnum

After DD Saves After a save the DDs will clear. Must seed the entire structure again in order to save again.

Log in routine (ASP Side) If request("Request_method")="POST" Then UserName = request("User__Name") UserPass = request("User__Pass") MeetingID = request("Meeting__ID") If UserPass<>"" and UserName<>"" then LoginOk = oLogin.call("Get_Login_User",UserName,UserPass,MeetingID) else LoginOk = 0 end if If LoginOk <> 0 then response.cookies("TopicID")=oLogin.ddValue("Seats.topicid") response.cookies("User_Name")=oLogin.ddValue("Seats.user_name") Rights = "1" else ' login failed, clear cookies. response.cookies("TopicID")="-1" response.cookies("User_Name")="Invalid" 'response.cookies("Rights")="-1" Rights = "-1" end if else Rights = "0" end if

Login Routine (WBO side) function login_user string sUserId string sPass string sMeetingID returns integer integer hDD iMeetingID Move (oSeats_dd(Self)) to hDD Send Clear of hDD clear topic Move sMeetingID to topic.topicid Move (Uppercase(sUserid)) to seats.user_name Move (Uppercase(sPass)) to seats.password Move sMeetingID to seats.topicid Move sMeetingID to topic.topicid Send Find of hDD EQ 1 Function_return (current_record(hdd)<>0) end_function

Selection / Pick list Two different approaches. Option created by HTML code generated by a method in a WBO DF.

Selection List For Report Report with a hypertext link approach. In WBO Procedure OnBody String sText Send WriteHtmlRowBegin Get AddRecordLink (HtmlEncode(Unit.Last - ', ' + Unit.first)) to ; sText Send WriteHtmlCell sText 'Class="Data" Align="left"' Send WriteHtmlCell (HtmlEncode(Unit.bldg)) 'Class="Data“ ; Align="left"' Send WriteHtmlCell (HtmlEncode(Unit.Number)) 'Class="Data“ ; Align="left"' Send WriteHtmlRowEnd End_Procedure // OnBody In ASP ZoomURL = "OwnerReportZoom.asp" ' name of zoom file. If blank none.

ASP Zoom generated by WAS By default it looks to see if a recnum was passed when the page was called. If so, it will seed the asp forms with a record, otherwise it will be blank. <% RecID = Request("RecId") Err=oUnit.RequestFindByRecId(“Unit", RecId) %>

Creating HTML Controls In WBO Send WriteHtml (' ') Send WriteHtml (' Select a Category ') For_All MktCls By Index.10 Constrain MktCls.Repair_YN EQ "Y" Constrain MktCls.BrandClass EQ sBrandClass Do If ((MktCls.Recnum = iSelected) And (sFirstTime = "N")) Send WriteHtml ('<option selected value="') Else Send WriteHtml ('<option value="') Move (Trim(MktCls.ClassName)) To sClassName Send WriteHtml (MktCls.Recnum) Send WriteHtml ('" ') Send WriteHtml (MktCls.Recnum) Send WriteHtml ('> ') Send WriteHtml (HtmlEncode(sClassName)) Send WriteHtml (' ') End_For_All End Send WriteHtml (' ')

Debugging Showln’s - Interact with desktop (Locally) NT Event Log (Locally) Send Writehtml (Remote) Remote Output to Writing to a text file. (Remote)

Cookies vs. Session variables Cookie will be stored in the browsers memory and will be written to disk if the expiration date is not reached. Usually expire when session ends. response.cookies(“BillID")=oSaveBillingAddress.DDValue(“CustBAdd.Custdadd_id") Session variable is only in memory until session ends or times out. Session(“BillID") = oSaveBillingAddress.DDValue("Custbadd.Custdadd_ID")

Web Enabling With VDF7 All runtimes are compatible with DF Data Files – VDF 7 could web-enable legacy apps VDF7 can output in XML for business to business solutions. VDF7 can output in XSL which could then be used to present data (reporting) by adding style sheets and HTML markup For security reasons, most web solutions use a mirror of DB which is updated on a regular basis. VDF7 module could handle this, not just reading and writing XML documents.