<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JCC</journal-id><journal-title-group><journal-title>Journal of Computer and Communications</journal-title></journal-title-group><issn pub-type="epub">2327-5219</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jcc.2017.53006</article-id><article-id pub-id-type="publisher-id">JCC-74654</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Transforming Model Oriented Program into Android Source Code Based on Drools Rule Engine
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ei</surname><given-names>Ei Thu</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Nwe</surname><given-names>Nwe</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>University of Computer Studies Mandalay, Mandalay, Myanmar</addr-line></aff><pub-date pub-type="epub"><day>08</day><month>03</month><year>2017</year></pub-date><volume>05</volume><issue>03</issue><fpage>49</fpage><lpage>59</lpage><history><date date-type="received"><day>February</day>	<month>17,</month>	<year>2017</year></date><date date-type="rev-recd"><day>Accepted:</day>	<month>March</month>	<year>10,</year>	</date><date date-type="accepted"><day>March</day>	<month>13,</month>	<year>2017</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   
   Model transformation is one of the prominent features and the rising research area of Model Driven Engineering (MDE). MDE promotes models to primary artifacts that drive the whole development process. This paper presents the model transformation approach for textual model oriented programs Umple (UML Programming Language) to generate android applications (apps). The proposed approach improved the generation of android source code by using Drools transformation rules and introducing new concern in model driven mobile engineering. The major objective of proposed transformation approach intends to address consistency between source and target model and also intends to handle productivity issues in model driven software development. The main results of model transformation approach are Java class for model layer, XML file for view layer and android activity class for controller layer. Results show that proposed approach achieves high consistency between source and target model and also improves model transformation productivity. 
  
 
</p></abstract><kwd-group><kwd>Model Driven Engineering</kwd><kwd> Transformation Rule</kwd><kwd> Model Oriented Program</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The mobile application development industry is increasingly growing up due to the intensive use of applications in mobile devices. Most of these devices run on Android operating system. Due to increasingly intensive use of mobile apps, the development of mobile apps demands additional worries about the short time- to-market and to improve the productivity [<xref ref-type="bibr" rid="scirp.74654-ref1">1</xref>]. Software engineering process aims to help leading an IT project from the perspective of transforming design model to code implementation in a specific platform. Indeed, the model driven architecture (MDA) is a new discipline of software engineering that has emerged to ensure the development of productive model [<xref ref-type="bibr" rid="scirp.74654-ref2">2</xref>].</p><p>Model transformation is considered as one of the key technologies in MDE. The transformation rules map the input model to output model. These rules can be specified in transformation language such as ATLAS, Acceleo, Drools [<xref ref-type="bibr" rid="scirp.74654-ref3">3</xref>], etc. Moreover, the MDA allows the code generation from platform specific models by means of generators that automatically transform models into source code for chosen platform [<xref ref-type="bibr" rid="scirp.74654-ref4">4</xref>]. An infrastructure for model-driven development has a high potential for accelerating the development of software applications. MDA does not concentrate on technical detail but lifts software development to a higher abstraction level. A high quality MDA infrastructure can considerably reduce the time to market in consequence.</p><p>In this paper, we propose a model transformation framework based on drools rule engine. In our approach, UMPLE’ class diagram considered as a primary model artifact that used to generate android source code. UMPLE blurs the distinction between code and modeling, enabling modelers and coders to collaborate on models in a way similar to code-based collaboration. The result of the transformation considered as model layer, view layer, controller layer and persistency layer. Model layer consists of plain old java object (POJO) class, view layer includes XML for android user interfaces, controller layer comprises with android activity classes and persistency layer considered as apps data management. In summary, the proposed approach transforms Umple class diagram to android mobile apps which contain create-retrieve-update-delete (CRUD) operations based on model-view-controller (MVC) architecture.</p></sec><sec id="s2"><title>2. Related Work</title>Model Driven Mobile Apps Development<p>The authors [<xref ref-type="bibr" rid="scirp.74654-ref5">5</xref>] proposed a MDD approach for generating android applications from UML class diagram using Acceleo transformation languages. But their approach generates only two screens for the given class diagram. Their code generation approach is in progress and still need to complete for other mobile platforms. In literature [<xref ref-type="bibr" rid="scirp.74654-ref6">6</xref>], the authors proposed a model transformation approach based code generator for state machine diagram. Their approach generates Enterprise Java Bean (EJB) from model using ATLAS transformation language. Although the authors argued that their approach improves the quality and productivity of MDA concepts, they did not described the any measurements for proposed transformation approach. In literature [<xref ref-type="bibr" rid="scirp.74654-ref7">7</xref>], they proposed code generation method from UML message sequence diagram based on Meta Object Facility (MOF). They proposed meta-model for message sequence diagram and six model transformation rules written by Acceleo. They also described that MDE absolutely needs automatic tools and methods to transform platform-indepen- dent model into platform-specific model.</p><p>The researchers [<xref ref-type="bibr" rid="scirp.74654-ref8">8</xref>] described the model oriented programming as a new paradigm to reduce the ever-present tension between model-centric and code- centric development styles. UMPLE is a model-oriented programming language that supports modeling using a textual notation just like other high-level programming languages. Therefore, Umple is a multi-faceted technology allowing users to integrate modeling into software development straightforwardly.</p><p>Although there are already some approaches to model-driven development of mobile apps, there is still gap in model transformation approach for mobile applications. Individual approaches are in moving target. In contrast to our proposed approach, the previous approaches are focused on concrete syntax based process and defined transformation rule specifications in template-based approach. In this paper, our approach will mainly focus on abstract syntax based approach. It traverse and parse source model in visitor based approach instead of defining concrete syntax grammar and specify transformation rules in object pattern matching approach by using Drools rule language [<xref ref-type="bibr" rid="scirp.74654-ref3">3</xref>]. The technical space of model transformations still needs to do 80% to get complete transformations [<xref ref-type="bibr" rid="scirp.74654-ref9">9</xref>].</p><p>From the perspective of evaluation, the authors [<xref ref-type="bibr" rid="scirp.74654-ref10">10</xref>] proposed the approach for empirical evaluation of model driven engineering in multiple dimensions. Their empirical studies included qualitative (expert judgments) and quantitative data (metrics) evaluations. They supposed that the productivity and defect detection rate are the effective metrics for measuring automation degree of model driven development process. A cost estimation approach is therefore needed that can incorporate characteristics of MDE that affect economies of scale and effort in application development with the size computation of various artifacts in MDE [<xref ref-type="bibr" rid="scirp.74654-ref11">11</xref>]. Therefore we measure our proposed model driven approach’s automation degree from productivity quality criteria. In order to estimate the code generator effort, we use COCOMOII tool [<xref ref-type="bibr" rid="scirp.74654-ref12">12</xref>].</p></sec><sec id="s3"><title>3. Model Transformation Approach Based on Drools Rule Engine</title><sec id="s3_1"><title>3.1. Architecture</title><p>The main components of model transformation framework are parser, model transformer and code generator. <xref ref-type="fig" rid="fig1">Figure 1</xref> shows the architecture of the proposed model transformation framework. Firstly, it takes Umple source code as input file. The parser parses the Umple file and constructs the syntax tree model. Syntax tree is a tree representation of the abstract syntactic structure of source</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Model transformation framework architecture</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/74654x2.png"/></fig><p>code written in a programming language. The transformer transforms the resulted source model syntax tokens into target model object pattern using Drools mapping rules. And then the code generator generates the android source code according to the MVC architecture.</p></sec><sec id="s3_2"><title>3.2. Parser and Syntax Tree Model Constructor</title><p>The main architecture of parser is composed with visitor-based parser which use for extracting abstract syntax tree (AST) from input model and code generator which generate the respective android source code using extracted AST model of input file [<xref ref-type="bibr" rid="scirp.74654-ref13">13</xref>]. AST traverse and collect the information of source code by using the AST visitor method. Firstly, the AST parser creates the compilation unit (CU) and it accepts the visitor node. The visitor node traverses the source code to extract the package declaration, type declaration, field declaration and variable declaration. The input/output relationship of parser and syntax model constructor is shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>.</p></sec><sec id="s3_3"><title>3.3. Transformer</title><p>The transformer is composed with Drools inference engine that is able to scale to a large number of rules and facts. The inference component matches facts and data (syntax tree model). Facts may be modified, removed or added by executing rules or from external sources. The transformer receives the partial pieces of source code (package declaration, type declaration, field declaration and variable declaration) with syntax tree model. This model is transformed using predefined set of mapping rules in Drools Rule engine. The rule engine interprets and executes the mapping rules on the source model and produce target model. The relationships between transformer and Drools rule engine can be seen in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</p></sec><sec id="s3_4"><title>3.4. Code Generator</title><p>Code generation can be defined as the technique in which we write program that create another programs. After the object pattern matching process, the transformer fires the rules and generates corresponding model for code generator. The code generator receives the POJO model for model layer, XML model for view layer and android model for controller layer. The generator use the java development tool (JDT-core) to generate POJO class and android class source code. It also uses the JDOM to generate XML user interface file. <xref ref-type="fig" rid="fig4">Figure 4</xref> shows</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> Parser component</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/74654x3.png"/></fig><fig id="fig3"  position="float"><label><xref ref-type="fig" rid="fig3">Figure 3</xref></label><caption><title> Transformer component</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/74654x4.png"/></fig><fig id="fig4"  position="float"><label><xref ref-type="fig" rid="fig4">Figure 4</xref></label><caption><title> Code generator structure</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/74654x5.png"/></fig><p>the internal operation design of code generator. In order to generate java class and android from AST fragment, the proposed generator creates new compilation unit and construct the target language sentence structure by using Java Language Specification (JLS8) application programming interface (API). That API allows generator to create language statements such as Method Declaration, Variable Declaration, Expression Statement declaration, Method Invocation, Super Method Invocation, Field Access, Cast Expression, Class Instance Creation, etc.</p></sec><sec id="s3_5"><title>3.5. Drools Transformation Rules</title><p>A transformation rule is a description of how one or more constructs in the source language can be transformed into one or more constructs in the target language. A transformation rule is the smallest entity within a model transformation. A rule contains a source pattern and a target pattern. For each occurrence of the source pattern in the source model, a target pattern is created in the target model.</p><p>In our proposed transformation approach, transformation rules are defined on drools rule engine which is a production rule system and enhanced implementation of the Rete algorithm [<xref ref-type="bibr" rid="scirp.74654-ref3">3</xref>]. Drools rules are defined using Java-like language. The main rules in our proposed rule engine are Umple2Model.drl, Umple2View.drl and Umple2Controller.drl. Umple2Model.drl transforms incoming abstract syntax model (ASM) into plain old java object (POJO), Umple2View.drl transforms ASM into android user interface XML file and Umple2Controller.drl transforms ASM into android activity class. <xref ref-type="table" rid="table1"><xref ref-type="table" rid="table">Table </xref>1</xref> illustrates the smallest entity of simple variable transformation process. The second row in table shows the transformation rule that use to transform ASM into variable declaration. The third row shows the resulted code for that variable declaration, the fourth row shows the generated user interface in android screen and the final row shows the generated SQL command that used to create database in generated application.</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1"><xref ref-type="table" rid="table">Table </xref>1</xref></label><caption><title> Drools transformation rule sample</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Umple</th><th align="center" valign="middle"  colspan="3"  >String bookTitle;</th></tr></thead><tr><td align="center" valign="middle" >Drools Transformation Rule</td><td align="center" valign="middle"  colspan="3"  >Rule &quot;VariableDeclaration&quot; Dialect &quot;java&quot; when $st : SyntaxTree(status==SyntaxTree.VAR_DECLARE) then TypeDeclaration type=AST2Android.Variable_Decl($st.getType()); CompilationUnit cu=$st.getCu(); $st.setStatus(SyntaxTree.ACTIVITY_CREATE); $st.setType(type); $st.setCu(cu); update($st); end</td></tr><tr><td align="center" valign="middle"  rowspan="2"  >Generated Code</td><td align="center" valign="middle" >POJO (Model Layer)</td><td align="center" valign="middle" >XML (View Layer)</td><td align="center" valign="middle" >Android (Controller Layer)</td></tr><tr><td align="center" valign="middle" >String bookTitle; PublicvoidsetBookTitle(String bt){ bookTitle=bt;} public String getBookTitle(){ return bookTitle;} }</td><td align="center" valign="middle" >&quot;@+id/ txtbookTitle&quot; android:layout_height= &quot;wrap_content&quot; android:layout_width= &quot;wrap_content&quot;/&gt;</td><td align="center" valign="middle" >private EditText txtbookTitle; private String bookTitle; txtbookTitle=(EditText)findViewById(R.id.txtbookTitle);</td></tr><tr><td align="center" valign="middle" >Generated UI</td><td align="center" valign="middle"  colspan="3"  ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/74654x6.png" xlink:type="simple"/></inline-formula></td></tr><tr><td align="center" valign="middle" >Generated Persistency Layer</td><td align="center" valign="middle"  colspan="3"  >db.execSQL(&quot;CREATE TABLE IF NOT EXISTS Books <xref ref-type="table" rid="table">Table </xref>(BooksID Integer PRIMARY KEY AUTOINCREMENT, book Title String);&quot;);</td></tr></tbody></table></table-wrap></sec></sec><sec id="s4"><title>4. Evaluation and Analysis</title><sec id="s4_1"><title>4.1. Parser Analysis</title><p>To illustrate the ability of proposed parser, we have conducted the parser statistics with time efficiency and compare with Umple code analyzer [<xref ref-type="bibr" rid="scirp.74654-ref14">14</xref>]. As a case study of transformation process, we choose a Library Management System as Umple input source file. It contains number of 6 classes with 19 attributes. <xref ref-type="fig" rid="fig5">Figure 5</xref> shows the implemented screen of proposed parser.</p><p>In order to measure the proposed parser performance, we extract the source file metrics from the input Umple file. The measurable metrics include number of classes, number of lines of code, number of variables and its data type. And then, we also conducted the proposed parser precision and recall using the following equations. <xref ref-type="fig" rid="fig6">Figure 6</xref> depicts the parser analysis for Library Management System case study.</p><disp-formula id="scirp.74654-formula76"><label>(1)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/74654x7.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.74654-formula77"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/74654x8.png"  xlink:type="simple"/></disp-formula><p>At this stage, we measured the proposed parser performance because of the parser accuracy can improve the later transformation and code generation processes. And also, this measurement can validate that whether the target model’ attributes are consistent with source model’ attributes or not. Maintaining consistency between documentation and the corresponding code is challenging task. <xref ref-type="table" rid="table">Table </xref>2 shows the proposed parser gets the average 100% of preci-</p><fig id="fig5"  position="float"><label><xref ref-type="fig" rid="fig5">Figure 5</xref></label><caption><title> Umple to AST parser</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/74654x9.png"/></fig><fig id="fig6"  position="float"><label><xref ref-type="fig" rid="fig6">Figure 6</xref></label><caption><title> Parser analysis</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/74654x10.png"/></fig><table-wrap id="table2" ><label><xref ref-type="table" rid="table">Table </xref>2</label><caption><title> Parser analysis result</title></caption><table><tbody><thead><tr><th align="center" valign="middle"  colspan="5"  >Project Name?Library Management System</th></tr></thead><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >Found</td><td align="center" valign="middle" >Expected</td><td align="center" valign="middle" >Precision</td><td align="center" valign="middle" >Recall</td></tr><tr><td align="center" valign="middle" >No. Classes</td><td align="center" valign="middle" >6</td><td align="center" valign="middle" >6</td><td align="center" valign="middle" >100%</td><td align="center" valign="middle" >100%</td></tr><tr><td align="center" valign="middle" >No. Attributes</td><td align="center" valign="middle" >19</td><td align="center" valign="middle" >22</td><td align="center" valign="middle" >100%</td><td align="center" valign="middle" >86%</td></tr><tr><td align="center" valign="middle" >No. LOC</td><td align="center" valign="middle" >42</td><td align="center" valign="middle" >42</td><td align="center" valign="middle" >100%</td><td align="center" valign="middle" >100%</td></tr></tbody></table></table-wrap><p>sion and 95.33% of recall rate. Therefore, we have the high consistent between source documents and target code.</p></sec><sec id="s4_2"><title>4.2. Code Generator Analysis</title><p>For practical use in model-driven engineering, the quality of model transformations is a key issue. In this paper, we also conducted the quantitative measurement from the perspective of productivity criteria. Because of the productivity criteria is the effective metrics to ensure the automation degree of model transformation. The generated source code result for case study is show in <xref ref-type="table" rid="table">Table </xref>3. <xref ref-type="fig" rid="fig7">Figure 7</xref> shows the implemented screen of code generator.</p><p>In order to calculate the estimated value in time and effort, we use the COCOMOII tool [<xref ref-type="bibr" rid="scirp.74654-ref12">12</xref>]. For this measurement, we set 616 SLOC and set the product cost parameters settings with the default nominal value. The tool showed a needed effort of 2 Person-months, a required 4months’ time frame for 616 SLOC. The proposed transformation approach can generate 616 SLOC within 2 seconds. Therefore, by using our transformation approach we could reduce time and effort in development process by 4 months and effort of 2 Person-months.</p><fig id="fig7"  position="float"><label><xref ref-type="fig" rid="fig7">Figure 7</xref></label><caption><title> Code generator</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/74654x11.png"/></fig><table-wrap id="table3" ><label><xref ref-type="table" rid="table">Table </xref>3</label><caption><title> Generated source code result</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Layer</th><th align="center" valign="middle" >Type</th><th align="center" valign="middle" >Files</th><th align="center" valign="middle" >SLOC</th><th align="center" valign="middle" >Generated Time (s)</th></tr></thead><tr><td align="center" valign="middle" >Model</td><td align="center" valign="middle" >Java</td><td align="center" valign="middle" >6</td><td align="center" valign="middle" >188</td><td align="center" valign="middle" >1.98126</td></tr><tr><td align="center" valign="middle" >View</td><td align="center" valign="middle" >XML</td><td align="center" valign="middle" >6</td><td align="center" valign="middle" >99</td><td align="center" valign="middle" >0.14854</td></tr><tr><td align="center" valign="middle" >Controller</td><td align="center" valign="middle" >Android</td><td align="center" valign="middle" >6</td><td align="center" valign="middle" >329</td><td align="center" valign="middle" >0.29673</td></tr><tr><td align="center" valign="middle" >Total</td><td align="center" valign="middle" >Java + XML</td><td align="center" valign="middle" >18</td><td align="center" valign="middle" >616</td><td align="center" valign="middle" >2.42653</td></tr></tbody></table></table-wrap></sec><sec id="s4_3"><title>4.3. Results and Discussion</title><p>In order to ensure the quality of proposed model driven transformation approach, we have conducted relevant measurement with step by step. The proposed transformation approach is developed and successfully tested over 20 UMPLE model projects. Firstly, we have measured the proposed parser efficiency with precision and recall. The results show that the parser precision rate from 99% to 100% and also the recall rate from 90% to 100%. Therefore, our proposed parser achieves high consistency between source file and parsed syntax. <xref ref-type="table" rid="table">Table </xref>4 shows the results analysis for parser efficiency, code generation efficiency and cost estimation value for each project. Secondly, we have conducted the statistical analysis for code generation process with number of lines of code metrics, number of files and code generation time for each phase. The main purpose of our proposed approach is to achieve high productivity quality. According to the cost estimation tool results, our approach can significantly reduce the time and developer effort. Therefore the proposed approach also reaches the satisfactory in productivity measurement.</p><table-wrap id="table4" ><label><xref ref-type="table" rid="table">Table </xref>4</label><caption><title> Results analysis</title></caption><table><tbody><thead><tr><th align="center" valign="middle"  rowspan="3"  >No</th><th align="center" valign="middle"  rowspan="3"  >Project</th><th align="center" valign="middle"  colspan="2"   rowspan="2"  >Parser Efficiency</th><th align="center" valign="middle"  colspan="3"  >Code Generation Efficiency</th><th align="center" valign="middle"  colspan="2"   rowspan="2"  >COCOMOII Estimated Value</th></tr></thead><tr><td align="center" valign="middle"  colspan="3"  >Java + XML + Android</td></tr><tr><td align="center" valign="middle" >Precision</td><td align="center" valign="middle" >Recall</td><td align="center" valign="middle" >SLOC</td><td align="center" valign="middle" >File</td><td align="center" valign="middle" >Time (s)</td><td align="center" valign="middle" >Time (Months)</td><td align="center" valign="middle" >Effort (Person-Months)</td></tr><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >Online Golf Store System</td><td align="center" valign="middle" >100%</td><td align="center" valign="middle" >90.67%</td><td align="center" valign="middle" >797</td><td align="center" valign="middle" >27</td><td align="center" valign="middle" >3.719197</td><td align="center" valign="middle" >4.8</td><td align="center" valign="middle" >2.3</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >Online Shopping System</td><td align="center" valign="middle" >100%</td><td align="center" valign="middle" >98.34%</td><td align="center" valign="middle" >853</td><td align="center" valign="middle" >21</td><td align="center" valign="middle" >2.058524</td><td align="center" valign="middle" >4.9</td><td align="center" valign="middle" >2.5</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >Banking Structure System</td><td align="center" valign="middle" >99.27%</td><td align="center" valign="middle" >100%</td><td align="center" valign="middle" >630</td><td align="center" valign="middle" >21</td><td align="center" valign="middle" >1.764526</td><td align="center" valign="middle" >4.4</td><td align="center" valign="middle" >1.8</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >Patient Information System</td><td align="center" valign="middle" >100%</td><td align="center" valign="middle" >97.85%</td><td align="center" valign="middle" >654</td><td align="center" valign="middle" >15</td><td align="center" valign="middle" >1.977318</td><td align="center" valign="middle" >4.5</td><td align="center" valign="middle" >1.8</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >Order &amp; Payment System</td><td align="center" valign="middle" >100%</td><td align="center" valign="middle" >97.77%</td><td align="center" valign="middle" >611</td><td align="center" valign="middle" >24</td><td align="center" valign="middle" >1.846651</td><td align="center" valign="middle" >4.4</td><td align="center" valign="middle" >1.7</td></tr><tr><td align="center" valign="middle" >:</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td></tr></tbody></table></table-wrap></sec></sec><sec id="s5"><title>5. Conclusions</title><p>Model transformation can be used for different tasks throughout the development process for manipulating models. The field of model transformation is an active research field and it is necessary to exploit the model transformation approach for the development of mobile applications. In this paper, an approach capable of generating MVC-based android source code from Umple class diagram is developed. This approach involves Drools model transformation rules that can address the technical space of MDE. Drools transformation rules make the proposed approach efficient, simple and faster in implementation. The parser analysis results show that the parsed source code is consistent with input Umple file. The evaluation results with COCOMOII estimator show that the transformation approach significantly reduces the effort and improves the productivity. Therefore, the proposed transformation approach is suitable for short time- to-market software development environment.</p><p>In this paper, we address the proposed parser consistency and productivity issues in model driven transformation process. As a future work, we plan to address the internal transformation rule quality measurement. The measurement of internal transformation rule quality is still challenging task in model driven engineering process.</p></sec><sec id="s6"><title>Cite this paper</title><p>Thu, E.E. and New, N. (2017) Transforming Model Oriented Program into Android Source Code Based on Drools Rule Engine. Journal of Computer and Communications, 5, 49- 59. https://doi.org/10.4236/jcc.2017.53006</p></sec></body><back><ref-list><title>References</title><ref id="scirp.74654-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">[1]	Vaupel, S. and Taentzer, G. (2014) Model-Driven Development of Mobile Applica-tions Allowing Role-Driven Variants, MODELS’2014, Philipps-University at Mar-burg, Gernany.</mixed-citation></ref><ref id="scirp.74654-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Poole, J.D. (2001) Model-Driven Architecture: Vision, Stan-dards and Emerging Technologies, ECOOP’ Workshop on Meta-modeling and Adap-tive Object Models, Hyperion Solutions Corporation.</mixed-citation></ref><ref id="scirp.74654-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Browne, P. (2009) JBoss Drools Business Rules. Packt Publishing, 1847196063.</mixed-citation></ref><ref id="scirp.74654-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Kriouile, A., Addamssiri, N. and Gadi, T. (2015) An MDA Method for Automatic Transformation of Models from CIM to PIM. American Journal of Software Engineering and Appli-cations, 4, 1-14. https://doi.org/10.11648/j.ajsea.20150401.11</mixed-citation></ref><ref id="scirp.74654-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Benouda, H., Essbai, R., Azizi, M. and Moussaoui, M. (2016) Modeling and Code Generation of Android Applications Using Acceleo. International Journal of Software Engineering and Its Applications, 10, 83-94. 
https://doi.org/10.14257/ijseia.2016.10.3.08</mixed-citation></ref><ref id="scirp.74654-ref6"><label>6</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Bousetta</surname><given-names> B.</given-names></name>,<name name-style="western"><surname> Beggar</surname><given-names> O.E. and Gadi T. </given-names></name>,<etal>et al</etal>. (<year>2014</year>)<article-title>A Model Transformation Approach for Code Generation From State Machine Diagram</article-title><source> IADIS International Journal on Computer Science and Information Systems' 2014</source><volume> 9</volume>,<fpage> 1</fpage>-<lpage>15</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.74654-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Son, H., Kim, W. and Chul, R. (2013) MOF Based Code Generation Method for Android Platform. International Journal of Software Engineering and Its Application, 7, Hongik University, Sehong Campus, Ko-rea.</mixed-citation></ref><ref id="scirp.74654-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Omar, B. and Lethbridge, T. (2013) Model Oriented Programming: Bridging the Code-Model Divide, ICSE Workshop on Modeling in Software Engi-neering, Modeling in Software Engineering (MiSE), University of Ottawa, Canada, 69-75.</mixed-citation></ref><ref id="scirp.74654-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Parada, A. and Marques, M. (2015) Automating Mobile Application Development: UML-Based Code Generation for Android and Windows Phone. Journal of Theoretical and Applied Informatics (RITA), 22, Pelotas, Bra-zil.</mixed-citation></ref><ref id="scirp.74654-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Mohaghegh, P. (2010) An Approach for Empirical Evaluation of Model Driven Engineering in Multiple Dimensions, MODELPLEX, Oslo, Nor-way.</mixed-citation></ref><ref id="scirp.74654-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Sunkle, S. and Kullkarni, V. (2012) Cost Estimation for Model-Driven Engineering. Proceedings of the 15th international conference on Model Driven En-gineering Languages and Systems. https://doi.org/10.1007/978-3-642-33666-9_42</mixed-citation></ref><ref id="scirp.74654-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Abran, A., Deshnarnais, J. and Mohammand, Z. (2015) Productivity-Based Software Estimation Models and Process Improvement: An Empirical Study. International Journal on Advances in Software, 8.</mixed-citation></ref><ref id="scirp.74654-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Eithu, E. and Nwe, N. (2017). Model Driven Engineering: Automatic Code Generation of Android from UMPLE, 15th International Conference on Computer Application (in Press), Yangon, Myanmar.</mixed-citation></ref><ref id="scirp.74654-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">https://github.com/umple/umple</mixed-citation></ref></ref-list></back></article>