1 / 39

Pattern Libraries: Theory

Adrian Slade Principal Pattern Engineer aslade@synon.com. Pattern Libraries: Theory. Agenda. What is a Pattern? Why Patterns now? Library structure Naming & Coding conventions Using the Patterns OBASE integration & future Questions Quick demo. What’s a Pattern?.

ludwig
Download Presentation

Pattern Libraries: Theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Adrian Slade Principal Pattern Engineer aslade@synon.com Pattern Libraries:Theory

  2. Agenda • What is a Pattern? • Why Patterns now? • Library structure • Naming & Coding conventions • Using the Patterns • OBASE integration & future • Questions • Quick demo

  3. What’s a Pattern? • Describes a solution to a problem within a context • Obsydian stores and codifies reusable patterns • 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. Example 1 Function to load a grid

  5. Example 2 Simple Business Contact

  6. What’s New? • Collections Points • Enable merge of code • Multiple Function Inheritance • Code comes from several sources • Will be enabled in Obsydian V3.5

  7. Multiple Function Inheritance Function A (part 1) Function B Function A (part 2) Function C (part 1) Function A (part 3) Function C (part 2) Local code Function A Function B Function C Multiple is a triples Code merges

  8. What’s New? • Collections Points • Enable merge of code • Multiple Function Inheritance • Code comes from several sources • Will be enabled in Obsydian V3.5 • ActiveX enabled on Panels • Allows better runtime control of the panel

  9. What’s New? • Collections Points • Enable merge of code • Multiple Function Inheritance • Code comes from several sources • Will be enabled in Obsydian V3.5 • ActiveX enabled on Panels • Allows better runtime control of the panel • Extract All • No sub models required. All libraries at once.

  10. Structure • Library content is more discrete • Easier to find objects • Models are smaller • Smaller pieces • Easier to replace parts of a composite pattern • Not all Synon originated

  11. Layers Vertical Applications Retail banking, Insurance … Horizontal Applications Inventory, A/R, A/P, GL ... Business Support Workflow, Security, Archiving, Transaction Processing Foundations Data maintenance, different GUI styles ... AdLibs Storage, Validate Active, UIStyle ...

  12. Structure Diagram ACTIVE UIBASIC AS400 ODBC3 DATE WINAPI STORAGE VALIDATE ... FOUNDATION Technology Libraries UISTYLE FIELDS OBJECTS A model’s libraries are on the line below it

  13. OBJECTS • The current library but modified • Function shell as top of inheritance tree • Provides message services • UI function shell • Defines the common Events Handler • Some more ‘*’ fields

  14. FIELDS • Common field definitions • Reduces field redundancy and name clashes • Exceptions : ‘*’ fields

  15. STORAGE • An entity with views - Update & Fetch • Update view scopes 4 functions • Insert, Update & Delete row • CheckedUpdate - image compare • Fetch view scopes 4 functions • CheckRow • FetchRow  Get one instance • BlockFetch  Get sequential • ProcessGroup  Process some instances • Type specific entities • RelationalTable • …

  16. VALIDATE • Meta functions for validation

  17. ACTIVE • Wrapper functions to handle common ActiveX controls • Calendar • Treeview/Listview • Progress bar • File Open/Save • … • Scripts and code included to make them work • Most from Microsoft • Part of Windows O/S

  18. UIBASIC • Granular unscoped functions • Functions with panel elements • Display, Update, Grid • Combined in some useful ways • Update with New • Some code to handle control states • protect keys, • protect virtuals, • …

  19. UISTYLE • Replacement for ‘Standard functions’, plus • More complex combinations of UIBASIC functions • Dual grids • Grid with editing region • … • Includes validation

  20. FOUNDATION • Several useful Entities • EditDetail  Grid maintained entity • EditDialog  User maintained entity • SurrogateKeyed  Enumerated entity • SurrogateAlternate - New • ReferredTo  Referenced entity • Association  Two parent child (3 flavors) • … • Provides a starter set for new developers • ‘How-To Guide’ for pattern developers

  21. Technology Libraries • AS400 • AS/400 specific functionality • No entities • DATE • Same as the current OBDATE • ODBC3 • ODBC version 3 compliant API’s • Rewritten and much smaller • WINAPI • Windows API’s for 32 bit applications • Combination of the current OBWIN, OBNT and OBMAPI

  22. Naming Conventions • Most names have no spaces • EditDetail • Name clashes avoided • Exception - STORAGE/RelationalTable.Physical table • Panel regions and local variables

  23. Panel & Local Variables

  24. Naming Conventions • Most names have no spaces • EditDetail • Name clashes avoided • Exception - STORAGE/Physical Table • Panel regions and Local variables • ActiveX Scripts

  25. ActiveX Scripts

  26. Coding Conventions • Most code added in subroutines or collection points • Most subroutines have a start and end edit point • Code is also conditioned on a meta field

  27. Subroutines & Collection Points

  28. Coding Conventions • Most code added in subroutines or collection points • Most subroutines have a start and end edit point • Code is also conditioned on a meta field • Local fields added to function specific variables

  29. Local variables

  30. ActiveX Scripts • Scoped to function • Allows local modification • All in VB Script • Provide support for the control’s events

  31. VB Script

  32. How do I use all this? • Build larger functions from smaller parts in (almost) any combination • Add in parts later as required • Add an is a to your function • Set values and call subroutines to use the inherited code • Can all be described in the documentation - compiled HTML

  33. Compiled HTML Pattern Library Help File

  34. OBASE integration OBJECTS OBASE… Patterns An Application • Entities can be a mixture of inheritance • Application can be a mixture of old and new • Integration across function partition • Old functions cannot inherit from new ones

  35. OBASE futures • OBASE key element of a 5250 solution • Will keep up-to-date with the product • Will support any new generators • No major enhancements or new entities

  36. Questions?

  37. Model statistics • 10 entities - 10 tables, 26 views, 53 fields, 1024 triples • 116 implemented functions, 25 with panels • 11 functions have AD changes - 188 lines of code • 21 panels with design changes • Local model - 2.45mb, group model 634kb • Generates 220,000 lines of code in 2min 20sec • 6.93mb source in 500 files • Takes 11min to compile for release • 3.17mb application in 155 files • Average DLL size is 22kb, largest is 69kb

  38. Patterns in Action

  39. Adrian Slade Principal Pattern Engineer aslade@synon.com Pattern Libraries:Theory

More Related