BP0370: PUBLISH or Perish - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

BP0370: PUBLISH or Perish

Description:

If I don't PUBLISH, will I really perish? Let's see what trouble we can get ... SCOP Subscribe SUBSCRIBE to w-instance ) 2003 Progress Software Corporation ... – PowerPoint PPT presentation

Number of Views:130
Avg rating:3.0/5.0
Slides: 39
Provided by: glenb3
Category:
Tags: publish | bp0370 | perish | scop

less

Transcript and Presenter's Notes

Title: BP0370: PUBLISH or Perish


1
BP0370 PUBLISH or Perish
  • Breathing New Life into Old Applications

Glen West (gwest_at_techsmiths.com) President,
TechSmiths, Inc.
2
Agenda
  • Why do I want to know this stuff? Whats in it
    for ME?
  • Parameter models
  • If I dont PUBLISH, will I really perish?
  • Lets see what trouble we can get ourselves into
    with Pub/Sub
  • What Pub/Sub is NOT
  • Related topics, tips, tricks, and resources

3
Agenda
  • Why do I want to know this stuff? Whats in it
    for ME?
  • Parameter models
  • If I dont PUBLISH, will I really perish?
  • Lets see what trouble we can get ourselves into
    with Pub/Sub
  • What Pub/Sub is NOT
  • Related topics, tips, tricks, and resources

4
Whats in it for ME?
  • We all have an old skeleton in the closet.
  • Old applications/new functionality
  • How to migrate to the future without burning
    bridges to the past?
  • Parameters
  • Dynamic Query/Find
  • Publish/Subscribe

5
Agenda
  • Why do I want to know this stuff? Whats in it
    for ME?
  • Parameter models
  • If I dont PUBLISH, will I really perish?
  • Lets see what trouble we can get ourselves into
    with Pub/Sub
  • What Pub/Sub is NOT
  • Related topics, tips, tricks, and resources

6
Parameter Models
  • Classic A series of single-record tables. The
    tables usually represent applications/modules,
    one field per parameter.
  • Generic single table, one record per parameter
  • Tree Structure nested parameters in a tree
  • Hybrid Classic moving toward tree.

7
Hybrid Parameter Tree
8
Hybrid Parameter Tree
Create a dynamic widget Combo Box
9
Hybrid Parameter Tree
Widget Validation Build combo box from this data
10
Hybrid Parameter Tree
Dynamic Query Get the data from/put the data
back into this field
11
Key Dynamic Queries
  • Building the Query (simple)
  • Define Variable l-hQuery as handle
    no-undo.
  • Define Variable l-hBuffer as handle
    no-undo.
  • Define Variable l-query as char
    no-undo.
  • create buffer l-hBuffer for table i-table.
  • Create query l-hQuery.
  • l-hQueryset-buffers(l-hBuffer).
  • Assign l-query 'for each ' i-table.
  • l-hQueryquery-prepare(l-query).
  • l-hQueryquery-open.
  • NOTE Look at get-list-value-pairs procedure in
    the code samples (list-value.p)

12
Dynamic Parameters
  • So, now we can dynamically find parameter values.
  • How do we access them in the application?
  • How do we stop using the old parameters?
  • How do we know when we can get rid of the old
    parameter file completely?

13
Agenda
  • Why do I want to know this stuff? Whats in it
    for ME?
  • Parameter models
  • If I dont PUBLISH, will I really perish?
  • Lets see what trouble we can get ourselves into
    with Pub/Sub
  • What Pub/Sub is NOT
  • Related topics, tips, tricks, and resources

14
PUB/SUB Basics
  • Syntax
  • Standards (i.e. event naming)
  • Mechanics (how the components chat)

15
SUBSCRIBE Syntax
  • SUBSCRIBE
  • PROCEDURE subscriber-handle
  • TO event-name
  • IN publisher-handle ANYWHERE
  • RUN-PROCEDURE
  • local-internal-procedure
  • NO-ERROR

16
PUBLISH Syntax
  • PUBLISH event-name
  • FROM publisher-handle
  • ( parameter , parameter ... ) .

17
Naming Standards
  • Depends on application/toolset architecture.
  • Will you be integrating with other vendors
    products?
  • Might you be changing infrastructure?
  • Prefixes. Options
  • Who will be responding (APP-, UI-, TOOL-)
  • Application or module (AP-, AR-)
  • Global services (no prefix)
  • Instance based (SCOP Subscribe SUBSCRIBE to
    w-instance )

18
The PUB/SUB Process
Named Event Table
Progress Session (Agent)
Program A (Session Svcs)
Program B (Entry)
Program C (Dialog Box)
19
The PUB/SUB Process
Named Event Table
Startup
Progress Session (Agent)
Launch Persistent
Program A (Session Svcs)
Program B (Entry)
Program C (Dialog Box)
20
The PUB/SUB Process
Named Event Table
Progress Session (Agent)
Subscribes
Program A (Session Svcs)
Program B (Entry)
Program C (Dialog Box)
21
The PUB/SUB Process
Named Event Table
Progress Session (Agent)
Run Proxy
Publish Get Preference
Program A (Session Svcs)
Program B (Entry)
Program C (Dialog Box)
Publish Get-Preference (background color,
output w-bg-color, output w-success).
Publish
Run get-preference in hSessionSvc (background
color, output w-bg-color, output w-success).
Run Proxy
22
The PUB/SUB Process
Named Event Table
Progress Session (Agent)
Subscribe Get-Parent
Subscribe Restrictions
Run
Program A (Session Svcs)
Program B (Entry)
Program C (Dialog Box)
23
The PUB/SUB Process
Named Event Table
Progress Session (Agent)
Run Proxy
Unsubscribe Get-Parent
Publish Get-Parent
Subscribe Results
Program A (Session Svcs)
Program B (Entry)
Program C (Dialog Box)
Subscribe Procedure hParent to Results in
this-procedure.
24
The PUB/SUB Process
Named Event Table
Progress Session (Agent)
Run proxy
Publish Restrictions
Program A (Session Svcs)
Program B (Entry)
Program C (Dialog Box)
Publish Restrictions from hParent
(this-procedure, output w-restrictions).
25
The PUB/SUB Process
Named Event Table
Progress Session (Agent)
Run Proxy
Publish Results
Program A (Session Svcs)
Program B (Entry)
Program C (Dialog Box)
26
PUB/SUB Code Samples
  • The conference CD, and our website, has all the
    code samples from this presentation.
  • Sess-start.p is the startup procedure (-p)
  • Sess-svc.p is the session services procedure used
    so far in these examples
  • entryproc.p is the entry program
  • Rep-db.p is the dialog box
  • Now lets watch it in action (demo)

27
Agenda
  • Why do I want to know this stuff? Whats in it
    for ME?
  • Parameter models
  • If I dont PUBLISH, will I really perish?
  • Lets see what trouble we can get ourselves into
    with Pub/Sub
  • What Pub/Sub is NOT
  • Related topics, tips, tricks, and resources

28
Setting Up a PUB/SUB Architecture
  • A Session Services procedure
  • A UI Services procedure
  • Instance Based management procedure

29
Session Services
  • Potential uses for session services procedures
  • Manage parameters, preferences
  • Sequence generation (Note using a Progress
    AppServer to get outside the transaction)
  • Managing UI Instances
  • Common math routines (eg currency exchange, UOM
    conversion)
  • Manage context and record-currency between
    programs

30
UI Services
  • Potential Uses of a UI Services procedure
  • Manage screen placement of UI objects (obviously)
  • Provide custom user interface experiences to
    different users
  • Manage currency of data (what record are we
    working on?)
  • Standardize inter-object communication

31
Instance Management
  • What can you do with an Instance Manager
  • Maintain context between entry and lookup
  • Ensure the lookup returns the data to the correct
    parent.
  • Manage child UI objects (kill the child when the
    parent dies)
  • Handle-independent communications
  • PUBLISH/SUBSCRIBE event.
  • GLOB Subscribe SUBSCRIBE TO w-instance

32
Real-Life Pub/Sub Uses
  • Inter-object Communication
  • Process Messaging
  • Utilities (date/time, foreign currency, math
    functions)
  • Preferences, ini-files, registry settings,
    parameters.
  • Performance timing routines (start/stop/hack)
  • Other stuff?

33
Agenda
  • Why do I want to know this stuff? Whats in it
    for ME?
  • Parameter models
  • If I dont PUBLISH, will I really perish?
  • Lets see what trouble we can get ourselves into
    with Pub/Sub
  • What Pub/Sub is NOT
  • Related topics, tips, tricks, and resources

34
What PUB/SUB is NOT
  • Inter-session communication. You cannot talk to
    another user or another Progress session.
  • Ill read it when I want. If you dont consume
    the message when issued, it goes away.
  • SonicMQ is a java messaging system (JMS) that
    handles both of the above.
  • You can hear all about SonicMQ here except you
    needed to do it BEFORE this session

35
Agenda
  • Why do I want to know this stuff? Whats in it
    for ME?
  • Parameter models
  • If I dont PUBLISH, will I really perish?
  • Lets see what trouble we can get ourselves into
    with Pub/Sub
  • What Pub/Sub is NOT
  • Related topics, tips, tricks, and resources

36
Related Topics
  • Since this is the last session, you may have
    missed them.
  • BP2110 Introduction to SonicMQ
  • BP2160 Design Patterns for Messaging
  • BP1790 Messaging with the Sonic-to-4GL adapter
  • BP2170 Sonic in a J2EE Environment
  • BP1310 Designing a Dynamics Application

37
Tips, Tricks Resources
  • Most likely bug Mismatch in signature
  • Progress 9.1A REQUIRED an input parameter on a
    publish IF there was an output parameter.
  • Dynamic event names
  • The PEG on PUB/SUB Peter van Dam
    http//www.v9stuff.com/publish.htm
  • Synchronous but semi-random
  • Remember Publishing as someone else, Subscribing
    someone else, subscribing to yourself.

38
Conclusion
?
  • You can use these new techniques to weave new
    functionality into your existing applications.
  • Questions? Answers? Rotten tomatoes to throw at
    speaker?
  • The answer is, of course 42
Write a Comment
User Comments (0)
About PowerShow.com