Pattern Libraries: Theory Adrian Slade Principal Pattern Engineer

Download Pattern Libraries: Theory Adrian Slade Principal Pattern Engineer

Post on 18-Jan-2018

220 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

1998 Synon Corporation 3 Whats a Pattern? Describes a solution to a problem within a context Describes a solution to a problem within a context Obsydian stores and codifies reusable patterns Obsydian stores and codifies reusable patterns Class libraries are now Pattern Libraries Class libraries are now Pattern Libraries Analysis Patterns by Fowler. Pub: Addison-Wesley. ISBN Pattern Oriented Software Architecture by Buschmann, Meunier, Rohnert, Sommerland & Stall. Pub: Wiley. ISBN

TRANSCRIPT

<p>Pattern Libraries: Theory Adrian Slade Principal Pattern Engineer 1998 Synon Corporation 2Agenda What is a Pattern? What is a Pattern? Why Patterns now? Why Patterns now? Library structure Library structure Naming &amp; Coding conventions Naming &amp; Coding conventions Using the Patterns Using the Patterns OBASE integration &amp; future OBASE integration &amp; future Questions Questions Quick demo Quick demo 1998 Synon Corporation 3 Whats a Pattern? Describes a solution to a problem within a context Describes a solution to a problem within a context Obsydian stores and codifies reusable patterns Obsydian stores and codifies reusable patterns Class libraries are now Pattern Libraries Class libraries are now Pattern Libraries Analysis Patterns by Fowler. Pub: Addison-Wesley. ISBN Pattern Oriented Software Architecture by Buschmann, Meunier, Rohnert, Sommerland &amp; Stall. Pub: Wiley. ISBN 1998 Synon Corporation 4 Example 1 Function to load a grid 1998 Synon Corporation 5 Example 2 Simple Business Contact 1998 Synon Corporation 6 Whats New? Collections Points Collections Points Enable merge of code Enable merge of code Multiple Function Inheritance Multiple Function Inheritance Code comes from several sources Code comes from several sources Will be enabled in Obsydian V3.5 Will be enabled in Obsydian V3.5 1998 Synon Corporation 7 Multiple Function Inheritance Function CFunction BFunction A Function A (part 1) Function A (part 2) Function B Function C (part 1) Function C (part 2) Function A (part 3) Local code is a Multiple is a triples Code merges 1998 Synon Corporation 8 Whats New? Collections Points Collections Points Enable merge of code Enable merge of code Multiple Function Inheritance Multiple Function Inheritance Code comes from several sources Code comes from several sources Will be enabled in Obsydian V3.5 Will be enabled in Obsydian V3.5 ActiveX enabled on Panels ActiveX enabled on Panels Allows better runtime control of the panel Allows better runtime control of the panel 1998 Synon Corporation 9 Whats New? Collections Points Collections Points Enable merge of code Enable merge of code Multiple Function Inheritance Multiple Function Inheritance Code comes from several sources Code comes from several sources Will be enabled in Obsydian V3.5 Will be enabled in Obsydian V3.5 ActiveX enabled on Panels ActiveX enabled on Panels Allows better runtime control of the panel Allows better runtime control of the panel Extract All Extract All No sub models required. All libraries at once. No sub models required. All libraries at once. 1998 Synon Corporation 10Structure Library content is more discrete Library content is more discrete Easier to find objects Easier to find objects Models are smaller Models are smaller Smaller pieces Smaller pieces Easier to replace parts of a composite pattern Easier to replace parts of a composite pattern Not all Synon originated Not all Synon originated 1998 Synon Corporation 11Layers Horizontal Applications Inventory, A/R, A/P, GL... Vertical Applications Retail banking, Insurance Business Support Workflow, Security, Archiving, Transaction Processing Foundations Data maintenance, different GUI styles... AdLibs Storage, Validate Active, UIStyle... 1998 Synon Corporation 12 Structure Diagram OBJECTS ACTIVEUIBASICSTORAGEVALIDATE UISTYLE FIELDS A models libraries are on the line below it FOUNDATION Technology Libraries WINAPI AS400ODBC3DATE... 1998 Synon Corporation 13OBJECTS The current library but modified The current library but modified Function shell as top of inheritance tree Function shell as top of inheritance tree Provides message services Provides message services UI function shell UI function shell Defines the common Events Handler Defines the common Events Handler Some more * fields Some more * fields 1998 Synon Corporation 14FIELDS Common field definitions Common field definitions Reduces field redundancy and name clashes Reduces field redundancy and name clashes Exceptions : * fields Exceptions : * fields 1998 Synon Corporation 15STORAGE An entity with views - Update &amp; Fetch An entity with views - Update &amp; Fetch Update view scopes 4 functions Update view scopes 4 functions Insert, Update &amp; Delete rowInsert, Update &amp; Delete row CheckedUpdate - image compareCheckedUpdate - image compare Fetch view scopes 4 functions Fetch view scopes 4 functions CheckRowCheckRow FetchRow Get one instanceFetchRow Get one instance BlockFetch Get sequentialBlockFetch Get sequential ProcessGroup Process some instancesProcessGroup Process some instances Type specific entities Type specific entities RelationalTableRelationalTable 1998 Synon Corporation 16VALIDATE Meta functions for validation Meta functions for validation 1998 Synon Corporation 17ACTIVE Wrapper functions to handle common ActiveX controls Wrapper functions to handle common ActiveX controls Calendar Calendar Treeview/Listview Treeview/Listview Progress bar Progress bar File Open/Save File Open/Save Scripts and code included to make them work Scripts and code included to make them work Most from Microsoft Most from Microsoft Part of Windows O/S Part of Windows O/S 1998 Synon Corporation 18UIBASIC Granular unscoped functions Granular unscoped functions Functions with panel elements Functions with panel elements Display, Update, Grid Display, Update, Grid Combined in some useful ways Combined in some useful ways Update with New Update with New Some code to handle control states Some code to handle control states protect keys, protect keys, protect virtuals, protect virtuals, 1998 Synon Corporation 19UISTYLE Replacement for Standard functions, plus Replacement for Standard functions, plus More complex combinations of UIBASIC functions More complex combinations of UIBASIC functions Dual grids Dual grids Grid with editing region Grid with editing region Includes validation Includes validation 1998 Synon Corporation 20FOUNDATION Several useful Entities Several useful Entities EditDetail Grid maintained entity EditDetail Grid maintained entity EditDialog User maintained entity EditDialog User maintained entity SurrogateKeyed Enumerated entity SurrogateKeyed Enumerated entity SurrogateAlternate - New SurrogateAlternate - New ReferredTo Referenced entity ReferredTo Referenced entity Association Two parent child (3 flavors) Association Two parent child (3 flavors) Provides a starter set for new developers Provides a starter set for new developers How-To Guide for pattern developers How-To Guide for pattern developers 1998 Synon Corporation 21 Technology Libraries AS400 AS400 AS/400 specific functionality AS/400 specific functionality No entities No entities DATE DATE Same as the current OBDATE Same as the current OBDATE ODBC3 ODBC3 ODBC version 3 compliant APIs ODBC version 3 compliant APIs Rewritten and much smaller Rewritten and much smaller WINAPI WINAPI Windows APIs for 32 bit applications Windows APIs for 32 bit applications Combination of the current OBWIN, OBNT and OBMAPI Combination of the current OBWIN, OBNT and OBMAPI 1998 Synon Corporation 22 Naming Conventions Most names have no spaces Most names have no spaces EditDetail EditDetail Name clashes avoided Name clashes avoided Exception - STORAGE/RelationalTable.Physical table Exception - STORAGE/RelationalTable.Physical table Panel regions and local variables Panel regions and local variables 1998 Synon Corporation 23 Panel &amp; Local Variables 1998 Synon Corporation 24 Naming Conventions Most names have no spaces Most names have no spaces EditDetail EditDetail Name clashes avoided Name clashes avoided Exception - STORAGE/Physical Table Exception - STORAGE/Physical Table Panel regions and Local variables Panel regions and Local variables ActiveX Scripts ActiveX Scripts 1998 Synon Corporation 25 ActiveX Scripts 1998 Synon Corporation 26 Coding Conventions Most code added in subroutines or collection points Most code added in subroutines or collection points Most subroutines have a start and end edit point Most subroutines have a start and end edit point Code is also conditioned on a meta field Code is also conditioned on a meta field 1998 Synon Corporation 27 Subroutines &amp; Collection Points 1998 Synon Corporation 28 Coding Conventions Most code added in subroutines or collection points Most code added in subroutines or collection points Most subroutines have a start and end edit point Most subroutines have a start and end edit point Code is also conditioned on a meta field Code is also conditioned on a meta field Local fields added to function specific variables Local fields added to function specific variables 1998 Synon Corporation 29 Local variables 1998 Synon Corporation 30 ActiveX Scripts Scoped to function Scoped to function Allows local modification Allows local modification All in VB Script All in VB Script Provide support for the controls events Provide support for the controls events 1998 Synon Corporation 31 VB Script 1998 Synon Corporation 32 How do I use all this? Build larger functions from smaller parts in (almost) any combination Build larger functions from smaller parts in (almost) any combination Add in parts later as required Add in parts later as required Add an is a to your function Add an is a to your function Set values and call subroutines to use the inherited code Set values and call subroutines to use the inherited code Can all be described in the documentation - compiled HTML Can all be described in the documentation - compiled HTML 1998 Synon Corporation 33 Compiled HTML Pattern Library Help File 1998 Synon Corporation 34 OBASE integration Entities can be a mixture of inheritance Entities can be a mixture of inheritance Application can be a mixture of old and new Application can be a mixture of old and new Integration across function partition Integration across function partition Old functions cannot inherit from new ones Old functions cannot inherit from new ones OBASEPatterns An Application OBJECTS 1998 Synon Corporation 35 OBASE futures OBASE key element of a 5250 solution OBASE key element of a 5250 solution Will keep up-to-date with the product Will keep up-to-date with the product Will support any new generators Will support any new generators No major enhancements or new entities No major enhancements or new entities 1998 Synon Corporation 36 Questions? 1998 Synon Corporation 37 Model statistics 10 entities - 10 tables, 26 views, 53 fields, 1024 triples 10 entities - 10 tables, 26 views, 53 fields, 1024 triples 116 implemented functions, 25 with panels 116 implemented functions, 25 with panels 11 functions have AD changes lines of code 11 functions have AD changes lines of code 21 panels with design changes 21 panels with design changes Local model mb, group model 634kb Local model mb, group model 634kb Generates 220,000 lines of code in 2min 20sec Generates 220,000 lines of code in 2min 20sec 6.93mb source in 500 files 6.93mb source in 500 files Takes 11min to compile for release Takes 11min to compile for release 3.17mb application in 155 files 3.17mb application in 155 files Average DLL size is 22kb, largest is 69kb Average DLL size is 22kb, largest is 69kb 1998 Synon Corporation 38 Patterns in Action Pattern Libraries: Theory Adrian Slade Principal Pattern Engineer</p>