Transcript DEV-29: A Deep Dive into the Advanced GUI OpenEdge 10.2A
DEV-29: A Deep Dive into the Advanced GUI
OpenEdge ® 10.2A
Shelley Chase
OpenEdge Architect
Peter Judge
OpenEdge Principal Software Engineer
Get Ready… We’re Going Under
Attended Advanced GUI Intro Understand OO concepts • Classes, Inheritance, Methods Comfortable with OE Architect Can hold your breath for a really long time … 2 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
Demo: Advanced GUI in AutoEdge
Existing application following OERA with OpenEdge GUI, Open Clients, WebSpeed ® , Sonic ™ • New: Advanced GUI – Main container – Customer maintenance form – Test drive scheduling form • Existing: Architecture / Code – Replaced View only in existing MVP model presentation layer – OERA business and data layers – Mix and match for remaining windows 3 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
Under Development
D I S C L A I M E R
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.
D I S C L A I M E R
© 2008 Progress Software Corporation 4 DEV-29: A Deep Dive into the Advanced GUI
Agenda
• • • • ABL for the Advanced GUI • • Advanced GUI Architecture ABL Container Classes Mix and Match Support ABL Data Binding ABL Event Handlers ABL Custom Controls Using the Advanced GUI in AutoEdge © 2008 Progress Software Corporation 5 DEV-29: A Deep Dive into the Advanced GUI
Advanced GUI Architecture
Single Process for OpenEdge Runtime and .NET
™ Common Language Runtime (CLR)
.NET GUI ABL Logic frm = NEW Form( ).
frm:Closing:Subscribe( EventHdlr1 ).
WAIT-FOR Application.Run( frm ).
EventHdlr1( ) … EventHdlr1( ) … OpenEdge UI (Presenter) Bridge Bridge .NET UI (View) OpenEdge Runtime
6 DEV-29: A Deep Dive into the Advanced GUI
.NET CLR
© 2008 Progress Software Corporation
Advanced GUI Architecture
Single Process for OpenEdge Runtime and .NET Common Language Runtime (CLR)
ABL Logic frm = NEW Form( ).
frm:Closing:Subscribe( EventHdlr1 ).
WAIT-FOR Application.Run( frm ).
EventHdlr1( ) … EventHdlr1( ) … 7 1 OpenEdge UI (Presenter) Bridge 2 6 .NET GUI 3 5 4 Bridge .NET UI (View) OpenEdge Runtime .NET CLR
7 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
.NET Inheritance Stack
8 UI components inheritance stack includes .NET root class: System.Object
All .NET Classes ABL Forms … .NET Controls … Progress.Lang.
Object (ABL) System… Form System… Control System.Object (.NET) … Progress. Windows.Form
Infragistics… UltraButton .NET Classes = Green ABL Classes = Blue CustEntryForm (ABL)
DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
.NET Windows I/O Blocking Model
Application with a single main form WAIT-FOR Application:Run(
form
).
• • • Used for dashboard and MDI applications Other forms are “children” of the main form Closing the main form automatically terminates WAIT-FOR Application with several equal forms WAIT-FOR Application:Run( ).
• • Forms shown at the same time or separately An event handler needs to terminate WAIT-FOR 9 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
ABL Forms in the Advanced GUI
CLASS CustForm INHERITS Progress.Windows.Form:
ABL form classes inherit from one of the following: • Progress.Windows.Form
– ABL WINDOW • Progress.Windows.Dialog
– ABL FRAME VIEW-AS DIALOG-BOX • Progress.Windows.MDIForm
– No ABL equivalent © 2008 Progress Software Corporation 10 DEV-29: A Deep Dive into the Advanced GUI
.NET Controls and ABL Forms
ABL Forms are containers for .NET UI Controls • • Microsoft ® .NET Windows Form controls Advanced GUI Controls (Infragistics ® WinForms) • 3 rd -party .NET controls Other supported components • • • Non-visual controls Extender providers ( UltraToolTipManager ) User-defined ABL custom controls 11 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
Demo: ABL Forms
Create a login dialog 12 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
ABL Mix and Match UI for Migration
.NET forms and OpenEdge GUI windows can co-exist in same session • • One can parent the other All functionality maintained independently OpenEdge GUI windows can be embedded a .NET forms • • • • Client area managed in ABL Other functionality managed in .NET
Progress.Windows.MDIChildForm
Progress.Windows.WindowContainer
in 13 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
.NET Event Model
Controls define events they publish • • Strongly-typed events Support a list of handlers (callbacks) Controls fire an event when an action occurs • All subscribed handlers get called Subscribe ABL event handlers to events • Information passed in from .NET
© 2008 Progress Software Corporation 16 DEV-29: A Deep Dive into the Advanced GUI
Event Handling in the Advanced GUI
CustForm:FormClosing:Subscribe( FormClosingHdlr ).
Use the Subscribe( ) method to add event handlers written in ABL • • Method or internal procedure Support for multiple subscribers to one handler Event handler called when events fires • Two parameters passed in – Object firing the event ( System.Object ) – Event specific arguments( System.EventArgs
) © 2008 Progress Software Corporation 17 DEV-29: A Deep Dive into the Advanced GUI
Demo: Event Handler
Validate user on OK button click 18 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
.NET Data Binding Model
Progress.Data.BindingSource
• Provides data for .NET UI Controls – How : Provides required APIs to .NET Controls (IList) – Why : OpenEdge data provided as .NET needs – What : Any ABL Query, Buffer or ProDataSet
ProDataSet Customer Lift Line Skiing Order Urpon Frisbee 53 01/01/93 2 3 81 66 01/04/93 01/04/93 Query 2 Progress.Data. BindingSource 3 1 OpenEdge Runtime
19 DEV-29: A Deep Dive into the Advanced GUI
.NET CLR
© 2008 Progress Software Corporation
Power of Progress.Data.BindingSource
Brings ABL data-centric behavior to .NET
– Automatic data synchronization – Automatic updating – Automatic batching – Automatic currency Properties – Updating: AllowEdit, AllowNew, AllowRemove – Current row state: NewRow, RowModified – Typed screen value: InputValue, ChildInputValue – General Information: Position, Count 20 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
Data Binding Examples
Simple .NET control ( UltraEdit )
editBox: DataBindings:Add ( “Text”, pBS, “OrderNum” ).
.NET browse-like control ( UltraGrid )
grid: DataSource = pBS.
.NET list control ( UltraListView )
list: DataSource list: DataTextField list: DataValueField = pBS.
= “State”.
= “State-Name”.
© 2008 Progress Software Corporation 21 DEV-29: A Deep Dive into the Advanced GUI
Demo: Databinding
Bind a list of UI styles to the login dialog 22 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
ABL Custom Controls: User Controls
CLASS AddrViewer INHERITS Progress…UserControl:
Inherits from Progress.Windows.UserControl
• Custom ABL control container • • Gives common behavior, look and feel to UI Add to control toolbox in Visual Designer Examples of user controls • • • Label and editbox Address block Grid and viewer 23 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
ABL Custom Controls: Inherited Controls
CLASS OkButton INHERITS Infragistics…UltraButton:
Inherits from existing .NET UI control • Customize existing control • • Gives common behavior, look and feel to UI Add to control toolbox in Visual Designer Sample inherited controls • • • OK button Cancel button Read-only grid 24 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
Demo: User-defined ABL Controls
Create ExplorerBar user control 25 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
Agenda
• • • • ABL for the Advanced GUI • • Advanced GUI Architecture ABL Container Classes Mix and Match Support ABL Data Binding ABL Event Handlers ABL Custom Controls Using the Advanced GUI in AutoEdge © 2008 Progress Software Corporation 26 DEV-29: A Deep Dive into the Advanced GUI
Outlook-style Container for AutoEdge
Advanced GUI main form • • Dashboard / Container Dynamic menu and toolbar – Hook up events • Re-use existing architecture – OERA and MVP Run using WAIT-FOR Application:Run ( ).
© 2008 Progress Software Corporation 27 DEV-29: A Deep Dive into the Advanced GUI
Demo
AutoEdge main container form 28 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
MDI Child Forms
Progress.Windows.MDIChildForm
• Hosts OpenEdge GUI windows – Only client area used – Uses window handle of .w
– Menu, statusbar, etc. on main form Progress.Windows.Form
• New Advanced GUI form – Infragistics: UltraGrid, UltraTree, Ribbon – ParentMDI property on child – Menu, statusbar, etc. on main form 29 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
Demo
MDIChild forms and GUI windows 30 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
In Summary
Modern, competitive UI in ABL • Uses .NET objects – Object-oriented ABL – .NET object features (methods, properties, events) – WYSIWYG Visual Designer – Unlimited controls available • Leverages what you know – ABL (events, business logic, data constructs) – Event-driven programming (WAIT-FOR) – OpenEdge Architect 31 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
Relevant Exchange Sessions
DEV-2: Making OpenEdge Architect Work for You DEV-6: Introduction to the OpenEdge Advanced GUI DEV-16: Leveraging the Power of Advanced GUI DEV-32: Using the Advanced GUI, Structured Error Handling and SonicMQ to build a Semi Disconnected Point of Sales DEV-20: Sex and Sizzle – Developing with .NET and OpenEdge 10 DEV-40: Using SmartDataObjects (SDO) with the Advanced GUI 32 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation
33 DEV-29: A Deep Dive into the Advanced GUI
Questions
?
© 2008 Progress Software Corporation
Thank You
© 2008 Progress Software Corporation 34 DEV-29: A Deep Dive into the Advanced GUI
35 DEV-29: A Deep Dive into the Advanced GUI © 2008 Progress Software Corporation