IBM Software Group EGL Simplify Innovation EGL Open
IBM Software Group ® EGL Simplify Innovation EGL Open Strategy § Tim W Wilson § STSM – EGL Chief Architect EGL International Conference Zurich Oct 20 -21 2008 © 2008 IBM Corporation
EGLSimplify. Innovation IBMSoftware. Group | EGL Agenda § Motivation for EGL § Motivation for an Open EGL § What is “Open EGL” § Scenarios
EGLSimplify. Innovation IBMSoftware. Group | EGL Motivation for EGL - Productivity § Programming languages exist to make the expensive task of writing and maintaining software more productive § New programming languages arise when target environments become too complex 4 C for Web programming not good enough – PHP arises § Multi-tiered enterprise application environments are too complex 4 Leads to low productivity 4 High project failure rates
EGLSimplify. Innovation IBMSoftware. Group | EGL Motivation for EGL - Abstraction § Abstraction – key to productivity § Traditional 3 GLs are an abstraction of a single machine through language syntax 4 Compilers generate code (assembler) to one or more machine types § Traditional 4 GLs added language syntax for abstracting things like database IO § OO languages added Inheritance and Interface implementation to create Framework abstractions 4 Compiler does not change to incorporate new abstractions 4 Overshadowed 4 GL approach of language syntax § EGL brings back code generation as an addition tool for handling abstractions – without forcing syntax changes
EGLSimplify. Innovation IBMSoftware. Group | EGL Extensible Abstractions - Frameworks § Very powerful concept for creating abstractions § However they are tied to the technology they are implemented in 4 i. e. J 2 EE is tied to Java VM § Modern distributed applications often must cover: 4 Browser: Javascript/XML/JSON/etc 4 Application Server: J 2 EE/. NET/etc 4 Mainframe: CICS/IMS/COBOL/etc § Frameworks exist at each level but are all vastly different § Thus frameworks in a single technology cannot abstract all these areas
EGLSimplify. Innovation IBMSoftware. Group | EGL Extensible Abstractions - Metadata § Metadata allows concepts to be added without forcing specific implementations § Common semantics modeled, i. e. 4 CRUD operations on database 4 Remote Invocation 4 UI input validation § Same semantics can apply across runtimes and frameworks § Compiler/Generator maps semantic concepts to given runtime § Metadata supplies the specifics
EGLSimplify. Innovation IBMSoftware. Group | EGL Extensible Metadata – SQLRecord Example // A Record type definition mapped to a database table Record Order type SQLRecord { table. Names = [“ORDER”], key. Items=[“order. ID”] } Have you ever wondered what these actually are and where they come from? order. ID Order. ID { column. Name=“ORDERID” }; date. Order. Placed date { columname=“CREATDTE” }; total. Value money? ; end
EGLSimplify. Innovation IBMSoftware. Group | EGL Extensible Metadata - Annotation Types § All annotations are instances of an annotation type § An Annotation Type is a stereotyped Record definition Record Column. Name type Annotation {. . } value string; end … Data. Item SSN char(9){ column. Name=“DB_SSN”, … } end
EGLSimplify. Innovation IBMSoftware. Group | EGL Extensible Metadata - Stereotypes § Stereotypes are Annotation Types that have been annotated with the @Stereotype annotation Record SQLRecord type Annotation { targets = [ Element. Kind. Record ] @Stereotype{ member. Annotations = [Column, Is. Read. Only, …] } } table. Names string[][]; . . End
EGLSimplify. Innovation IBMSoftware. Group | EGL How is EGL different? § EGL is a meta language 4 Basic imperative language 4 Metadata definition facility 4 Extensible IO statements: ADD, GET, DELETE, etc § Metadata on operands drives appropriate mapping to runtime by generator § Generators transform basic language semantics + metadata semantics to various languages/runtimes 4 IF, ASSIGN, etc. all mapped to appropriate target language 4 Stereotypes like JSFHandler, RUIHandler drive code generator to map target code to particular frameworks 4 Stereotypes like SQLRecord, VSAMRecord drive generation of IO operations to particular IO technologies § Allows EGL to create abstractions across all tiers of an enterprise application § Takes advantage of standard runtime infrastructures and frameworks instead of adding new ones 4 Simpler and less risky than waiting for standards and replacing working systems with new “standard” runtime infrastructure
EGLSimplify. Innovation IBMSoftware. Group | EGL Transformation Process RBD IBM owned EGL Source (. egl) Transform Process IR Compiler IR Model (. ir) EGL 2 Java Code EGL 2 CBLi COBOL Code EGL 2 CBLcics COBOL Code EGL 2 CBLims COBOL Code EGL 2 CBLbat COBOL Code
EGLSimplify. Innovation IBMSoftware. Group | EGL Agenda § Motivation for EGL § Motivation for an Open EGL § What is “Open EGL” § Scenarios
EGLSimplify. Innovation IBMSoftware. Group | EGL Common Misconceptions of EGL § “EGL is just another 4 GL” § “Real programmers don’t do code generation” § “EGL is proprietary” § History does gives examples of why each of these can be a problem § EGL is formulated so as to not repeat these problems
EGLSimplify. Innovation IBMSoftware. Group | EGL - not your father’s 4 GL § What is a 4 GL? 4 Old term used to describe languages that evolved after 3 GL 4 Same language syntax approach to abstraction as 3 GL § Traditional 4 GL disadvantages 4 Proprietary § dependence on single vendor § Added value created only by vendor 4 OO languages provide similar productivity and are freely extensible § However – frameworks are just as proprietary as language § Frameworks can be overly complex themselves § Open EGL is meant to address these issues 4 Proprietary – multiple vendor implementations allowed 4 Extensible abstractions that go beyond Framework § Extensible metadata instead of closed syntax to add new abstractions § Compiler code generation as added approach map abstractions to runtime § Compiler maps to existing standard frameworks and runtimes
EGLSimplify. Innovation IBMSoftware. Group | EGL – not your father’s code generator § All programming languages are code generators 4 Assembler generates to machine or byte code 4 3 GLs generate to assembler § Each level of abstraction that is generated introduces some inefficiency compared to hand written code at the lower level 4 Mitigated if jump between levels is not too large 4 Productivity benefits usually outweigh the slight inefficiencies § Code generation from high level models can be inefficient 4 CASE tools often produced inefficient code – this is the bad rap on code generators 4 Not enough detail in high level models to produce optimal code § EGL language semantics provide necessary detail to provide efficient code generation 4 Just as with 3 GL assembler code generation
EGLSimplify. Innovation IBMSoftware. Group | EGL Proprietary EGL § EGL system is closed today 4 No public mechanism to add new meta data types 4 No public mechanism to extend code generation to use new metadata types § Vendor lock-in 4 Trusting IBM or not is not the main problem 4 IBM being the sole point where value is added is too slow § Enablement of community 4 Community of users is not enough 4 Must enable 3 rd parties to add value 4 Value is not just new functionality but diversity of implementation to common function
EGLSimplify. Innovation IBMSoftware. Group | EGL Enablement Scenarios § Additional EGL Tools 4 Like Java tools enabled via Eclipse JDT 4 This is really “Open RBD” § Additional annotations used to drive tools 4 Tags for linking code changes to Problem Reports 4 Domain specific tags for Google style searches § Additional metadata to drive code generation 4 New database access types – e. g. LDAP database 4 New programming paradigms – Event programming § Concepts: Process, State, Transition, etc defined as metadata types § Generator maps application to the various event runtimes: WAS, CICS, etc § Generator extension 4 New metadata exploited through plug-ins to an existing generator § Completely new generators 4 e. g. C code generator targeting Unix environments
EGLSimplify. Innovation IBMSoftware. Group | EGL Event Programming Paradigm Example § Use Extended Finite State Machine (EFSM) as basic concept 4 Can work well for modeling asynchronous business processes § The format for representing these elements is always a combination of: 4 Type declaration with Stereotype 4 Field declaration with annotations 4 Function declarations § Similar to UML which is mostly variations on UML Class 4 “Lightweight” extension using on UML Stereotypes and Tags § Different from UML in that you get to explicitly write code within the functions
EGLSimplify. Innovation IBMSoftware. Group | EGL Example of System Design Language (SDL)
EGLSimplify. Innovation IBMSoftware. Group | EGL Metadata types that extend EGL EFSM Concepts
EGLSimplify. Innovation IBMSoftware. Group | EGL SDL Example modeled in EGL
EGLSimplify. Innovation IBMSoftware. Group | EGL Open EGL: Motivation Summary § Code generation is a necessary technique for dealing with complexity 4 Frameworks are tied to particular technologies § Pluggable code generators are necessary for widespread adoption of this technique 4 Anyone could write a framework without changing the language 4 Should be likewise for extending code generators § A closed system as EGL is today inhibits general adoption of this technique
EGLSimplify. Innovation IBMSoftware. Group | EGL Agenda § Motivation for EGL § Motivation for an Open EGL § What is “Open EGL” § Scenarios
EGLSimplify. Innovation IBMSoftware. Group | EGL “Open” has various dimensions § Specifications: 4 Allows creation of independent implementations § Framework API: 4 Allows access to a given implementation without surfacing the internals of that implementation § Open source 4 Complete access to source of a given implementation § Open EGL will be some combination of these – e. g. 4 Specification of EGL model definition and semantics 4 Public API to current internal IR model 4 Open Source implementation of a code generator
EGLSimplify. Innovation IBMSoftware. Group | EGL Use Cases for Open EGL § Two initial areas of exploitation 4 Front end tooling § Compile, edit, debug § Management of code and development process 4 Back end tooling § Complete implementations of a code generator § Extension of existing generators § Common element - EGL Model § EGL Model first element to be opened
EGLSimplify. Innovation IBMSoftware. Group | EGL Open EGL Model Approaches § Option 1: Open existing EGL implementation 4 Framework API to EGL IR model 4 Open source of at least one existing code generator § Option 2: Transform internal IR model into existing open source framework 4 Eclipse Modeling Framework (EMF) 4 Eclipse Generative Modeling Tools (GMT) § Some of both are probably necessary 4 IR model API made public 4 Code generator framework based on GMT tools § Fold into existing community § Can lead to EGL being leveraged in Model Driven Development scenarios
EGLSimplify. Innovation IBMSoftware. Group | EGL Option 1: Open current EGL model & generator § Public API to IR model useful in many front end tooling scenarios 4 i. e. Code Analysis tools § Open sourcing an existing generator 4 Pro: Community involved in care and feeding of § Code generator § Associated runtime framework 4 Con: Current generators not built to be plug-in extensible § Independent generator extensions not possible – i. e. LDAP access cannot be added without updating the existing implementation § Limits viability as everyone has to agree on the extensions
EGLSimplify. Innovation IBMSoftware. Group | EGL RBD IBM owned Spec/API Open Source Cloned Open EGL: Option 1 EGL Source (. egl) Transform Process IR Compiler IR Model (. ir) EGL 2 Java Code EGL 2 CBLi COBOL Code EGL 2 CBLcics COBOL Code EGL 2 CBLims COBOL Code EGL 2 CBLbat COBOL Code EGL 2 XYZ
EGLSimplify. Innovation IBMSoftware. Group | EGL Option 2: Transform model to open framework § Leverage Eclipse Generative Modeling Tools (GMT) 4 EMF (Eclipse Modeling Framework) § EGL modeled itself as an Ecore model – like UML but much simpler 4 EGL code transformed into instances of the model § Current EGL IRs transformed into Ecore model using EGL 2 Ecore utility 4 Model to Text transformation languages § Eclipse implementations of full IDE – Projects, editors, debugger § Build extensible generation framework based on these existing open source tools 4 Better support for extensible generator scenarios 4 Existing community
EGLSimplify. Innovation IBMSoftware. Group | EGL Open EGL: Option 2 RBD IBM owned Spec/API Open Source RBD Plug-in EGL Source (. egl) Transform Process IR Compiler IR Model (. ir) EGL 2 Ecore EGL 2 Java Code EGL 2 CBLi COBOL Code EGL 2 CBLcics COBOL Code EGL 2 CBLims COBOL Code EGL 2 CBLbat COBOL Code Ecore 2 XYZ Code
EGLSimplify. Innovation IBMSoftware. Group | EGL What is Eclipse Modeling Framework (EMF) § Standard infrastructure for defining and manipulating models in Eclipse tools § Example models currently used in various products: 4 Database tools § SQL objects: Tables, SQL statements, etc 4 UML tools § UML 2 model defined with EMF 4 Web Services Tools § WSDL, XMLSchema, etc. all manipulated by tools on models defined through EMF § Large existing community that knows how to work with EMF
EGLSimplify. Innovation IBMSoftware. Group | EGL EMF Meta Model - Ecore § Ecore is a model used to create other models – it is a “meta model” § Ecore itself is an instance of the Ecore model 4 i. e. all Ecore classes are instances of EClass
EGLSimplify. Innovation IBMSoftware. Group | EGL Ecore defines itself EClass instances EAnnotation instance EOperation instance EAttribute instances EReference instances
EGLSimplify. Innovation IBMSoftware. Group | EGL Ecore. Object – EGL bridge to Ecore § External. Type definitions that represent Ecore types § Used to: 4 Map to existing Ecore types 4 Create new Ecore types
EGLSimplify. Innovation IBMSoftware. Group | EGL Structure as Ecore Extensions § Basic EGL meta model defined as extensions to Ecore model § EGL is already close to Ecore in terms of its structure § EGL adds model for: 4 Statements 4 Expressions 4 Metadata types
EGLSimplify. Innovation IBMSoftware. Group | EGL 2 Ecore conversion utility § EGL 2 Ecore utility converts EGL IRs into Ecore models § All EGL definitions represent: 4 Ecore classes: EAttribute, EOperation, etc 4 EGL model definitions: Function, Statement, Expression, etc. 4 Instances of EGL model: Customer Record is an instance of EGLRecord § EGL Package correlates to an Ecore EPackage § All EGL parts will exist in an EPackage § All parts in an EGL package go into a single file containing a single EPackage instance
EGLSimplify. Innovation IBMSoftware. Group | EGL Core model • Ecore model that models core set of EGL language elements • Circled elements are classes that model of some EGL statements • User written programs create instances of this model
EGLSimplify. Innovation IBMSoftware. Group | EGL Core is not all of EGL § Core is a subset of EGL as it exists today 4 Defines basic elements of EGL model 4 Extension mechanism § EGL today = Core + Extensions § Extension mechanism focused in three areas: 4 Part types – e. g. EGLProgram 4 Native types – e. g. NUMC 4 Metadata types – e. g. SQLRecord § Example elements not in Core 4 Part types: Program, Table, Service 4 Native types: BIN, NUM, DECIMAL, etc 4 Stereotypes: SQLRecord, VSAMRecord, etc
EGLSimplify. Innovation IBMSoftware. Group | EGL Example EGL Program
EGLSimplify. Innovation IBMSoftware. Group | EGL Eclipse Generative Modeling Tools (GMT) § Once we have a model of EGL code we need standard technology to transform it into executable form § There are typically three phases of this process: 4 Validate the model against some set of constraints – target platform is an example 4 Add/Change/Optimize the model before conversion to executable 4 Transform model into the text of a lower level language § There is also the need for some kind of workflow to manage the phases § One set of tools in GMT provides all of this in a set of programming languages devoted to the process of model transformation 4 Check – check the model 4 Xtend – manipulate the model 4 Xpand – transform the model into text 4 Workflow – Configure a workflow of transformation components
EGLSimplify. Innovation IBMSoftware. Group | EGL Xpand: Model to Text transformation language § Direct access to Ecore § Import EGL meta-model § Polymorphic templates based on meta model types § Aspect Oriented techniques for overriding existing generators § Full Eclipse IDE: 4 Projects, Editors, Debugging
EGLSimplify. Innovation IBMSoftware. Group | EGL Open Generation Component Summary § Public API to EGL IR model § Open Source implementation of EGL 2 Ecore utility § EGL Core defined as an Ecore Model § Specification of execution semantics for Core model § Compliance test suite § Open Source generator implementation based on Core model 4 Based on Eclipse GMT technologies 4 Supports generator extensions § Override/Add/Remove elements of base generator without modifying it
EGLSimplify. Innovation IBMSoftware. Group | EGL Relationship to existing RBD § An Extension is a set of EGL type definitions that extend the Core 4 Metadata types, e. g. SQLRecord, JSFHandler § A Generator is a plug-in that can transform EGL model into runtime code 4 Generators support transformations from: Core model + Extensions § Each generator or family of generators have their own configuration facilities 4 Open generation framework does not define how this is done § Current EGL generators are one such family 4 Configured through EGL Build Descriptor § An implementation of an open generator is an instance of a different family § Generator extension scenarios based off generators built on open framework 4 Can move functionality of current EGL generators over if appropriate 4 Not all generators need be open § All generator families coexist within the same IDE 4 Each generator family pluggable into RBD
EGLSimplify. Innovation IBMSoftware. Group | EGL Scenarios § 3 rd party builds complete generator – does not have to include everything in EGL 4. Net implementation 4 J 2 EE focused implementation § No host influenced elements: structured records, data tables, data types § REST Service focused § Sit on Hibernate, JPA (Java Persistence API), or EJB 3 4 C implementation for Services 4 RPG implementation for Services
EGLSimplify. Innovation IBMSoftware. Group | EGL Scenarios § Extension of existing generator 4 Generating to different frameworks § Persistence - Hibernate, JPA, EJB 3 § UI – Struts, Spring, etc 4 Adding new database targets: i. e. LDAP 4 New programming paradigms: i. e. Event programming § Analysis tools working against model § Direct manipulation of UML/Ecore models 4 model operations implemented directly with EGL code
EGLSimplify. Innovation IBMSoftware. Group | EGL Future: Enterprise Model Driven Development § Integration of EGL and Ecore allows: 4 MDD tools and EGL to work together 4 Leverages work of Eclipse GMT project 4 Existing community that understands this kind of technology § MDD in the enterprise fails because: 4 Chasm between models and programming too wide 4 Will only work when all programming done at model level § The model is the code § MDD + EGL = Enterprise MDD 4 Allows all coding and debugging at the model level 4 EGL handles cross platform issues
EGLSimplify. Innovation IBMSoftware. Group | EGL Summary § EGL is a logical progression of programming language technology § EGL complements existing standard technologies by providing an open framework for targeting those technologies § Open EGL is necessary to create community § Initially Open EGL means: 4 Extensible metadata defined in EGL 4 Open meta model and generator framework 4 At least one implementation of an extensible generator § Implementation based on Eclipse GMT technology § Eclipse GMT community is a natural consumer of Open EGL § The EGL approach to abstraction is a natural fit into the MDD approach
EGLSimplify. Innovation IBMSoftware. Group | EGL
EGLSimplify. Innovation IBMSoftware. Group | EGL © Copyright IBM Corporation 2007. 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 on-demand 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.
- Slides: 49