IBM Software Group EGL Simplify Innovation EGL Application
IBM Software Group ® EGL Simplify Innovation EGL Application Patterns Generation Hervé Le Bars, Architect, Enterprise Modernisation IBM Rational SWG, Enterprise Tools & Compilers EGL International Conference Zurich Oct 20 -21 2008 © 2008 IBM Corporation
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation Agenda § Introduction: theorical approach 4 What is a programming pattern ? 4 How do programming patterns emerge ? 4 Benefits of using tools to support Pattern Driven Programming ? § Application of pattern generation to Batch programming 4 What is a batch treatment ? 4 Introducing the Batch programming pattern § Live demo 4 Development of batch programs in EGL using pattern generation. § Next steps and roadmap 4 New patterns. 4 Pattern authoring. § Questions ? 2
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation What is a programming pattern ? § A programming pattern is an implementation template for a recurring class of problems in a specific application domain. § The implementation template needs parameters to derive an actual implementation. § Pattern parameters describe an actual problem to solve, in the class. § Pattern parameters can be described in a Domain Specific Model (DSM) or Domain Specific Language (DSL). 3
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation How do programming patterns emerge ? § By practice ! 4 Community of programmers in the application domain isolate a reccuring class of problems and propose a reference implementation (and vocabulary). 4 An implementation template derives from the reference implementation. 4 The variation of problems in the class is captured in a DSM. 4 A DSM defines parameters used to derive an actual implementation from the implementation template. 4
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation Tools to support Pattern Driven Programming § Tools to support creation of an application using a particular pattern: 4 A dedicated editor to define the pattern parameters (editor for the DSM). 4 A code generator to generate the actual implementation from the implementation template using the pattern parameters. § Tools to support maintenance of an application created from a particular pattern: 4 The implementation derived from the pattern can’t fully fit the application requirements. Specific business rules must be added. 4 The user adds user specific code in the implementation to fulfill requirements. 4 An automated code reconciler can support the regeneration of a new implementation from the pattern parameters while preserving user specific code. 4 A code reconciler is needed to support maintenance at both levels: pattern parameters and code. § Tools to support authoring of new patterns: 4 Model editor to define the DSM. 4 Tool to produce the dedicated editor for the DSM. 4 Generation technology to define the transformation from DSM to code. 5
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation Benefits of using tools to support Pattern Driven Programming ? § Reliability 4 Code generation is supposed to use best practices for quality and efficiency. § Maintainability 4 Code is readable and documented. 4 The implementation and vocabulary are homogeneous. 4 Ask 10 developers to develop the same application. You may obtain 10 working applications, but written with 10 different algorithms or styles that make them hard to understand to another developer. Generation from a DSM produces variations over the same pattern of code. There will not be any developer creativity expressed in the generated code. § Predictability 4 Generated applications are variations of the same pattern. The main effort is to enhance it with business rules. It is thus easier to assess: § The cost of writing and testing a new application § The skills needed to write a new application 6
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation Programming using pattern generation Pattern parameters level (DSM) Generation with reconciliation Implementation level (EGL) Reusable artifacts : records, libraries, … Generated code + specific code Simplify the description of a recurrent problem of a particular application domain Provide a “state of the art” implementation and reconcile specific code with new generated code Supports insertion of business rules as EGL specific source code into the generated source code Maintenance is supported at both levels: pattern (DSM) and implementation (EGL). 7
IBM Software Group Batch programming pattern : What are batch treatments ? 1 2 3 4 5 Customer file* Customer Filter Program Filtered customer file* Customer file* 1 Customer file* 2 Customer Merge Program Customer file* V 0 Customer movements file* Customer Update Program Customer file* V 1 Errors report Customer file* Order file* Customer&Order Join Program Customer&Order file* Customer file* Order file* Customer Order Report Program Orders list Total ordered by customer report * A file can be either: a table in a RDBMS, a DL 1 node, an ordinary file (sequential/indexed, text/binary), a message queue, a memory array. • • Filter: extract data from a file an store the result in another file. Merge: merge two sorted files into a new sorted file. Update and Report: updates file content based on a list of movements, print error report. Join: join records coming from different input files, based on join criterias. Report: print reports based on content of input files. Control and Report: check input files content based on specific criterias and print a report. Sort: sort files based on sort criterias. … The EGL simple programming model allows programmers to integrate their business logic with complex middleware layers (J 2 EE, Web 2 technologies, CICS, IMS, VSAM…) without having to deal with specificity and complexity of each underlying layer. The EGL programmer can concentrate on the « business logic » itself. 8 © 2006 IBM Corporation
IBM Software Group Batch pattern in RBD Generated code (from batch pattern params) Batch pattern parameters Specific code (business logic) Quickview of specific code 9 © 2006 IBM Corporation
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation DEMO 10
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation QUESTIONS 11
EGL Simplify Innovation IBM Software Group | EGL Simplify Innovation MERCI Learn more at: § IBM Rational software § § § IBM Rational Software Delivery Platform Process and portfolio management Change and release management Quality management Architecture management § § § Rational trial downloads Leading Innovation Web site developer. Works Rational IBM Rational TV IBM Rational Business Partners © Copyright IBM Corporation 2008. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, the ondemand business logo, Rational, the Rational logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others. 12
- Slides: 12