Session 1018 OpenEdge GUI for .NET Adoption and Migration Strategies Mike Fechner Senior Architect & Director, Consultingwerk Ltd. Mike Fechner, Consultingwerk Ltd. Independent IT consulting organization Focusing on OpenEdge and .NET Located in Cologne, Germany Customers in Germany, Europe, USA Vendor of tools and consulting programs 20 years of Progress experience (V5 … V10) GUI for .NET early adaptor (since 10/2006) 2 © 2010 Consultingwerk Ltd. All rights reserved. Agenda Review GUI for .NET Adoption challenges Adoption strategies • Parallel use of ABL GUI and GUI for .NET • Embedding of ABL GUI into GUI for .NET (and vice versa) • New development using GUI for .NET Conclusion 3 © 2010 Consultingwerk Ltd. All rights reserved. OpenEdge GUI for .NET A Microsoft® .NET™ based Windows graphical user interface that can replace or be integrated into an existing OpenEdge GUI application 4 © 2010 Consultingwerk Ltd. All rights reserved. OpenEdge GUI for .NET State-of-the-art UI on the Windows desktop Integrated feature of OpenEdge 10.2A and 10.2B Supported by both GUI clients • Fat client, prowin32.exe • WebClient No separate license required • Deployment • Development Access and use any .NET control 5 © 2010 Consultingwerk Ltd. All rights reserved. Agenda Review GUI for .NET Adoption challenges Adoption strategies • Parallel use of ABL GUI and GUI for .NET • Embedding of ABL GUI into GUI for .NET (and vice versa) • New development using GUI for .NET Conclusion 6 © 2010 Consultingwerk Ltd. All rights reserved. Adoption Challenges Need to support pre-10.2A users as well Thousands of existing screens Training requirements • • • • OO fundamentals (new programming paradigm) .NET fundamentals Infragistics controls (or any other vendor) OpenEdge 10.0: ProDatasets etc. New tool: OpenEdge Architect 7 © 2010 Consultingwerk Ltd. All rights reserved. Adoption Challenges What are our architecture requirements? Where’s the ADM3? Or at least a working complete sample application? I’ve never used Office 2007, but my customers or sales people request the ribbon… Dockable panes, Explorer bars? What are you talking about? Where the heck is the “Orb” in Office 2010? 8 © 2010 Consultingwerk Ltd. All rights reserved. Agenda Review GUI for .NET Adoption challenges Adoption strategies • Parallel use of ABL GUI and GUI for .NET • Embedding of ABL GUI into GUI for .NET (and vice versa) • New development using GUI for .NET Conclusion 9 © 2010 Consultingwerk Ltd. All rights reserved. Parallel Use of ABL GUI and GUI for .NET Progress client supports ABL widgets and .NET controls at the same time Procedures may instantiate and interact with classes Classes may run procedures Procedures may create .NET controls and subscribe to events 10 © 2010 Consultingwerk Ltd. All rights reserved. Enable ABL UI menu.w to support .NET Forms Requires: The (one and only) WAIT-FOR Statements needs to be .NET style Small modification in mainmenu.w program WAIT-FOR CLOSE OF THIS-PROCEDURE . /* .NET WAIT-FOR not associated to a .NET Form */ WAIT-FOR System.Windows.Forms.Application:Run () . /* Use this method to terminate the WAIT-FOR, e.g from a WINDOW-CLOSE trigger. */ System.Windows.Forms.Application:Exit() . 11 © 2010 Consultingwerk Ltd. All rights reserved. Enable ABL UI menu.w to Support .NET Forms Requires: The (one and only) WAIT-FOR Statements needs to be .NET style Small modification in mainmenu.w program Replace WAIT-FOR for WAIT-FOR CLOSE OF THIS-PROCEDURE . .NET support /* .NET WAIT-FOR not associated to a .NET Form */ WAIT-FOR System.Windows.Forms.Application:Run () . /* Use this method to terminate the WAIT-FOR, e.g from a WINDOW-CLOSE trigger. */ System.Windows.Forms.Application:Exit() . 12 © 2010 Consultingwerk Ltd. All rights reserved. Demo .NET Form started from ABL menu program ABL window started from .NET menu form 13 © 2010 Consultingwerk Ltd. All rights reserved. Demo 14 © 2010 Consultingwerk Ltd. All rights reserved. Demo 15 © 2010 Consultingwerk Ltd. All rights reserved. Demo 16 © 2010 Consultingwerk Ltd. All rights reserved. Demo 17 © 2010 Consultingwerk Ltd. All rights reserved. Demo 18 © 2010 Consultingwerk Ltd. All rights reserved. Agenda Review GUI for .NET Adoption challenges Adoption strategies • Parallel use of ABL GUI and GUI for .NET • Embedding of ABL GUI into GUI for .NET (and vice versa) • New development using GUI for .NET Conclusion 19 © 2010 Consultingwerk Ltd. All rights reserved. Integration of ABL GUI into .NET Forms ABL Windows embedded into .NET Forms Core feature of OpenEdge 10.2A and 10.2B, contents of Window will be embedded into a .NET control Original intention was mixed mode MDI Upgrading the appearance of ABL application by using .NET controls (menu, toolbar, Explorer bars, dockable panes, lookups with UltraGrid, …) Step-by-step introduction of additional (Infragistics) controls to increase users productivity Active X controls contained on the window are well supported (documented in K-Base) 20 © 2010 Consultingwerk Ltd. All rights reserved. Demo Sample MDI container showing various embedding scenarios • • • • • • 21 AppBuilder view Embedded view (runtime) MDI Childs with Toolbar Independent Windows with ribbons Turning ADM2 Tabfolder into dockable panes Overlaying ABL Browse Widget with UltraGrid control © 2010 Consultingwerk Ltd. All rights reserved. .NET MDI Container 22 © 2010 Consultingwerk Ltd. All rights reserved. AppBuilder View 23 © 2010 Consultingwerk Ltd. All rights reserved. Embedded View 24 © 2010 Consultingwerk Ltd. All rights reserved. Embedded View Menu-Bar, part of Infragistics Toolbar 25 © 2010 Consultingwerk Ltd. All rights reserved. Dockable Panes 26 © 2010 Consultingwerk Ltd. All rights reserved. Dockable Panes 27 © 2010 Consultingwerk Ltd. All rights reserved. Dockable Panes 28 © 2010 Consultingwerk Ltd. All rights reserved. Browser 29 © 2010 Consultingwerk Ltd. All rights reserved. Browser replaced with UltraGrid 30 © 2010 Consultingwerk Ltd. All rights reserved. Embedded ABL Windows Progress offers two controls for embedding: Progress.Windows.WindowContainer • System.Windows.Forms.UserControl –… – System.Windows.Forms.Control Progress.Windows.MDIChildForm • Progress.Windows.Form – System.Windows.Forms.Form –… – System.Windows.Forms.Control 31 © 2010 Consultingwerk Ltd. All rights reserved. Embedded ABL Windows Progress offers two Controls for embedding: Progress.Windows.WindowContainer • System.Windows.Forms.UserControl –… – System.Windows.Forms.Control Progress.Windows.MDIChildForm XXXXX • Progress.Windows.Form – System.Windows.Forms.Form –… – System.Windows.Forms.Control 32 © 2010 Consultingwerk Ltd. All rights reserved. Embedded ABL Windows Menu Bar Window Border Client Area (FRAMEs) Message Area Status Area 33 © 2010 Consultingwerk Ltd. All rights reserved. Embedded ABL Windows Client Area (FRAMEs) 34 © 2010 Consultingwerk Ltd. All rights reserved. Embedded ABL Windows .NET Form Client Area (FRAMEs) Window Container 35 © 2010 Consultingwerk Ltd. All rights reserved. Embedded ABL Windows ASSIGN oContainer = NEW WindowContainer () oContainer:EmbeddedWindow = hWindow . Window may not yet be REALIZED (i.e., HIDDEN and VISIBLE not yet set, no LOAD-ICON) When using AppBuilder generated code, this is only possible by using the Method-Library and include files 36 © 2010 Consultingwerk Ltd. All rights reserved. Recommended Practices Use include files for modifications on existing .w files; use compile-time check for pre 10.2A support Render .NET controls dynamically from existing ABL widgets (menu, toolbar first) Identification of additional ABL widgets that may be substituted with .NET controls (low-hanging-fruits first, tab folder, browser, …) Design specialized .NET controls using Visual Designer, no dynamic code without need 37 © 2010 Consultingwerk Ltd. All rights reserved. Recommended Practices / Event Handling Keep the control in the .w file to reuse existing logic .NET Event handlers should APPLY ABL Events • CLOSE OF WINDOW – FormClosing Event should always be cancelled as ABL WINDOW-CLOSE trigger might terminate with RETURN NO-APPLY • CHOOSE of MENU-ITEM, BUTTON, … – .NET ToolClick Event Handler executes ABL Event (i.e., CHOOSE on ABL widget) 38 © 2010 Consultingwerk Ltd. All rights reserved. Real-world Sample I: Update Texware / Germany ERP for textile producers of a German Progress partner • AppBuilder view • Runtime GUI for .NET Own framework, developed in V7/V8 Transition to multi-window application Challenge with pessimistic locking and large transactions 10 days of research, customization of partners’ framework and WinKit 39 © 2010 Consultingwerk Ltd. All rights reserved. Real-world Sample I: Update Texware / Germany 40 © 2010 Consultingwerk Ltd. All rights reserved. Real-world Sample I: Update Texware / Germany 41 © 2010 Consultingwerk Ltd. All rights reserved. Real-world Sample I: Update Texware / Germany 42 © 2010 Consultingwerk Ltd. All rights reserved. Real-world Sample II: Shuttleworth / UK UK-based Progress Partner Huge ERP system for printing industry V8 style framework (ADM1-like) Clear vision of Outlook look-and-feel Browse windows as MDI children Data windows as separate windows • Similar to Outlook where Emails and Appointments are opened separately Majority of changes in existing framework Minor changes to existing screens 43 © 2010 Consultingwerk Ltd. All rights reserved. Shuttleworth: Menu Toolbar & Browse Window 44 © 2010 Consultingwerk Ltd. All rights reserved. Shuttleworth: Menu Toolbar & Browse Window 45 © 2010 Consultingwerk Ltd. All rights reserved. Shuttleworth: Menu Toolbar & Browse Window ABL Frame 46 © 2010 Consultingwerk Ltd. All rights reserved. Shuttleworth: Data Window 47 © 2010 Consultingwerk Ltd. All rights reserved. Shuttleworth: Data Window 48 © 2010 Consultingwerk Ltd. All rights reserved. Shuttleworth: Data Window ABL Frame 49 © 2010 Consultingwerk Ltd. All rights reserved. Customer Feedback on Embedded Windows Takes away time pressure from Progress ISV • Recognizable UI improvements with minimal effort • Reduced implementation risk (reduces testing and training) Same source code remains usable on V9, V10.0, V10.1 (preprocessor checks) Simplified maintenance, single code base Developers can still use the well-known tools (AppBuilder) to maintain the application Technology change at the pace of the team, not the trend No “shock” for existing users, but sales easier 50 © 2010 Consultingwerk Ltd. All rights reserved. Enhancing ABL GUI‘s Appearance Don’t underestimate the power of new icons or images (before showing the first prototype to users or decision makers) It’s usually worth US$ 250 — for 10.000s of icons (even when you may have to change later) Review colors and fonts of the ABL GUI, use the blue colors known from Office 2007/2010, use modern fonts (Segoe UI, Verdana) 51 © 2010 Consultingwerk Ltd. All rights reserved. Agenda Review GUI for .NET Adoption challenges Adoption strategies • Parallel use of ABL GUI and GUI for .NET • Embedding of ABL GUI into GUI for .NET (and vice versa) • New development using GUI for .NET Conclusion 52 © 2010 Consultingwerk Ltd. All rights reserved. New Development Using GUI for .NET Possible strategies • New screens integrated into existing application (e.g., scheduler/planning screen or drill down) • Redevelop whole client New development might go along with an architectural revision (OERA) UI as the driver for new architecture 53 © 2010 Consultingwerk Ltd. All rights reserved. New Development Using GUI for .NET Don’t underestimate the time required to build (good) reusable components Requires at least basic OO understanding • Type concepts, interface types, CAST • Strong typing can be a blessing and a curse UI Framework or template building requires good OO design skills and knowledge about Visual Designer internals Extension of (some) .NET classes is key to productive application development Don’t inherit just because “you can” 54 © 2010 Consultingwerk Ltd. All rights reserved. New Development Using GUI for .NET Get used to MSDN, Infragistics Forum, Google and .NET community sites (e.g. Codeproject) to find answers to how-to questions Learn translating C# or VB.NET to ABL Consider hiring a .NET developer or mentor for the UI (but let him know that AppServer is not an SQL server or a Web server) 55 © 2010 Consultingwerk Ltd. All rights reserved. Agenda Review GUI for .NET Adoption challenges Adoption strategies • Parallel use of ABL GUI and GUI for .NET • Embedding of ABL GUI into GUI for .NET (and vice versa) • New development using GUI for .NET Conclusion 56 © 2010 Consultingwerk Ltd. All rights reserved. Conclusion GUI for .NET is well integrated in today’s ABL and client products Fully compatible to classic ABL GUI Nobody forces you to rewrite your client (at once) Start with integrating existing app into GUI for .NET Consider new architecture (OERA) Tools available to support adoption of GUI for .NET Start using OpenEdge Architect and OO today! That is the best starting point for GUI for .NET 57 © 2010 Consultingwerk Ltd. All rights reserved. Additional Information Please visit our booth at the Exchange Online 2010 solutions expo! http://www.consultingwerk.de/ • WinKit – Update texware case study – WinKit showcase • SmartComponent Library GUI for .NET Forum on http://www.psdn.com/ 58 © 2010 Consultingwerk Ltd. All rights reserved. Session 1018 OpenEdge GUI for .NET Adoption and Migration Strategies Mike Fechner Senior Architect & Director, Consultingwerk Ltd.