Anda di halaman 1dari 12

A Model Based Cross-Platform Code Generation Tool

ROGERIO ARAUJO COSTA University of Minho

The problem of current software development stays on solutions portability for the rising number of platforms. Build abstract models is one ecient way to achieve this. The Model-Driven Software Engineering (MDSE) is one development methodology where models are the key for all project lifecycle, from requisites capture, through the modeling and developing stage, and still on testing. The goal of this article is to organize all the information about MDSE related word and state-of-the-art in order to support the development of a stand-alone tool able to prototype models to several platforms and to generate source code. The tool should allow exible manipulation of models, especially on business rules denition. The innovation aspect of this tool will be the exibility on creating complex business rules and well-dened usability proprieties, such as automatic or programmed execution, access control, and the release of personalized exceptions. The source code generated by the tool should reect all the modeled aspects. Categories and Subject Descriptors: D.2.2 [Software Engineering]: Design Tools and Techniques; D.2.3 [Software Engineering]: Coding Tools and Techniques General Terms: Documentation, Algorithms Additional Key Words and Phrases: Model-Driven Software Engineering, Model Transformation, Cross-Platform Generation

1.

INTRODUCTION

The problem of current software development is the solutions portability for the rising number of platforms. Build abstract models is one ecient way to achieve this. Model-Driven Software Engineering is one development methodology that enables Platform Independent Models (PIM) creation, which can be derived on Platform Specic Models (PSM) for one or more platforms. Model-Driven Architecture (MDA), proposed by Object Management Group (OMG) in 2001, is one of the Model-Driven Development (MDD) techniques implemented by the most complex tools. To achieve the expected goal, it must be made a study in order to understand how a meta-model can be eciently used to specify PIM models. Moreover, it has also become interesting to study the process of models transformation to produce PSM structures corresponding to the original PIM. To make it possible, it will be considered some accomplished attempts to dene models transformation struts, such as direct model transformation or graph transformation approach. The purpose of this paper is to acquire a solid theoretical background in MDSE subject, specically on model based transformation structures and automatic source code generation. This study should enable a stand-alone tool development that will support PIM/PSM models with which we can prototype to several platforms and generate source code. The tool should allow exible manipulation of models, specially on the business rules denition. The innovation aspect of this tool will be the exibility on creating complex business rules and well-dened usability proprieties, such as automatic or programmed execution, access control, and the release of personalized exceptions. The source code generated by the tool should reect all the modeled aspects. Therefore, this study aims to understand the advantages of MDSE and how meta-models should be parametrized to produce source code to well-dened target technologies such as Java or Android. This document is structured as follow: in section 2 it is exposed the need in create a tool for generating cross-platform code; section 3 presents the MDSE related work; in section 4 it is presented the state-of-the-art, more accurately, the prototypes and other solutions that have been developed for automatic cross-platform source code generation; in section 5 it is presented the tool
Authors address: pg17462@alunos.uminho.pt Departamento de Informtica, Universidade do Minho Master PreThesis Reports 2012
DI-RPD 2012, Pages 112.

Rogrio Arajo Costa e u

draft and its validition; section 6 concludes the paper with some value added answers that will help the development of a Model Based Cross-Platform Code Generation Tool. 2. MOTIVATION

A software product visibility is due mostly to the number of platforms on which it operates. Writing portable code for multiple platforms is the more usual solution to achieve this result, as happens on writing browser-based/Java applications. Although it is not a perfect solution. Browser-based applications are resource limited, and not all platforms are able to run Java technology. With new platforms emergence, such as Android, becomes as requirement for a software package this be written in various tecnologies. This concept is equivalent to the implementation of several PSMs for a given PIM, representing thus a fairly cost plus for writing each of the applications in various languages, in the maintenance of various congurations, and even have multiple development teams qualied in various platforms. The development of a tool able to interpret a conceptual design of a product and generate the implementation for multiple platforms, since the eort to generate for N platforms is equal to generate for one, is an attractive, if not required tool for any project manager. More specially if the aim is to promote the introduction of a new product in the market. Next, there are some of the strongest points that a full-feature tool can provide: (1) The time and eort to develop N implementations (N platforms and/or dierent settings) must get closer to develop a single implementation. (2) Testing the same solution with dierent settings allow us to nd faults, or some other kind of problem, which can only be visible in some congurations. This feature is prot that derives directly from the previous functionality. (3) With the emergence of new platforms and/or technologies, there is only the cost to upgrade the tool to generate code for that same novelty. Any solution that has been generated before the last version, can also be generated for the new features that the tool acquired later. Thus, the expandability of an application that has been built in the tool is granted along the time. 3. RELATED WORK

Before making any progress on dening blueprints for the proposed tool, it will be thoroughly evaluated all prototypes and tools of model based code generation. Because methodologies and techniques for software development started to appear since the rst programming language, there is a lot of work that can be used. This section provides an introduction to MDSE paradigm and a MDA approach. Later, we will rely about models transformation denition and standards. It allows us to analyze more accurately the tools mentioned on the next section. The goal is to collect a full catalog of ideas, concepts and successfully implemented guidelines, to empower the proposed tool. 3.1 MDSE

Model-Driven Software Engineering is a promising paradigm for complex software development. Models are the key for all project lifecycle, from requirements capture, through the modeling and developing stage, and still on testing. In fact, this approach is based on a set of transformations between successive models, from the most abstract to the most specic one, ending on a ready to run source code. Model-Driven Architecture, proposed in 2001 by OMG group, is the MDSE most promising approach. It is a four stage process: Computational Independent Model (CIM), Platform Independent Model , Platform Specic Model, and source code. The transition between each stage is guaranteed by a model transformation set. With a good set of transformations it is possible to achieve automatic models transformation and automatic code generation. This is exactly what we expect from a model based cross-platform code generation tool. So, the supporting model structures and the set of models transformation are the blueprints of any model based tool. What best denes the most useful blueprints is timesaving, and this makes them popular tools.
DI-RPD 2012.

A Model Based Cross-Platform Code Generation Tool

Next section is dedicated to Model-Driven Architecture, a practical realization of MDSE concepts. 3.2 MDA

MDA [Miller and Mukerji 2003][marie Favre 2004] is intended to support ever-changing business environments, minimizing the software development time and project costs. MDA allow separating the system functionality from implementation details, keeping consistent glue between both systems elements. It is a model-centric approach, where models are used for requirements capture, software development, testing and maintenance. Software development based on MDA starts on high-level models in problem denition. Gradually and automatically, image 1, the models are transformed into more specic models (low-level) until source code is reached. The transition between models can be achieved by a set of well-dened rules (the models glue), that can be of many types, depending on the pretended result. There are four available types of models to provide dierent system architecture levels of abstraction and independence: CIM, PIM, PSM, and source code. The CIM model reects the business context and the requirements of a problem. In MDA lifecycle, the CIM is rened to PIM that species the behavior of the software components oered by the business logic layer. Later, the PSM for a specic platform (such as Linux, Windows or Mac OS) is extracted from the PIM model. The PSM adds to a model implementation congurations of the target platform. A PIM model can be rened for many PSM models. Additionally, the source code is generated from the PSM model.

Fig. 1.

MDA software development life cycle [Ribeiro 2008].

A MDA tool can functionally translate a model from one language to other languages. For example, a PIM model written in language x, could be translated to a PSM model written in language y, using a tool that knows the f (x) = y function. So, it is possible to develop an abstract software solution, which later can be translated to a real implementations, using a MDA tool and a set of f (x) = y functions. Then, there is no need to the developers to worry about how to transform a model. In Gholami and Ramsin [2010] is described a concise analysis about strengths and weaknesses of MDA [Kleppe et al. 2003] [Mellor et al. 2004] [Frankel 2003]. MDA increases the productivity, because it permits that a developer mainly focus on abstract modeling (CIM and PIM), leaving code tasks for the MDA tools. A PIM can be derived in one or more PSM, and then most of the software solutions can be ported for more than one platform, enhancing the cross-platform interoperability. Also, an abstract model allows us to reuse any software solution for more than one purpose, saving time on development because it uses already tested software artifacts.
DI-RPD 2012.

Rogrio Arajo Costa e u

Fig. 2.

Forward Transformations

Fig. 3.

Round Trip

There are some lacks identied in MDA, essentially related to model inconsistency and to tools dependency. Model inconsistency increases how long the software solution becomes more complex, and it is used to more and more heterogeneous processes to extract low-level models. When it is pretended dierent PSMs from the same PIM, the model inconsistency risk increases. Since low-level models and implementation code are generated automatically, this approach requires the right MDA tool.The tool needs to be qualied on models transformation, and to be full-feature for code generation. The developer needs to know every action taken by the tool, but shouldnt interact in modesl transformation process. If it is needed, the developer should be skeptical about the models completeness, consistency, and about MDA tool capabilities. MDA is supported by the MOF [OMG 2006], XMI [Xiao-mei et al. 2009], OCL [Clark and Warmer 2002], CWM [Group 2003] and SPEM [OMG 2006] OMG standards. 3.3 Forward Transformations and RoundTrip

There are mainly two Model-Driven Development [Mellor et al. 2003] mechanisms: forward transformations (image 2), and round tripping transformations (image 3). In the forward transformations type, the process starts in the most abstract model (PIM), continues to the specic models (PSM), and recursively ends on source code/text les. This mechanism is usually used when a solution is new, and so, there isnt yet an implemented and proven solution to be reused. If there is a new concept to be implemented on the problem domain, rstly this should be modeled on PIM and recursively, derivated to the specic models and implementation artifacts. If the idea is to reuse some implemented business model, then it is necessary to use some round trip mechanism. This mechanism applies reverse engineering of transformations on implemented artifacts and can extract Platform Specic Models and, on a nal stage, the PIM abstract model. New features should be added to the extracted model and, on forward transformations fashion, the new implementation artifacts are generated. This technique is more complex than the rst one, because the transformations that derived the source artifact are not always reversible. Despite this fact, it is not a useless process; there are some good attending results that can reduce the eort by 40%-50% in a 6 month development project [Akkiraju et al. 2009]. 3.4 Transformation Approaches

There are mostly two types of models transformation [Czarnecki and Helsen 2003]: Model-2-Code and Model-2-Model. The simplest approach is Model-2-Code and happens when the abstract model is directly translated to source code. In the second case, the transformation runs from model to model, becoming more detailed according to the target: a source code; a more abstract model; a more specic model; or even a dierent model at same abstraction level. In this document, we will focus on abstract to implementation models transformation. There is one more type of models transformation, Code-2-Model. As we see in image 3, there is the possibility to revert Model-2-Code transformations, extracting implementation models from source code. This operation is not perfect, because it is not possible to extract the original abstract model from source code, but still, is possible to achieve close enough results. This issue will not
DI-RPD 2012.

A Model Based Cross-Platform Code Generation Tool

be carried out further in this document, because it is not useful to the document objectives. And, this is a challenging issue, and requires more and more work around. See Couto [2011] for more details. Next, it is considered the sub categorization for Model-2-Code and Model-2-Model transformation types. 3.4.1 Model-2-Code. . In this subsection is presented the visitor-based transformations and later the template-based transformations. Both approaches translates directly from models to source code, exactly as a code compiler do. Visitor-Based Approaches. This is the simplest mechanism to generate source code from models. Its a mechanism that visits the internal representation of a model and for each type of occurrence the right artifact of source code is produced. Using Java taxonomy, this approach is similar to run out a collection by its iterator interface, outputting each result. Template-Based Approaches. Actually, most tools support this type of model representation and its direct source code generation. To generate code, a tool scans the model and mixes each element of internal representation with the corresponding template. A template is a structure, usually text les, that holds static source code and meta-code to be replaced on the transformation process. The concept of this technique is to separate the mechanisms of code generation from the structure of the target source code. This allows each component to evolve separately. The templates can also be dened only with examples, without know nothing about the source platform. FreeMarker is a Java library, free and driven to the developer that produces source code by predened templates. 3.4.2 Model-2-Model. . In this subsection are categorized six Model-2-Model transformations types. In Model-2-Model, transformations occurs from model to model, specifying the target platform model more and more, until source code is generated. In fact, Model-2-Code transformations are the nal step of a Model-2-Model transformation sequence. Direct-Manipulation Approaches. Usually supported by object-framework tools, this approach consists of an internal model representation and an Application Programming Interface (API) to manipulate it. It is possible that the framework provides some minimal abstract structure transformations behavior. So, the developer has to parameterize and to implement all the transformations rules, such as the scheduling priority between rules. Java Metadata Interface (JMI) [Sun Microsystems 2002] is one example of this approach. Relational Approaches. Its concept consists in controlling the process of models transformation, by a set of well-dened rules. It seems very similar to Prologs inference engine. Easily, the logic programming languages could use it, by dening the Predicate to describe relations, and take-o advantage of unication based-matching, search and backtracking operations to comply a full transformation process. Mercury, FMercury, F-Logic, and QVT [Gardner et al. 2003] are examples. Graph-Transformation-Based Approaches. Using graphs theory, this approach supports the models with a structured graph denition. It is a full-featured approach, but it is very complex to support, more specically on transformations rules scheduling. The idea is very simple. The graph has two main branches, the left branch LB and the right RB, in which the left describes the structure of the original model and on the right one the target model. When the LB matches with input model component, it is switched in place by RB. VIATRA [Csertan et al. 2002], ATOM [ATOM ], GreAT [Agrawal et al. 2003], UMLX [Willink 2003], and BOTL are the most known approaches that supports this type of transformations. Structure-Driven Approaches. Similar to Direct-Manipulation, this approach also requires manual denition of every transformation process. It is a biphasic task: rst it requires building the
DI-RPD 2012.

Rogrio Arajo Costa e u

hierarchical structure of a target model and then, on a second phase, attributes and references might be parameterized on target model. The framework is responsible for managing the process of scheduling and transformation priorities. Two well-known supporting tools for this approach are Optimal J and IOTP (base on QVT standard). Hybrid Approaches. There are a lot of initiatives that combine imperative and declarative concepts to dene transformations. The rules are expressed and dened in a declarative way and are hardcode detailed in an imperative fashion. It isnt required to detail imperatively all rules, in fact, this only should happen in specic cases. The languages Transformation Rule Language (TRL) [Alcatel et al. 2003] and Atlas Transformation Language (ATL) [Bezivin et al. 2003] follow this concept. ATL allows being setup to work full imperative, full declarative or the combination of both. XDE [IBM ], no longer supported by IBM, is another initiative that ts in this category. Now, XDE is replaced by a full suite of modeling and developing tools, the Rational Rose product family. Non-Categorized Approaches: XSLT [Consortium 2007] and CWM [Group 2003]. XSLT is a generic models transformation approach and consists in the serialization of models in XML, using for that XML Metadata Interchange, or XMI. This is a heavy and complex approach and becomes unmanageable as the model grows, because of the XML verbosity. Still, it is XML and so the interoperability is guaranteed. This allows the easy combination of transformation rules and, for a tool, XML its easy to manage. This approach is used by the open-source tool UML-QVT. CWM, or Common Warehouse Metamodel, combines UML, MOF and XMI standards, to dene the linkage between the source model and the target model without specifying the target model generation mechanisms. Using Java concepts is a kind of class interface. It is another generic approach to dene models transformation, and provides a four layered architecture for general purpose of metadata manipulation. Some tools, as we will see in the next section, use this mechanism to take over the models transformation. 3.5 Summary

In this section we relied about MDSE paradigm and for what stands for. Was presented the MDA strategy, proposed in 2001 by OMG group, and how eciently it could support a Model Based Code Generation Tool. More than that, it was exposed models transformation categorization, and for each one, the advantages and the disadvantages of using them to support a tool. This section allowed us to analyze more precisely the model based tools considered in the next section. 4. STATE-OF-THE-ART

In this section it will be analyzed the current cross-platform code generation prototypes and tools. We will give special attention to scientic material because this is continually evaluated by the community, exposing all model-driven concerns and discussing about what should be improved. MDSE isnt a recent topic and so, there are already a lot of scientic material and tools applying the topic concepts. Java and Android are highly used technologies [TIOBE 2012][Kapetanakis 2011], and we will take advantage of studying the topics concerning them rst. Both are free, share the same developing language, and enable us to cover mobile, desktop, and web applications. Moreover, MDA tools and MDA architecture are correlated with Object-Oriented (OO) paradigm, and recursively Java language. Java also is easily adoptee because it is cross-platform between any architecture that runs Java Virtual Machine (JVM), and it allows building very powerful web applications. Android applications are easy to make available on Android Market [Finn 2011] and are supported by a huge number of developers [Schuermans 2011]. So, it is expectable that the interest in this kind of the tool becomes likely by Android developers. Next, there is an overview of ve dierent cross-platform software development tools. Each next subsection corresponds to a tool, where is presented an overview about it, and summarily the key points and the drawbacks.
DI-RPD 2012.

A Model Based Cross-Platform Code Generation Tool

4.1

OutSystems Platform

More than a full-feature model based tool, OutSystems Platform [OutSystems 2011] is a huge set of tools for development, integration, and maintenance of web software. The development part is mainly codeless, optimized for an intuitive drag-and-drop modeling process, and allow generation of cross-platform code for standard .Net and Java languages. The platform brings a set of tools and wizards that allow 3rd party systems integration. There are a lot of features targeted to track the development process, such as the version control, and to track and support the running deployed solutions. For the analysis propose, we will only consider the development part. Although there is a lot of technical info about the platform, it is very dicult to analyze the internal platform structure. Applying the section two concepts, with some tool experiments, we classify it for Model-2-Model type and forward transformations mode. More than that, it requires a higher proximity level next to the tool developer. The modeling environment is based in drag-and-drop features and it seems independent from the platform. It provides the necessary features to model business rules, user dened exceptions, user roles, database schemas and What You See Is What You Get (WYSIWIG) interfaces. The catalog of model fragments, saves a lot of modeling eort and applies the concept of reuse, one of the best practices of software engineering. A generated solution can be ported for .Net(C# + ASP) and Java (Java + JSP) platform running over Oracle Data Base systems, or Microsoft SQL Server. Key points. The rst remarkable feature is the simplicity and high quality rendered interface. In fact, the high quality drag-and-drop interface helps a lot the codeless task and, so, the developer is more concerned about the modeled solution. The catalog with solutions fragments saves a lot of developing time, and implementation problems. Drawbacks. Although the hosting on their own servers is a good market solution, it takes o the control over the source code, unlike what happens in academic environment. The process of dening business rules isnt so much exile. Because it is a closed software product, the generated solutions portability is dependable from the OutSystems. Competitors. Force.com, Windows Azure, Heroku and Google App Engine. 4.2 extMDA

Proposed and developed by Kun Ma and Bo Yang, extMDA [Ma and Yang 2010] can generate deployable J2EE applications from UML Models. As we see, this is a Model-2-Model hybrid approach and it is designed for forward transformations process. The idea is to model a system in any UML tool, dening the entities by a class diagram and business rules by an activity diagram. After, the interfaces, entities, POJO objects, JPA denitions, and data base schema, are generated by a full sequence of models transformation. The developer only needs to worry about the UML diagrams. The tool interprets the UML model and generates the PIM model. Automatically adds some trivial business rules (such as entity CRUD rules) beyond the ones dened by the user. After, using relational algebra theory, the PIM is translated to PSM, and it is composed by a CWM table model, JAVA POJO objects, and the user interface denition. On nal step, the PSM is derived in J2EE source code and text les. To do that, is used the FreeMarker library, some developer custom JAVA classes, and a full set of templates. extMDA comes with a good set of 3rd party development kits, such as JSF, Spring, Struts, Hibernate, iBATIS and Axis. This includes a tool kit to customize and create new toolkits for the tool. Key points. Adopts standard UML and requires low-level of UML knowledge. It has the capability of 3rd party development kits integration. Drawbacks. The tool generates code for one specic platform. The interfaces cant be eciently modeled. It lacks of modeling features, such as, personalized exceptions, integration of external APIs and denition of user roles. Competitors. Andro MDA, Optimal J, openMDX, UMT-QVT, FUJABA and MDE.
DI-RPD 2012.

Rogrio Arajo Costa e u

Fig. 4.

l OdinTools Model Hierarchy [Meads and Warren 2011]

4.3

OdinTools

Odin [Meads and Warren 2011] is a middleware to developing mobile services for iOS and Android platforms. This provides an easy way to develop complex mobile services, without concerning about physical specications from the mobile device and hardware components, such as, GPS receiver or Bluetooth hardware. Odin framework is the upgraded version of Odin middleware which allows cross-platform portability. Both, Odin middleware and Odin framework are supported by a Model-Driven Architecture. In fact, Odin framework is the top layer software of Odin middleware. This prototype was been implemented using Marama tool set [Meads and Warren 2011] Eclipse plug-in. Marama supports multi-view and multi-user diagram modeling features, exposing a meta-model structure across end-user accessible tools. Odin is a Model-2-Model and forward transformations tool as it is visible on 4. The Service Model was built using the plugin Marama that supports all user modulation concerts, in ServiceOriented Architecture (SOA) fashion. This model is translated in mobile business logic, supported by Odin framework. OM layer is needed to link the developer model with Odin middleware. The nal two layers are standard in any MDA. In this case the PIM layer supports all middleware denitions for platform portability and the PSM translate them for the chosen platforms. Key points. The prototype is a plugin for a powerful IDE, Eclipse, and supports full platform modeling independence. It also provides some common domain solutions to be used and customized. Drag-and-Drop modeling features are also attractive and make the developer task highly codeless. For specic situations, the developer can make customized code in SQL-like binding syntax. The mobile services oered by the tool and supported by Odin middleware, make this prototype ground-breaking in SOA area. Drawbacks. Odin Tool is a recent prototype and doesnt support user interface modelation. So, it needs to be done by hand in a XML. The tool was only developed to generate code for Android platforms and so, it isnt a fully cross-platform code generation tool. Competitors. Titanium Developer, Open-Plug ELIPS, XMLVM and Unimod. 4.4 IBM Rational Software Architect

Rational Software Architect (RSA) is a UML modeling environment designed for developing C++ and J2EE applications, and web services. Built over Eclipse framework, this tool is headed for model-driven development and code analysis, allowing both types of models transformation. This is a Model-2-Code tool and, in a forward transformations fashion, it allows generation of C++, C#, Java, EBJ, WSDL, XSD, CORBA IDL and SQL logical database schemas from UML models. The inverse operation permits extracting UML models from Java, C++ and .Net implementation artifacts/source code.
DI-RPD 2012.

A Model Based Cross-Platform Code Generation Tool

Beyond these technical features, the tool is compatible with other IBM products, such as Rational Application Developer (RAD), and oers multi-user development, controlling each concurrently developer task. The modeling environment is almost codeless, supports customizable UML 2.2, oers design tools and a full set of brand new IDE features, such as search engines, wizards to save time on consuming tasks, plugins, code generation pattern driven tools and automatic code correction. RSA was design to be a very productive tool, integrating a lot of IBM lifecycle tools, such as InfoSphere Data Architect, Rational Team Concert, Rational Requirements Composer and more other IBM solutions. Key points. The tool allows both orientations of models transformation. Round trip support saves a lot of time when some solution can be reused. The full integration of UML 2.3 in the modeling environment appeals to sympathy of developers, team leaders and stakeholders. A large number of target platforms and technologies, and the drag-and-drop modeling feature, are very good requirements and make the tool practical for any major project. In fact, it comes with multi-user development environment. Drawbacks. The process of code generation is Model-2-Code, and loses the advantages of the approach Model-2-Model. It needs high hardware requirements for each developing tool instance. Competitors. Objecteering and Arcstyler. 4.5 Optimal J

Optimal J, like RSA, is built over eclipse framework and generates source code from UML models. There is one main dierence between them: Optimal J only supports code generation for J2EE environment. Unlike the other tools, this is a practical implementation of MDA concepts and OMG standards. It follows a structured approach for models transformation, rst PIM, then PSMs and nally source code. It is a pattern-driven solution and provides active synchronization between models and code. Any change on one component reects automatically on other. Optimal J can deploy automatically to most J2EE servers, such as IBM WebSphere and iPlanet Application Server, and also oers a local deploy feature for developer tests. Optimal J becomes with drag-and-drop features for UML modeling, domain and business rules denition, and for Graphical User Interface (GUI) design. It also oers wizards for many congurations, like database connections. Key points. Optimal J implements MDA standards proposed by OMG; It is a pattern-driven solution, and supports active synchronization between source code and models. It supports CASEtools models, specically UML. Drawbacks. Optimal J is a discontinued product since the release of Compuware 2.0 [OGara et al. 2001]. It only generates source code for J2EE environment. Competitors. Same as extMDA. 4.6 Summary

In this section it was exposed a global overview of MDA tools. From open source to owner property, from full OMGs MDA implementation to other approaches, and from stand-alone to clouding tools. It was chosen one tool from each ends, explaining the concept and the features, the most valued points (key points), the worst (drawbacks), and some competitors. Counting MDA tools, case tools, and other productivity plugins, it was isolated a list with more than 100 references, exposing the most signicant for this case of study. Although there are a lot of references, increasingly this tools are being discontinued, and only huge platforms such as RSA still being more used. 5. A TOOL FOR CROSS-PLATFORM CODE GENERATION

The purpose of the dissertation is to develop a prototype framework that supports academic study and research, minimizing the lack between MDSE theory and the real use of them. From MDA
DI-RPD 2012.

10

Rogrio Arajo Costa e u

Fig. 5.

Overview of tool architecture

theory to MDA tools, we approach some important points and concerns, allowing us to state the fundamental guidelines for develop the proposed tool. The main objective is to build a stand-alone tool for a model based cross-platform code generation strategy. Specically, it must rely in Model-2-Model transformations and forward transformations. The tool should have from scratch both, Java and Android, transformations. The tool should also present high usability principles and favor codeless tasks. Is expected a good rendered interface, wizards for the most non-modeling tasks, and a catalog with some business MDA blocks available to be used/reused. Image 5 is the logic architecture of the tool. There are three main components identied: Object Composer, Persistence File, and Object Interpreter and Code Generator Engine. Despite the three components are integrated in the tool, they need to be so modular that will allow independent operations. Object Composer is responsible for holding the visual environment that manages the model elements. This includes entities manipulation, business rules, GUIs, and other model elements. This should present a codeless design environment, with good usability principles. Persistence File is the mechanism responsible to support model persistence. We can consider XMI standard for this purpose, but ideally, this mechanism should support more than one format. Object Interpreter and Code Generator Engine compose the tool core. They are responsible for holding the models denition, for the models transformation, and for the source code generation and all related operations. The process of code generation might be pattern-driven, with logging of each transformation, and be accomplished with the right source code documentation. In the tool draft are considered three main output targets: Web applications, Hybrid clients, commonly known as Fat Clients, and Desktop. The considered Java platform resides in Desktop category, and Android in Hybrid category. Since it is a model based tool, there are a lot of software engineering concerns that could be applied to the tool. First we can consider the implementation of model checking and testing, and later, enable it for supporting real-time solution development. The tool could be empowered also by productivity plugins, such as, team management support, version control, and a manager to trace the deployed solutions. In fact, each topic mentioned before is a challenging dissertation. Key features. The prototype framework is a stand-alone tool, with rich GUI, and with codeless avor for software development. Adopting an academic style, it will be design to be used and
DI-RPD 2012.

A Model Based Cross-Platform Code Generation Tool

11

maintained by other academic studies. It must support Model-2-Model transformations, for Java and Android specic Java patterns, logging each model transformation, and should be patterndriven in code generation. The generated code must be readable and accompanied with the respective documentation. 6. CONCLUSION

This document presented a set of software development tools and the portability issues for the current number of platforms, specically how to develop a model based cross-platform code generation tool. We concluded that throught MDSE concepts is possible to build abstract models that provide portability for a software solution. It supports Platform Independent Models which can be derived in Platform Specic Models for one or more target platforms, such as Java or Android. The workaround about the model-driven tools prove that there are many ways to achieve source code portability, but with dierent preconditions and side eects. There is a tradeo between Model-2-Code and Model-2-Model transformations. Mode-2-Code transformations are simpler to use, and less complex. On the other hand, Model-2-Model transformations are more modular, allow reuse of implementation artifacts for various platforms, and support better the models complexity. Round tripping operations are a value-add feature, allowing the tool to be able to keep up as the solution scales. For example, in IBM Web Sphere case study [Akkiraju et al. 2009], with reuse of the implemented solutions, they save 40%-50% of development enforce in 6 month project. Features such as wizards for non-modeling tasks, or codeless and good looking GUI, are the assets to convince any developer. Looking closer, many MDA tools lacks in the denition of complex business rules, and full automation in source code generation. From scratch only Java and Android will be available for code generation, but the tool will be plugin-driven so that later it may support more platforms. The core of this work is to abstract the blueprints for all tool mechanisms. In MDSE domain, there are a lot of scientic work and open source/commercial tools based on its concepts. Looking closer, Pass tools such as OutSystems, or IBM Rational, are supported by MDSE concepts. Analyzing the current non-outdated tools and the current software development needs, there is a viable space for a brand new tool, specially if it resolves the previous faults of MDA tools. Moreover, this initiative has been weighted by the nucleus of software engineering of University of Minho, where doesnt exist such academic tool. Surely it will please many students and will be used for other academic studies.
REFERENCES Agrawal, A., Karsai, G., and Shi, F. 2003. A uml-based graph transformation approach for implementing domain-specic model transformations. In International Journal on Software and Systems Modeling. Akkiraju, R., Mitra, T., Ghosh, N., Saha, D., Thulasiram, U., and Chakraborthy, S. 2009. Toward the development of cross-platform business applications via model-driven transformations. In Services - I, 2009 World Conference on. 585 592. Alcatel, Softeam, Thales, and TNI-Valiosys. 2003. Response to the mof 2.0 query/views/transformations rfp (ad/2003-04-10). Misc. ATOM. A tool for multi-paradigm modeling. http://atom3.cs.mcgill.ca/. Bezivin, J., Dupe, G., Jouault, F., Pitette, G., and Rougui, J. E. 2003. First experiments with the atl model transformation language: Transforming xslt into xquery. In 2nd OOPSLA Workshop on Generative Techniques in the context of Model Driven Architecture. Brown, A. 2008. Mda redux: Practical realization of model driven architecture. In Composition-Based Software Systems, 2008. ICCBSS 2008. Seventh International Conference on. 174 183. Cheng, F. 2010. Mda implementation based on patterns and action semantics. In Information and Computing (ICIC), 2010 Third International Conference on. Vol. 2. 25 28. Clark, T. and Warmer, J., Eds. 2002. Object Modeling with the OCL, The Rationale behind the Object Constraint Language. Lecture Notes in Computer Science, vol. 2263. Springer. Consortium, W. W. W. 2007. REC-xslt20-20070123/. Xsl transformations (xslt) version 2.0. http://www.w3.org/TR/2007/

Couto, R. 2011. Inferncia de PSM/PIM e padres de concepo a partir de cdigo Java. M.S. thesis, University e o ca o of Minho, Portugal.
DI-RPD 2012.

12

Rogrio Arajo Costa e u

Csertan, G., Huszerl, G., Majzik, I., Pap, Z., Pataricza, A., and Varro, D. 2002. Viatra - visual automated transformations for formal verication and validation of uml models. In Automated Software Engineering, 2002. Proceedings. ASE 2002. 17th IEEE International Conference on. 267 270. Czarnecki, K. and Helsen, S. 2003. Classication of model transformation approaches. In OOPSLA03 Workshop on Generative Techniques in the Context of Model-Driven Architecture. Finn, W. 2011. Android market vs iphone app store. http://www.brighthub.com/mobile/google-android/ articles/74976.aspx. Frankel, D. S. 2003. Model Driven Architecture: Applying MDA to Enterprise Computing. John Wiley & Sons. Gardner, T., Griffin, C., Koehler, J., and Hauser, R. 2003. A review of omg mof 2.0query / views / transformations submissions and recommendations towards the nal standard. Gholami, M. F. and Ramsin, R. 2010. Strategies for improving mda-based development processes. In Proceedings of the 2010 International Conference on Intelligent Systems, Modelling and Simulation. ISMS 10. 152157. Group, O. M. 2003. The common warehouse model 1.1. IBM. Rational xde. Misc. Jilani, A., Usman, M., and Halim, Z. 2010. Model transformations in model driven architecture. In Universal Journal of Computer Science and Engineering Technology. 5054. Kapetanakis, M. 2011. Developer economics 2011 winners and losers in the platform race. http://www. visionmobile.com/blog/2011/06/developer-economics-2011-winners-and-losers-in-the-platform-race. Kleppe, A. G., Warmer, J., and Bast, W. 2003. MDA Explained: The Model Driven Architecture: Practice and Promise. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA. Lind, J. 2011. Platform x: How cross-platform tools can end the os wars. http://www.visionmobile.com/blog/ 2011/06/platform-x-how-cross-platform-tools-can-end-the-os-wars/. Ma, K. and Yang, B. 2010. A hybrid model transformation approach based on j2ee platform. In Education Technology and Computer Science (ETCS), 2010 Second International Workshop on. Vol. 3. 161 164. marie Favre, J. 2004. Towards a basic theory to model model driven engineering. In In Workshop on Software Model Engineering, WISME 2004, joint event with UML2004. Meads, A. and Warren, I. 2011. Odintoolsmodel-driven development of intelligent mobile services. In Services Computing (SCC), 2011 IEEE International Conference on. 448 455. Mellor, S., Clark, A., and Futagami, T. 2003. Model-driven development - guest editors introduction. Software, IEEE 20, 5 (sept.-oct.), 14 18. Mellor, S. J., Scott, K., Uhl, A., and Weise, D. 2004. MDA Distilled: Principles of Model-Driven Architecture. The Addison-Wesley Object Technology Series. Addison-Wesley. Miller, J. and Mukerji, J. 2003. Mda guide version 1.0.1. Tech. rep., Object Management Group (OMG). Monsieur, G., Snoeck, M., Haesen, R., and Lemahieu, W. 2006. PIM to PSM transformations for an event driven architecture in an educational tool. In Proceedings of the European Workshop on Milestones, Models and Mappings for Model-Driven Architecture (3M4MDA 2006) at ECMDA 2006. 4964. OGara, M., Issam, L., Hunt, C., John, B., and Rossman, G. 2001. Compuware corporations optimal j. http: //java.sys-con.com/node/36300. OMG. 2006. Meta Object Facility (MOF) Core Specication Version 2.0. OMG. 2006. Software process engineering metamodell spem 2.0 omg draft adopted specication. Tech. rep. OutSystems. 2011. It resources. http://www.outsystems.com/it-resources/. Ribeiro, A. N. 2008. Um processo de modelao de sistemas software com integrao de especicaes rigorosas. ca ca co Ph.D. thesis, University of Minho. Schuermans, S. 2011. The ywheel eect of android and ios (and why their rivals are grinding to a halt). http://www.visionmobile.com/blog/2011/09/ the-flywheel-effect-of-android-and-ios-and-why-their-rivals-are-grinding-to-a-halt/. Singh, Y. and Sood, M. 2009. Model driven architecture: A perspective. In Advance Computing Conference, 2009. IACC 2009. IEEE International. 1644 1652. Sun Microsystems. 2002. Java metadata interface. TIOBE. 2012. Tiobe programming community index for january 2012. http://www.tiobe.com/index.php/ content/paperinfo/tpci/index.html. Willink, E. D. 2003. E.d.willink umlx: A graphical transformation language for mda umlx: A graphical transformation language for mda. Xiao-mei, Y., Ping, G., and Heng, D. 2009. Mapping approach for model transformation of mda based on xmi/xml platform. In Education Technology and Computer Science, 2009. ETCS 09. First International Workshop on. Vol. 2. 1016 1019.

DI-RPD 2012.

Anda mungkin juga menyukai