Presentation on theme: "A18: A Deep Dive into the OpenEdge GUI for .NET™"— Presentation transcript:
1A18: A Deep Dive into the OpenEdge GUI for .NET™ Peter JudgeOpenEdge Principal Software Engineer
2Get Ready… We’re Going Under Attended OpenEdge GUI for .NET IntroUnderstand OO conceptsClasses, Inheritance, MethodsComfortable with OpenEdge ArchitectCan hold your breath for a really long time…
3Demo: OpenEdge GUI for .NET in AutoEdge Existing application following OERANew: OpenEdge GUI for .NETMain containerCustomer maintenance formTest drive scheduling formNote that AutoEdge has ABL and ActiveX UIs. Say that this is the existing UIwithOpenEdge GUI, Open Clients, WebSpeed®, Sonic™Existing: Architecture / CodeReplaced View only in existing MVP model presentation layerOERA business and data layersMix and match for remaining windows
4Under 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
5Agenda ABL for the OpenEdge GUI for .NET GUI for .NET ArchitectureABL Forms & ControlsABL Data BindingABL Event HandlersMix and Match SupportUsing the GUI for .NET in AutoEdge
6OpenEdge GUI for .NET Architecture Single Process for OpenEdge Runtime and .NET Common Language Runtime (CLR)OpenEdge Runtime.NET CLRABL Logic.NET GUIfrm = NEW Form( ).frm:Closing:Subscribe( EventHdlr1 ).WAIT-FOR Application.Run( frm ).EventHdlr1( ) …OpenEdge UI (Presenter)Bridge.NET UI(View)Bridge
7OpenEdge GUI for .NET Architecture Single Process for OpenEdge Runtime and .NET Common Language Runtime (CLR)OpenEdge Runtime.NET CLRABL Logic.NET GUIfrm = NEW Form( ).frm:Closing:Subscribe( EventHdlr1 ).WAIT-FOR Application.Run( frm ).EventHdlr1( ) …471352OpenEdge UI (Presenter)Bridge.NET UI(View)Bridge6
9.NET Windows I/O Blocking Model Application with a single main formWAIT-FOR Application:Run( form ).Used for dashboard and MDI applicationsOther forms are “children” of the main formClosing the main form automatically terminates WAIT-FORApplication with several equal formsWAIT-FOR Application:Run( ).Forms shown at the same time or separatelyAn event handler needs to terminate WAIT-FORApplication:Exit( ).Note that if there’s even one .NET form in the app, you need to use .NET blocking model
10ABL Forms in the OpenEdge GUI for .NET CLASS CustForm INHERITS Progress.Windows.Form:ABL Forms are containers for .NET UI Controls.NET ControlsMicrosoft® .NET Windows Form controlsOpenEdge Ultra Controls for .Net (Infragistics® NetAdvantage)3rd-party .NET controlsABL .NET controlsUser controlsInherited controls
11ABL .NET Controls - User Control CLASS AddrViewer INHERITS Progress…UserControl:Custom ABL control container for complex behaviorExamples of user controlsLabel and editorAddress blockGrid and viewerExamples of user controlsLabel and editboxAddress blockGrid and viewerSample inherited controlsOK buttonCancel buttonRead-only grid
12ABL .NET Controls – Inherited control CLASS OkButton INHERITS Infragistics…UltraButton:Inherits from existing .NET UI control for extending behaviorExamples on inherited controlsButtons: Ok, Cancel, HelpDrop-downs: States, Post codes, CountriesExamples of user controlsLabel and editboxAddress blockGrid and viewerSample inherited controlsOK buttonCancel buttonRead-only grid
14.NET Event Model Controls define events they publish Strongly-typed eventsSupport a list of handlers (callbacks)Controls fire an event when an action occursAll subscribed handlers get calledEvent specific arguments passed in from .NETSystem.EventArgsSubscribe ABL event handlers to eventsClasses define events – strong type to control – strong typing between event and handler . All benefits of OO.CustForm:FormClosing:Subscribe( FormClosingHdlr ).
15Demo: Event HandlerValidate user on OK button click
16Progress.Data. BindingSource .NET Data Binding ModelProgress.Data.BindingSourceProvides data for .NET UI ControlsHow: Provides required APIs to .NET Controls (IList)Why: OpenEdge data provided as .NET needsWhat: Any ABL Query, Buffer or ProDataSet™OpenEdge Runtime.NET CLRProDataSetCustomerLift Line SkiingUrpon FrisbeeHoops CroquetOrder/01/ /04/ /04/93QueryProgress.Data. BindingSource213
17Power of Progress.Data.BindingSource Brings ABL data-centric behavior to .NETAutomatic data synchronizationAutomatic updatingAutomatic batchingAutomatic currencyPropertiesUpdating: AllowEdit, AllowNew, AllowRemoveCurrent row state: NewRow, RowModifiedTyped screen value: InputValue, ChildInputValueGeneral Information: Position, Count
18Data Binding Examples Simple .NET control ( UltraEdit ) .NET browse-like control ( UltraGrid ).NET list control ( UltraListView )editBox:DataBindings:Add ( “Text”, pBS, “OrderNum” ).grid:DataSource = pBS.LIST-ITEM-PAIRS attributelist:DataSource = pBS.list:DataTextField = “State”.list:DataValueField = “State-Name”.
19Demo: Data bindingBind a list of client types to the login dialog
20ABL Mix and Match UI for Migration .NET forms and OpenEdge GUI windows can co-exist in same sessionOne can parent the otherAll functionality maintained independentlyOpenEdge GUI windows can be embedded in a .NET formsClient area managed in ABLOther functionality managed in .NETProgress.Windows.MDIChildFormProgress.Windows.WindowContainer
21Agenda ABL for the OpenEdge GUI for .NET GUI for .NET ArchitectureABL Forms & ControlsABL Data BindingABL Event HandlersMix and Match SupportUsing the GUI for .NET in AutoEdge- Static members: overview of OOABL today – instance members- What does it mean to be static?- Static data (variables and properties)- Static methods (methods and properties)- What happens when a static member comes into being – static constructors- Static members in the hierarchy – inheritance, overriding and overloading- How to reference static members- How to use static members, use case example- Dynamic Programming (DYNAMIC-NEW, DYNAMIC-CAST- Data Widening rules
22Outlook-style Container for AutoEdge OpenEdge GUI for .NET main formDashboard / ContainerDynamic menu and toolbarHook up eventsRe-use existing architectureOERA and MVPRun using WAIT-FOR Application:Run ( ).
24In Summary Modern, competitive UI in ABL Uses .NET objects Object-oriented ABL.NET object features (methods, properties, events)WYSIWYG Visual DesignerUnlimited controls availableLeverages what you knowABL (events, business logic, data constructs)Event-driven programming (WAIT-FOR)OpenEdge Architect
25Relevant Exchange Sessions DEV-2: Making OpenEdge Architect Work for YouDEV-6: Introduction to the OpenEdge GUI for .NETDEV-16: Leveraging the Power of Advanced GUIDEV-20: Sex and Sizzle – Developing with .NET and OpenEdge 10DEV-32: Using the Advanced GUI, Structured Error Handling and SonicMQ to build a Semi-Disconnected Point of SalesDEV-40: Using SmartDataObjects with the Advanced GUI