Download presentation
Presentation is loading. Please wait.
Published byChristiana Hudson Modified over 8 years ago
1
Pattern Libraries: Theory Adrian Slade Principal Pattern Engineer aslade@synon.com
2
©1998 Synon Corporation 2Agenda What is a Pattern? What is a Pattern? Why Patterns now? Why Patterns now? Library structure Library structure Naming & Coding conventions Naming & Coding conventions Using the Patterns Using the Patterns OBASE integration & future OBASE integration & future Questions Questions Quick demo Quick demo
3
©1998 Synon Corporation 3 What’s 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 0-201-89542-0 Pattern Oriented Software Architecture by Buschmann, Meunier, Rohnert, Sommerland & Stall. Pub: Wiley. ISBN 0-471-95869-7
4
©1998 Synon Corporation 4 Example 1 Function to load a grid
5
©1998 Synon Corporation 5 Example 2 Simple Business Contact
6
©1998 Synon Corporation 6 What’s 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
7
©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
8
©1998 Synon Corporation 8 What’s 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
9
©1998 Synon Corporation 9 What’s 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.
10
©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
11
©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...
12
©1998 Synon Corporation 12 Structure Diagram OBJECTS ACTIVEUIBASICSTORAGEVALIDATE UISTYLE FIELDS A model’s libraries are on the line below it FOUNDATION Technology Libraries WINAPI AS400ODBC3DATE...
13
©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
14
©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
15
©1998 Synon Corporation 15STORAGE An entity with views - Update & Fetch An entity with views - Update & Fetch Update view scopes 4 functions Update view scopes 4 functions Insert, Update & Delete rowInsert, Update & 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 …
16
©1998 Synon Corporation 16VALIDATE Meta functions for validation Meta functions for validation
17
©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
18
©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, …
19
©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
20
©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
21
©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 API’s ODBC version 3 compliant API’s Rewritten and much smaller Rewritten and much smaller WINAPI WINAPI Windows API’s for 32 bit applications Windows API’s for 32 bit applications Combination of the current OBWIN, OBNT and OBMAPI Combination of the current OBWIN, OBNT and OBMAPI
22
©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
23
©1998 Synon Corporation 23 Panel & Local Variables
24
©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
25
©1998 Synon Corporation 25 ActiveX Scripts
26
©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
27
©1998 Synon Corporation 27 Subroutines & Collection Points
28
©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
29
©1998 Synon Corporation 29 Local variables
30
©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 control’s events Provide support for the control’s events
31
©1998 Synon Corporation 31 VB Script
32
©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
33
©1998 Synon Corporation 33 Compiled HTML Pattern Library Help File
34
©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 OBASE…Patterns An Application OBJECTS
35
©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
36
©1998 Synon Corporation 36 Questions?
37
©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 - 188 lines of code 11 functions have AD changes - 188 lines of code 21 panels with design changes 21 panels with design changes Local model - 2.45mb, group model 634kb Local model - 2.45mb, 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
38
©1998 Synon Corporation 38 Patterns in Action
39
Pattern Libraries: Theory Adrian Slade Principal Pattern Engineer aslade@synon.com
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.