Exchange 2002 PROGRESS WORLDWIDE Session C 10 Modernizing

  • Slides: 35
Download presentation
Exchange 2002 PROGRESS WORLDWIDE Session C 10: Modernizing Your Applications John Sadd, Engineering Fellow

Exchange 2002 PROGRESS WORLDWIDE Session C 10: Modernizing Your Applications John Sadd, Engineering Fellow the Progress Company

2002 PROGRESS WORLDWIDE Goals for this session n Exchange Think about… – changes in

2002 PROGRESS WORLDWIDE Goals for this session n Exchange Think about… – changes in the Progress® language and tools – the requirements of today’s application market – the state of your database and application – techniques for taking advantage of today’s Progress language and tools Exchange 2002, Chicago, IL, USA 2 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from Logic Factoring out common code Migrating existing applications How Progress Dynamics™ supports these goals Exchange 2002, Chicago, IL, USA 3 © 2002, Progress Software Corporation

First, what’s a “Traditional” Progress application? n 2002 PROGRESS WORLDWIDE Exchange Character-based – Looks

First, what’s a “Traditional” Progress application? n 2002 PROGRESS WORLDWIDE Exchange Character-based – Looks the same on any platform – Or GUI client-server n Host-based or client-server – Always a direct database connection n Built with the 4 GL and Progress DB – Limited Data. Servers, no external interfaces n Static data references in the 4 GL – Tables and fields resolved at compile time – Include files or preprocessors for “reuse” Exchange 2002, Chicago, IL, USA 4 © 2002, Progress Software Corporation

So what are the “Modern” application requirements? n 2002 PROGRESS WORLDWIDE Exchange Graphical interface

So what are the “Modern” application requirements? n 2002 PROGRESS WORLDWIDE Exchange Graphical interface – Windows and/or Web UI n Distributed application – Remote clients – More extensive security requirements n More databases and interfaces – Data. Servers – Integration with reporting and other tools n n Dynamic 4 GL table and field references Variety of languages, design tools, connectivity Exchange 2002, Chicago, IL, USA 5 © 2002, Progress Software Corporation

How has Progress evolved to meet these requirements? Legacy Applications Any Client GUI Client

How has Progress evolved to meet these requirements? Legacy Applications Any Client GUI Client Character Client HTTP/S App. Server Internet Adapter Load Balancer Web. Client HTTPS Progress or Non-Progress Applications Dynamics Framework Web. Speed Transaction Server App. Server SQL Application Business Components: Smart Business Obj Smart B 2 B Object Dynamic SDO 4 GL Sonic MANAGERS: Connection Session Profile Security Localization TCP/IP Repository Database Open Clients Any Application XML, Proxy. Gen or Sonic MQ Webspeed Messenger Name Server Non-English Support Web. Speed Browser Client Custom or Packaged Applications 2002 PROGRESS WORLDWIDE Exchange Progress RDBMS -Personal -Workgroup -Enterprise 4 GL Data. Server Oracle Data. Server SQLServer Data. Server ODBC APIs TCP/IP Progress 4 GL ADM ESQL/C TCP/IP Sonic MQ Adapter SQL-92 PDA Wireless Exchange 2002, Chicago, IL, USA EJB Server Any Business 6 Sonic MQ Server Any Data Source Progress Non-Progress © 2002, Progress Software Corporation

What are the central problems for new applications? n n 2002 PROGRESS WORLDWIDE Exchange

What are the central problems for new applications? n n 2002 PROGRESS WORLDWIDE Exchange The world is more complex Existing older Progress apps may not be adapted to new requirements – Too monolithic, inflexible – Assume client availability of DB – Don’t allow for changes to User Interface Exchange 2002, Chicago, IL, USA 7 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from Logic Factoring out common code Migrating existing applications How Progress Dynamics™ supports these goals Exchange 2002, Chicago, IL, USA 8 © 2002, Progress Software Corporation

Special Progress database and schema characteristics n n 2002 PROGRESS WORLDWIDE Exchange Arrays Validation

Special Progress database and schema characteristics n n 2002 PROGRESS WORLDWIDE Exchange Arrays Validation logic defined in the schema “Database” trigger procedures Special data-related language constructs – Complex nested logic for data retrieval – CAN-FIND – FIND NEXT with different indexes – SHARE-LOCK and EXCLUSIVE-LOCK Exchange 2002, Chicago, IL, USA 9 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Arrays vs. joins -- Issues Sales. Rep. Name Quota[1] n

2002 PROGRESS WORLDWIDE Exchange Arrays vs. joins -- Issues Sales. Rep. Name Quota[1] n Quota[2] Quota[3] Quota[4] n y arra Sales. Rep. Name ble a t ed join Exchange 2002, Chicago, IL, USA n n Sales. Rep 10 SQL Access Open client Indexing Client display Month Quota © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Validation Logic -- Issues n n n ON LEAVE… IF CAN-FIND…

2002 PROGRESS WORLDWIDE Validation Logic -- Issues n n n ON LEAVE… IF CAN-FIND… Compiled into UI Requires local DB No external access ? Client GUI Session Exchange 2002, Chicago, IL, USA Exchange App. Server Session 11 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Trigger Procedures -- Issues n n n ASSIGN … Exchange Execute

2002 PROGRESS WORLDWIDE Trigger Procedures -- Issues n n n ASSIGN … Exchange Execute on client in C/S (expensive) No UI on Server for MESSAGEs Often hold real Business Logic Trigger ON WRITE… IF <B. L. > THEN MESSAGE… Client GUI Session App. Server Session Exchange 2002, Chicago, IL, USA 12 © 2002, Progress Software Corporation

Complex navigation logic -Issues n n n SQL? Doesn’t map to queries Poor SQL

Complex navigation logic -Issues n n n SQL? Doesn’t map to queries Poor SQL access Hard in distributed apps FOR EACH … WHERE … : IF codefld = ‘A’ THEN FIND … WHERE … ELSE IF codefld = ‘B’ THEN… DO I = 1 to 12: IF arrayfld[I] = … THEN … END. queries? SDOs? distributed? Exchange 2002, Chicago, IL, USA 2002 PROGRESS WORLDWIDE Exchange 13 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Record Locking -- Issues SHARE-LOCK and SQL No locks across App.

2002 PROGRESS WORLDWIDE Record Locking -- Issues SHARE-LOCK and SQL No locks across App. Server boundary n n DO TRANSACTION: FIND … EXCLUSIVE-LOCK. END. ! Client GUI Session Exchange 2002, Chicago, IL, USA Exchange App. Server Session 14 © 2002, Progress Software Corporation

Tradeoffs in database design and application migration n n n 2002 PROGRESS WORLDWIDE Exchange

Tradeoffs in database design and application migration n n n 2002 PROGRESS WORLDWIDE Exchange Some Progress “traditions” need to be sacrificed or rethought How bad is your existing database design? How much existing business logic can you realistically reuse? Balance DB schema changes against resulting changes to “salvaged” code Consider third-party DB access as well as your direct application needs There’s no single right answer Exchange 2002, Chicago, IL, USA 15 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from Logic Factoring out common code Migrating existing applications How Progress Dynamics™ supports these goals Exchange 2002, Chicago, IL, USA 16 © 2002, Progress Software Corporation

Basic principles of a modern distributed application n n 2002 PROGRESS WORLDWIDE Exchange Assume

Basic principles of a modern distributed application n n 2002 PROGRESS WORLDWIDE Exchange Assume NO client database access Plan to reuse business logic Anticipate customization Your “client” and “server” will be different sessions Allow for non-Progress clients Exchange 2002, Chicago, IL, USA 17 © 2002, Progress Software Corporation

No client database access means… n n CAN-FIND … No CAN-FIND Less immediate feedback

No client database access means… n n CAN-FIND … No CAN-FIND Less immediate feedback Minimize client B. L. Minimize App. Server hits DB lookup… Client GUI Session Exchange 2002, Chicago, IL, USA 2002 PROGRESS WORLDWIDE Exchange App. Server Session 18 © 2002, Progress Software Corporation

Reusing Business Logic means… n n n Encapsulate B. L. Break logic down Separate

Reusing Business Logic means… n n n Encapsulate B. L. Break logic down Separate out complex B. L. Make no assumptions Avoid prompts / UI in B. L. A P I RUN Pricing. Proc In AShandle Pricing policy A P I Client GUI Session Exchange 2002, Chicago, IL, USA 2002 PROGRESS WORLDWIDE Exchange A P I Submit order Order Maint. App. Server Session 19 © 2002, Progress Software Corporation

Planning for customization means… Menu/text translation n Data translation n Label: n Allow for

Planning for customization means… Menu/text translation n Data translation n Label: n Allow for translation Define levels of customization Associate security with UI Define customization hooks Store customization data Customization manager Security Exchange 2002, Chicago, IL, USA 2002 PROGRESS WORLDWIDE Exchange Customization data User preferences 20 © 2002, Progress Software Corporation

Client and server in different sessions means… n n Main proc Client proc 1

Client and server in different sessions means… n n Main proc Client proc 1 Pricing policy A P I Client GUI Session Exchange 2002, Chicago, IL, USA No shared variables Clean interface No hierarchy Use a property API A P I Client proc 2 2002 PROGRESS WORLDWIDE Exchange A P I Submit order Get property App. Server Session 21 © 2002, Progress Software Corporation

Allowing for non-Progress clients means… 2002 PROGRESS WORLDWIDE Exchange Provide alternatives to Progress API

Allowing for non-Progress clients means… 2002 PROGRESS WORLDWIDE Exchange Provide alternatives to Progress API Consider XML Design your API to allow for this n XML n n A P I Pricing policy A P I Client Session Exchange 2002, Chicago, IL, USA A P I Submit order Order Maint. App. Server Session 22 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE How bad is my old code? n n Exchange Monolithic “spaghetti”

2002 PROGRESS WORLDWIDE How bad is my old code? n n Exchange Monolithic “spaghetti” code is the bane of any migration plan BUT, things may not be as bad as you think: – Much of that old code may be repetitious – Patterns provide clues for cleanup – Much “business logic” in the UI is just routine client support – A standard framework can replace huge amounts of old client-side code Exchange 2002, Chicago, IL, USA 23 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from Logic Factoring out common code Migrating existing applications How Progress Dynamics™ supports these goals Exchange 2002, Chicago, IL, USA 24 © 2002, Progress Software Corporation

“Traditional” Progress constructs for code reuse n n 2002 PROGRESS WORLDWIDE Exchange Include files

“Traditional” Progress constructs for code reuse n n 2002 PROGRESS WORLDWIDE Exchange Include files with parameters Preprocessor values Code generators These were all great, BUT the result is: – Proliferation of source procedures – Proliferation of compiled code – Maintenance headaches – Migration problems – More code to deploy and keep track of Exchange 2002, Chicago, IL, USA 25 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Dynamic 4 GL features can help n n n Exchange Dynamic

2002 PROGRESS WORLDWIDE Dynamic 4 GL features can help n n n Exchange Dynamic widgets Dynamic buffers, queries, and temp-tables Dynamic function call syntax Dynamic CALL syntax (in 9. 1 D) Use these newer constructs to: – Write a single procedure for an operation on any table or query – Build single procedures for comments, auditing, and other common requirements – Minimize both source procedures and r -code Exchange 2002, Chicago, IL, USA 26 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE “Modern” Progress procedures Persistent procedure library n n n RUN IN…

2002 PROGRESS WORLDWIDE “Modern” Progress procedures Persistent procedure library n n n RUN IN… Super Procedure “class” n n Exchange Not top-down Use persistent procedures as libraries Use super procedures for inheritance Eliminate redundant procedures Store the “parameters” for them Inherit Application code Exchange 2002, Chicago, IL, USA Parameterize 27 Procedure parameters © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from Logic Factoring out common code Migrating existing applications How Progress Dynamics™ supports these goals Exchange 2002, Chicago, IL, USA 28 © 2002, Progress Software Corporation

So how do I get from here to there? n 2002 PROGRESS WORLDWIDE Exchange

So how do I get from here to there? n 2002 PROGRESS WORLDWIDE Exchange Make essential changes to your database – But don’t do a whole redesign if you have logic to salvage n n Devise ways to “wrap” B. L. and reports Be realistic about rethinking your UI – Your old frames and procedure flow just may not make sense in GUI or on the Web n Balance choices between redesign and salvage – There’s no single right answer Exchange 2002, Chicago, IL, USA 29 © 2002, Progress Software Corporation

When is a rewrite not really a rewrite? n n 2002 PROGRESS WORLDWIDE Exchange

When is a rewrite not really a rewrite? n n 2002 PROGRESS WORLDWIDE Exchange …When you eliminate a lot of redundant code …When you let a standard framework take care of a lot of the “modernizing” for you …When you wrap your business logic and reports to be callable in new ways You may wind up with a very differentlooking set of procedures, BUT the essence of your application can be preserved – AND it will be more maintainable, flexible, Future-Proof™ Exchange 2002, Chicago, IL, USA 30 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from

2002 PROGRESS WORLDWIDE Exchange Agenda What’s a “modern” application? Database design Separating UI from Logic Factoring out common code Migrating existing applications How Progress Dynamics™ supports these goals Exchange 2002, Chicago, IL, USA 31 © 2002, Progress Software Corporation

You don’t have to use Progress Dynamics, but… n n n 2002 PROGRESS WORLDWIDE

You don’t have to use Progress Dynamics, but… n n n 2002 PROGRESS WORLDWIDE Exchange Progress Dynamics provides an architecture for distributed applications UI generation is provided Old code is replaced by standard behavior – Navigation, Updates, Lookups, etc. n Manager utilities provide standard support – Security, user maintenance, localization, connection management, etc. Exchange 2002, Chicago, IL, USA 32 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange To summarize… n Assess honestly which parts of your DB

2002 PROGRESS WORLDWIDE Exchange To summarize… n Assess honestly which parts of your DB and application can be salvaged – and which will really benefit from redesign n Be realistic about time frames and goals – You won’t rework a major app in a few months, with or without Dynamics – Balance a step-wise progression against the benefits of a complete redesign n n Take advantage of advances in language and tools Consider the big picture – it’s more than just Progress Exchange 2002, Chicago, IL, USA 33 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Goals met? n Think about… – changes in the Progress

2002 PROGRESS WORLDWIDE Exchange Goals met? n Think about… – changes in the Progress language and tools – the requirements of today’s application market – the state of your database and application – techniques for taking advantage of today’s Progress language and tools Exchange 2002, Chicago, IL, USA 34 © 2002, Progress Software Corporation

2002 PROGRESS WORLDWIDE Exchange Questions Exchange 2002, Chicago, IL, USA 35 © 2002, Progress

2002 PROGRESS WORLDWIDE Exchange Questions Exchange 2002, Chicago, IL, USA 35 © 2002, Progress Software Corporation