Title: DEV-29: A Deep Dive into the Advanced GUI
1DEV-29 A Deep Dive into the Advanced GUI
Shelley Chase
OpenEdge Architect
Peter Judge
OpenEdge Principal Software Engineer
2Get Ready Were 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
3Demo 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
4Under 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.
5Agenda
- 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
6Advanced GUI Architecture
Single Process for OpenEdge Runtime and .NET
Common Language Runtime (CLR)
.NET GUI
ABL Logic
.NET UI (View)
OpenEdge UI (Presenter)
7Advanced GUI Architecture
Single Process for OpenEdge Runtime and .NET
Common Language Runtime (CLR)
.NET GUI
ABL Logic
.NET UI (View)
OpenEdge UI (Presenter)
8.NET Inheritance Stack
- UI components inheritance stack includes .NET
root class System.Object
ABL Forms
.NET Controls
All .NET Classes
System Form
System Control
Progress. Windows.Form
Infragistics UltraButton
CustEntryForm (ABL)
.NET Classes Green ABL Classes Blue
9.NET Windows I/O Blocking Model
- Application with a single main form
- WAIT-FOR ApplicationRun( 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 ApplicationRun( ).
- Forms shown at the same time or separately
- An event handler needs to terminate WAIT-FOR
10ABL 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
11.NET Controls and ABL Forms
- ABL Forms are containers for .NET UI Controls
- Microsoft .NET Windows Form controls
- Advanced GUI Controls (Infragistics WinForms)
- 3rd-party .NET controls
- Other supported components
- Non-visual controls
- Extender providers (UltraToolTipManager)
- User-defined ABL custom controls
12Demo ABL Forms
13ABL 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 in a .NET
forms - Client area managed in ABL
- Other functionality managed in .NET
- Progress.Windows.MDIChildForm
- Progress.Windows.WindowContainer
14.NET UI Programming Model
- Supports static (pre-defined) and dynamic
(on-the-fly) user interfaces - Static UI normally built using new WYSIWYG Visual
Designer in Architect - Dynamic UI is coded, often repository-based
customized for site, user, etc. - Mix of both is supported
- Apply each where necessary
- Hide / show / modify controls dynamically as
necessary
15.NET Data Types
- Value types
- All numeric data types, Boolean
- Structures (Datetime, Size, Color)
- Enumerations
- Always passed by value
- Reference types
- System.String
- .NET arrays ( indexes start at 0! )
- All other objects
- Always passed by reference
16.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
17Event Handling in the Advanced GUI
CustFormFormClosingSubscribe( 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)
18Demo Event Handler
- Validate user on OK button click
19.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
Progress.Data. BindingSource
1
2
3
20Power 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
21Data Binding Examples
- Simple .NET control ( UltraEdit )
- .NET browse-like control ( UltraGrid )
- .NET list control ( UltraListView )
editBoxDataBindingsAdd ( Text, pBS,
OrderNum ).
gridDataSource pBS.
listDataSource pBS. listDataTextField
State. listDataValueField State-Name.
22Demo Databinding
- Bind a list of UI styles to the login dialog
23ABL Custom Controls User Controls
CLASS AddrViewer INHERITS ProgressUserControl
- 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
24ABL Custom Controls Inherited Controls
CLASS OkButton INHERITS InfragisticsUltraButton
- 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
25Demo User-defined ABL Controls
- Create ExplorerBar user control
26Agenda
- 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
27Outlook-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 ApplicationRun ( ).
28Demo
- AutoEdge main container form
29MDI 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
30Demo
- MDIChild forms and GUI windows
31In 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
32Relevant 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
33?
Questions
34Thank You
35(No Transcript)