Title: BP1370: Extending the Progress Dynamics Framework
1BP1370Extending the Progress Dynamics Framework
- John Sadd
- Progress Fellow
- OpenEdge Evangelist
2Goals for this presentation
- Present the Progress Dynamics prescription
- Show whats possible as standard behavior
- Discuss ways to extend both your app and the
framework itself to meet your needs - Discuss possible future directions
3Products Under Development
- This talk includes information about potential
future products and/or product enhancements. - What I am going to say reflects our current
thinking, but the information contained herein is
preliminary and subject to change. Any future
products we ultimately deliver may be materially
different from what is described here. - In other words - you cant believe everything Im
going to say.
4Agenda Topics
- The Dynamics Prescription
- End-User preferences
- UI Customization
- The Object hierarchy and attribute values
- Customizing for different UI and roles
- Security Translation
- Extending the Dynamics Managers
5Progress Dynamics
Dynamics is a Component of OpenEdge Studio A
better way to engineer world-class distributed
business applications
6The Better Way
A Switch in Paradigms
7The Premise of Progress Dynamics
- Define the Application, Dont Code It
- Automate Everything Possible
- Provide Extensible Common Services
8The Progress Dynamics Architecture
9What Makes Dynamics dynamic?
- Repository-based
- Application defined as data
- Most components are now dynamic
- Standard behavior inherited by all Objects
- Custom application logic in static 4GL
10Being Prescriptive but not Restrictive means
- Making Dynamics adaptable
- Letting end users adapt the look and feel
- Extending individual objects
- Extending the infrastructure support
- Defining whole new objects and classes
- Integrating with your existing applications
11Progress Dynamics V2.x Roadmap
Oct 03
Jul 03
Subject to Change
Apr 03
Mar 04
V2 SP2
V2.1a
V2.2a
V2.1 SP1
General release goal12 week Delivery Cycles
throughout 2003
12Agenda Topics
- The Dynamics Prescription
- End-User preferences
- UI Customization
- The Object hierarchy and attribute values
- Customizing for different UI and roles
- Security Translation
- Extending the Dynamics Managers
13Personalization User profiles and preferences
- Dynamics supports user definitions and login
- Users can customize and save
- Window sizes and positions
- Browse column order, size, and sort order
- Query filters
- Single vs. Multi-window data displays
14DEMO User Preferences
15Demo Login Screen
16Demo user preferencesWindow sizes and positions
17Demo User preferencesBrowse column size, move,
sort
18Demo user preferencesQuery filtering
19Future Directions
- Allow end-user runtime visual customization of
field order, tab order, display width, etc.
20Agenda Topics
- The Dynamics Prescription
- End-User preferences
- UI Customization
- The Object hierarchy and attribute values
- Customizing for different UI and roles
- Security Translation
- Extending the Dynamics Managers
21UI Customization
- Dynamics provides standard behavior
- Build custom super procedures to extend the
behavior of - Individual Objects
- Entire windows
- Entire classes of Objects
- New Client API simplifies coding
- UI events for dynamic Objects
- Client API procedures to run from them
22Extending an Objects Client Behavior
smart.p
visual.p
datavis.p
viewer.p
custvis.p
New widget attributes
New UI events
23Code sample for using the Client API
PROCEDURE rowDisplay ltandgt PROCEDURE
creditLimitLeave IF widgetIsModified('CreditLim
it') THEN IF DECIMAL(widgetValue('CreditLimit'
)) - DECIMAL(widgetValue('Balance')) lt 5000
THEN highlightWidget('Balance',
'Warning'). ELSE highlightWidget('Balance',
'Default').
24Samples of the Client API itself
widgetValue() hField widgetHandle(cField,
TARGET-PROCEDURE). cValue hFieldSCREEN-VALUE.
widgetHandle() get AllFieldNames
cFieldNames hTarget. get AllFieldHandles
cFieldHandles hTarget. RETURN
WIDGET-HANDLE(ENTRY(iFieldPos, cFieldHandles))
25Walking the Widget Tree For You
Custom Super disableWidget(CreditLimit)
Dynamic Browser
26DEMO UI customization with the Client API
27Extending an Object as a Class
- Add extended behavior to all Objects of a type
- Using a custom procedure
- Added to the super procedure stack
- For the entire class, not just one Object
- Same techniques and procedures as in standard ADM2
28Future Directions
- Store more client logic in the repository as
data-driven rules - Realize this at runtime in any user interface
- Store more server-side logic (integrity rules and
business rules) as data as well
29Agenda Topics
- The Dynamics Prescription
- End-User preferences
- UI Customization
- The Object hierarchy and attribute values
- Customizing for different UI and roles
- Security Translation
- Extending the Dynamics Managers
30Object Types and Attributes
- Think of an Object Type as a Class
- Many standard Object attributes in Repository
- Add attributes of your own
- Sub-class an Object Type
- When you need new attributes
- When you need new behavior just for that
sub-class - Create new Objects of this type
- Move Objects from one class to another
31Objects and Attributes
MinHeight 0
Object Type Visual
MinWidth 0
Object Type DynView
MinHeight 12
Master CustView
MinWidth 21
MinWidth 26
32Extending Objects and Attributes
MinHeight
Object Type DynView
New
MinWidth 0
Object Type MyDynView
MandatoryFields
New
Master MyCustView
MandatoryFields Name,City
MandatoryFields Name,City,State
33Objects, Templates, and the AppBuilder Palette
- Definitions for the AppBuilder Palette and the
New button are now in the Repository - As of Version 2.0 SP2
- Add new Object Types to the AppBuilder
34DEMO - Adding a New Attribute- Adding a New
Object Type- Adding the New Object Type to the
AppBuilder
35Demo adding a new AttributeMandatoryFields_Ext
36Demo adding New Object TypeDynView_Ext
37Code Sample for Extended Viewer -
initializeObject
get MandatoryFields_Ext cMandExt NO-ERROR. IF
cMandExt NE "" AND cMandExt NE ? THEN
cFieldList cFieldList "," cMandExt. ELSE
cFieldList RIGHT-TRIM(cFieldList, ","). DO
iEntry 1 TO NUM-ENTRIES(cFieldList) iField
LOOKUP(ENTRY(iEntry, cFieldList), cFields).
IF iField NE 0 THEN DO ASSIGN hField
WIDGET-HANDLE(ENTRY(iField, cHandles))
hFieldBGCOLOR 14 NO-ERROR. END. END.
38Demo new Object / Attribute behavior
39Protecting your customizations
- Keep your customizations separate from standard
framework Objects - Dont add attributes to an existing Type
subtype instead - Dont change default attribute values for
existing Types subtype and change the value - Dont edit code shipped with the framework
create separate custom procedures
40Future Directions
- Define a custom rendering program and custom
super procedure with the class definition in
V2.1 - Fully define the object hierarchy in the
repository and tools - Simplify creating and using new sub-classed
objects - Fully separate repository-based objects and
attributes from any compiled code
41Agenda Topics
- The Dynamics Prescription
- End-User preferences
- UI Customization
- The Object hierarchy and attribute values
- Customizing for different UI and roles
- Security Translation
- Extending the Dynamics Managers
42Customizing for different audiences
- So far weve discussed extending standard
behavior - Now well discuss creating different forms of the
same application for different audiences, e.g. - Users and Roles
- Companies
- Languages and other localizations
- Different User Interfaces
43Customizing the Application
- Result codes identify objects and attribute
values for a customization - Define any customization types and result code
values you like - Change attribute values such as HIDDEN, ENABLED,
HEIGHT, WIDTH - Add objects to pages and pages to windows
44DEMO - Customization Maintenance- Custom
Layouts
45Demo Customization maintenance
46Demo AppBuilder Viewer Customization
47Demo AppBuilder Customizations
48Future Directions
- Visual customization of Viewer layouts in the
AppBuilder in V2.0 SP2
49Agenda Topics
- The Dynamics Prescription
- End-User preferences
- UI Customization
- The Object hierarchy and attribute values
- Customizing for different UI and roles
- Security Translation
- Extending the Dynamics Managers
50Security and Translations
- Dynamics supports security restrictions on
- UserID and/or
- Company
- You can also translate labels and menus to other
languages - These are specializations that change the
application UI and behavior as the user sees it
51DEMO Changing the UI Through Security Allocations
52Demo security allocations and resultant changes
to the app
53Future Directions
- Role-based security and Grant security model in
Dynamics V2.1
54Agenda Topics
- The Dynamics Prescription
- End-User preferences
- UI Customization
- The Object hierarchy and attribute values
- Customizing for different UI and roles
- Security Translation
- Extending the Dynamics Managers
55Using and Extending Managers
- Dynamics Managers support Security, Session
Management (objects and server calls), Service
Types, UI generation, etc. - Use the Manager APIs to extend your app by using
Manager behavior in new ways
56Creating your own Manager
- Define a brand new Manager for custom application
support - Use a special template for new Managers
- Define server-side and client-side behavior
- Add the manager to Session Types that need it
57Using the Manager APIs
- Each Manager has its own API
- Much of the Manager behavior happens
automatically - Use the APIs to extend your application beyond
the default behavior - For example
- Session Manager controls procedures in your
session and AppServers you use - launchContainer to run a dynamic window
- launchExternalProcedure to run Windows apps
58DEMO - Using the Manager APIs- Creating a New
Manager
59Demo Launching dynamic windows
60Code to Launch dynamic windows
RUN launchContainer IN gshSessionManager (
INPUT / pcObjectFileName / "", INPUT
/ pcPhysicalFileName / "ry/uib/rydyncontw.w",
INPUT / pcLogicalName /
pcWindowName, INPUT / plOnceOnly /
YES, INPUT / pcContainerMode /
"view", INPUT / phParentWindow /
wiWin, INPUT / phParentProcedure /
THIS-PROCEDURE, INPUT / phObjectProcedure
/ ?, OUTPUT phProcedureHandle,
OUTPUT cProcedureType / ICF / ) .
61Demo launching External Procedures
62Code to launch an external procedure
RUN launchExternalProcess IN gshSessionManager
(INPUT "Notepad.exe "
THIS-PROCEDUREFILE-NAME, INPUT "", /
default directory / INPUT 1, / window
state -- normal / OUTPUT lResult).
63Demo New Manager using example from Prog Handbook
64Code samples and steps for the new manager
65Future Directions
- Improved support for extending and customizing
existing managers - Super procedures to extend standard API
- Remove dependencies between Managers
66In Summary
- Learn to customize the right way
- Our goal -- make your development easier and more
future-proof - Your goal -- make your applications more
adaptable for your customers - Take advantage of what the framework provides
- Extend it to personalize it for the people who
buy it and use it
67Where to go to learn more
- Progress Dynamics Developers Guide
- Progress Dynamics Programming Handbook
- White papers for V2.0 SP2 on
- Client API
- Extending the Framework
- Using Customizations
- More to come on PSDN
68Presentation goals met?
- Present the Dynamics prescription
- Show whats possible as standard behavior
- Discuss ways to extend both your app and the
framework itself to meet your needs - Discuss possible future directions
69Questions
?
70Thank you for your time.