Enterprise Mashup Markup Language
EMML, or Enterprise Mashup Markup Language, is an XML markup language for creating enterprise mashups, which are software applications that consume and mash data from variety of sources. These applications often perform logical or mathematical operations as well as present the data. Mashed data produced by enterprise mashups are presented in graphical user interfaces as mashlets, widgets, or gadgets. EMML can also be[1] considered a declarative mashup domain-specific language (DSL). A mashup DSL eliminates the need for complex, time-consuming, and repeatable procedural programming logic to create enterprise mashups. EMML also provides a declarative language for creating visual tools for enterprise mashups. The primary benefits of EMML are mashup design portability and interoperability of mashup solutions. These benefits are expected to accelerate the adoption of enterprise mashups by creating transferable skills for software developers and reducing vendor lock-in. The introduction of EMML is expected to help accelerate the trend toward the integration of web-based applications and service-oriented architecture (SOA) technologies.[2] Bank of America was a high-profile early supporter of EMML.[3] Other prominent early supporters included Hewlett-Packard, Capgemini, Adobe Systems, and Intel.[4] EMML historyRaj Krishnamurthy (chief architect at JackBe Corporation) and Deepak Alur (VP engineering at JackBe Corporation) started working on EMML in 2006. Their objective was to enable user-oriented and user-enabled mashups by creating what was then a new type of middleware called an Enterprise Mashup Platform. Raj Krishnamurthy became the chief language designer and implementer of EMML and also led the team to create an Eclipse-based EMML IDE called Mashup Studio.[5] This work evolved into the EMML reference implementation that was donated to the Open Mashup Alliance. Raj Krishnamurthy continues to be one of the key contributors to EMML through the Open Mashup Alliance. EMML featuresEMML language provides a rich set of high-level mashup-domain vocabulary to consume and mash a variety of web data-sources in flexible ways. EMML provides a uniform syntax to invoke heterogeneous service styles: REST, WSDL, RSS/ATOM, RDBMS, and POJO. The EMML language also provides the ability to mix diverse data formats: XML, JSON, JDBC, JavaObjects, and primitive types. High-level EMML language features include:
EMML is primarily an XML-based declarative language, but also provides the ability to encode complex logic using embedded scripting engines. XPath is the expression language used in EMML. Directinvoke statement
Code sample of passing attributes as parameters to a service: <directinvoke endpoint="http://www.myCompany.com/rest-services/getItems"
method="GET" outputvariable="$result" query="items=all"
appID="67GYH30N25" />
<directinvoke endpoint="http://www.svcsltd.com/getReservation"
method="GET" outputvariable="$news" xmlns:sc="http://www.svcltd.com/"
sc:date="20070515" sc:nights="3"/>
Filter statementThe Code sample for filtering west-coast customers using region data-item: <filter inputvariable="$queryResult" filterexpr="/customers[region='West']" outputvariable="$westCoastOnly"/>
Sort statementThe Code sample that sorts tickets based on created date and customer: <sort inputvariable="$troubleTickets"
sortexpr="ticket"
sortkeys="xs:date(created) descending, customer ascending"
outputvariable="$troubleTickets"/>
Groupby statement
Code sample that groups books by genre and computes total copies for each genre: <group by="$catalog//book/genre" outputvariable="$groupResult">
<res:genre name="{$group_key}" copiessold="{sum(copiessold)}"/>
</group>
Merge statement
Code sample that merges Yahoo! News, Financial News, and Reuters feeds: <merge inputvariables="$YahooRSS, $FinancialNewsRss, $ReutersRSS"
outputvariable="$NewsAggregate"/>
Annotate statement
Code sample for annotating vendor payload with geo-coordinates: <annotate variable="$vendors" expr="/vendor/site" >
element geo:lat { $georesult//y:Latitude/string() },
element geo:long { $georesult//y:Longitude/string() }
</annotate>
Join statementThe Code sample where output variable contains a <join outputvariable="$joinResult"
joincondition="$movies/movie/@id = $reviews/review/movie/title">
<select name="res:recommendations">
<res:movie>
<res:movietitle>{$movies/title}</res:movietitle>
<res:rating>{$reviews/rating}</res:rating>
<res:comment>{$reviews/comment}</res:comment>
</res:movie>
</select>
</join>
Scripting in EMMLEMML is a declarative language, but provides programmatic scripting[13] extensions for performing complex mashup logic. JavaScript, JRuby, Groovy, POJO, XQuery scripting environments are supported. Data flows seamlessly between EMML and scripting environments. Code sample where JavaScript snippet is used to extract authentication token that is required for subsequent calls "result" variable that gets propagated to JavaScript environment: <script type="text/javascript">
<![CDATA[
var r = new String(result)
var ar = r.split("=");
auth = ar[ar.length-1];
auth = auth.slice(0, -1)
]]>
</script>
References
|