a deep dive into openedge gui for.net ™ peter judge openedge principal software engineer

28
A Deep Dive into OpenEdge GUI for .NET Peter Judge OpenEdge Principal Software Engineer

Upload: ada-phillips

Post on 18-Dec-2015

243 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

A Deep Dive into OpenEdge GUI for .NET™

Peter JudgeOpenEdge Principal Software Engineer

Page 2: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation2 A Deep Dive into GUI for .NET

Get Ready… We’re Going Under

Attended OpenEdge GUI for .NET intro session

Understand OO concepts• Classes, Inheritance, Methods

Comfortable with OpenEdge Architect

Can hold your breath for a really long time…

Page 3: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation3 A Deep Dive into GUI for .NET

Demo: OpenEdge GUI for .NET in AutoEdge

Update an existing application to use OpenEdge GUI for .NET

• New:

–Main container

–Customer maintenance form

–Test drive scheduling form

• Existing:

–Everything else…

Note: application followed OERA

Page 4: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation4 A Deep Dive into GUI for .NET

D I S C L A I M E R

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.

D I S C L A I M E R

Page 5: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation5 A Deep Dive into GUI for .NET

Agenda

ABL for OpenEdge GUI for .NET• GUI for .NET Architecture

• ABL Forms & Controls

• ABL Data Binding

• ABL Event Handlers

• Mix and Match Support

Using GUI for .NET in AutoEdge

Page 6: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation6 A Deep Dive into GUI for .NET

OpenEdge GUI for .NET Architecture

Single Process for OpenEdge Runtime and .NET Common Language Runtime (CLR)

OpenEdge RuntimeOpenEdge Runtime .NET CLR.NET CLR

.NET GUI.NET GUIfrm = NEW Form( ).frm:Closing:Subscribe( EventHdlr1 ).WAIT-FOR Application.Run( frm ).

EventHdlr1( ) …

frm = NEW Form( ).frm:Closing:Subscribe( EventHdlr1 ).WAIT-FOR Application.Run( frm ).

EventHdlr1( ) …

ABL LogicABL Logic

OpenEdge UI (Presenter)

.NET UI (View)BridgeBridgeBridgeBridge

Page 7: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation7 A Deep Dive into GUI for .NET

OpenEdge GUI for .NET Architecture

Single Process for OpenEdge Runtime and .NET Common Language Runtime (CLR)

OpenEdge RuntimeOpenEdge Runtime .NET CLR.NET CLR

.NET GUI.NET GUIfrm = NEW Form( ).frm:Closing:Subscribe( EventHdlr1 ).WAIT-FOR Application.Run( frm ).

EventHdlr1( ) …

frm = NEW Form( ).frm:Closing:Subscribe( EventHdlr1 ).WAIT-FOR Application.Run( frm ).

EventHdlr1( ) …

ABL LogicABL Logic

OpenEdge UI (Presenter)

.NET UI (View)BridgeBridgeBridgeBridge

4

12

6

7 3 5

Page 8: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation8 A Deep Dive into GUI for .NET

.NET Inheritance Stack

UI components inheritance stack includes .NET root class: System.Object

CustEntryForm (ABL)

System… Form

Progress. Windows.Form

System… Control

Infragistics… UltraButton

Progress.Lang.Object

System.Object

All .NET Classes ABL Forms .NET Controls

.NET Classes = GreenABL Classes = Blue

Page 9: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation9 A Deep Dive into GUI for .NET

.NET I/O Blocking Model (Event Loop)

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 using

call to Application:Exit( )

Page 10: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation10 A Deep Dive into GUI for .NET

ABL Forms in OpenEdge GUI for .NET

ABL Forms are containers for .NET UI Controls

.NET UI Controls• Microsoft® .NET WinForms controls• OpenEdge Ultra Controls for .NET (Infragistics®

NetAdvantage)• 3rd party .NET WinForms controls

ABL .NET UI controls• User controls• Inherited controls

CLASS CustForm INHERITS Progress.Windows.Form:

Page 11: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation11 A Deep Dive into GUI for .NET

ABL .NET Controls - User Control

Custom ABL control container for existing controls to provide complex behavior

Examples of user controls• Label and editor

• Address block

• Grid and viewer

CLASS AddrViewer INHERITS Progress…UserControl:

Page 12: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation12 A Deep Dive into GUI for .NET

ABL .NET Controls – Inherited Control

Customizes behavior of an existing .NET UI control using inheritance

Examples of inherited controls• Buttons: Ok, Cancel, Help

• Drop-downs: States, Post codes, Countries

CLASS OkButton INHERITS Infragistics…UltraButton:

Page 13: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation13 A Deep Dive into GUI for .NET

Demo: ABL Forms

Create a login dialog

Page 14: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation14 A Deep Dive into GUI for .NET

.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

• Event specific arguments passed in from .NETSystem.EventArgs

Subscribe ABL event handlers to events

CustForm:FormClosing:Subscribe( FormClosingHdlr ).

Page 15: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation15 A Deep Dive into GUI for .NET

Demo: Event Handler

Validate user on OK button click

Page 16: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation16 A Deep Dive into GUI for .NET

.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™

OpenEdge RuntimeOpenEdge Runtime .NET CLR.NET CLR

Progress.Data. BindingSource

ProDataSetCustomer

Lift Line SkiingUrpon FrisbeeHoops Croquet

Order

1 53 01/01/932 81 01/04/933 66 01/04/93

Query

12

3

Page 17: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation17 A Deep Dive into GUI for .NET

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

Page 18: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation18 A Deep Dive into GUI for .NET

Data Binding Examples

Simple .NET control ( UltraEdit )

.NET browse-like control ( UltraGrid )

.NET list control ( UltraListView )

editBox:DataBindings:Add ( “Text”, pBS, “OrderNum” ).

list:DataSource = pBS.list:DataTextField = “State”.list:DataValueField = “State-Name”.

grid:DataSource = pBS.

Page 19: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation19 A Deep Dive into GUI for .NET

Demo: Data binding

Bind a list of client types to the login dialog

Page 20: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation20 A Deep Dive into GUI for .NET

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 in a .NET forms• Client area managed in ABL• Other functionality managed in .NET• Progress.Windows.MDIChildForm• Progress.Windows.WindowContainer

Page 21: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation21 A Deep Dive into GUI for .NET

Agenda

ABL for the OpenEdge GUI for .NET• GUI for .NET Architecture

• ABL Forms & Controls

• ABL Data Binding

• ABL Event Handlers

• Mix and Match Support

Using the GUI for .NET in AutoEdge

Page 22: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation22 A Deep Dive into GUI for .NET

Outlook-style Container for AutoEdge

OpenEdge GUI for .NET main form• Dashboard / Container

• Dynamic menu and toolbar– Hook up events

• Re-use existing architecture– OERA and MVP

Run using WAIT-FOR Application:Run ( ).

Page 23: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation23 A Deep Dive into GUI for .NET

Demo

AutoEdge main container form

Page 24: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation24 A Deep Dive into GUI for .NET

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

Page 25: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation25 A Deep Dive into GUI for .NETDEV-7 What’s New in the Object-Oriented ABL

Additional Materials

PSDN Live Boston 2008 Sessions DEV-2: Making OpenEdge Architect Work for You DEV-3: Introduction to the OpenEdge GUI for .NET DEV-17: Using SmartDataObjects with the Advanced GUI

(GUI for .NET) DEV-19: OpenEdge ABL Info Exchange

Exchange 2008 Sessions DEV-16: Leveraging the Power of Advanced GUI DEV-20: Sex and Sizzle – Developing with .NET and

OpenEdge 10 DEV-32: Using the Advanced GUI, Structured Error Handling

and SonicMQ to build a Semi-Disconnected Point of Sales

Page 26: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation26 A Deep Dive into GUI for .NET

Questions?

Page 27: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation27 A Deep Dive into GUI for .NET

Thank You

Page 28: A Deep Dive into OpenEdge GUI for.NET ™ Peter Judge OpenEdge Principal Software Engineer

© 2008 Progress Software Corporation28 A Deep Dive into GUI for .NET