• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
681
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
30
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Rule-based Modeling of Mashups Adrian Giurca Emilian Pascalau
  • 2. Web 1.0, Web 2.0, Web 3.0?
  • 3. Server-side Rule-based Mashups as Services Orchestration (1)
      • Various (REST) services are orchestrated server-side
      • Rules define the orchestration
      • User agent interacts with the Mashup Server typically with Ajax techniques
        • With the Mashup Web Server
        • With the Mashup Rule Repo
      • Various rules repositories. Rules can be shared
      • By changing the rules users can customize the mashup
  • 4. Server-side Rules-based Mashups with Widgets
      • Remember iGoogle and its Gadgets?
      • Widget dependency can be implemented server-side with rules in the Widget Runner .
      • User agent interacts with the Services via Mashup Server using Widgets from the browser (typically Ajax).
      • Various rules repositories. Rules can be shared
      • By changing the rules users can customize the mashup .
  • 5. Client-side Rule-based Mashups w/o Widgets
      • Various (REST) services are orchestrated client-side
      • Rules define the orchestration
      • User agent interacts directly with the services typically with Ajax techniques
      • Various rules repositories. Rules can be shared
      • By changing the rules users can customize the mashup
  • 6. Client-side Rule-based Mashups and Widgets
      • Widget dependency can be implemented client-side with rules .
      • User agent interacts
        • with the Mashup Server using Widgets from the browser.
        • directly with the services
      • User interact with rule repos (using JSON Rules built-ins).
      • By changing the rules users can customize the mashup .
  • 7. A Use Case:
      • Capturing user activity
        • As already stated in previous slides based on user’s activity new information could be provided, offers could be provided and so forth.
  • 8. Business Rules
      • R1: When the mouse is over the Handbook of rules image, resize the image; if mouse out resize image to initial size.
      • R2: If the user clicks on Publications open the link in a new window.
      • R3: Anytime a link is clicked append the clicked link to a list.
      • R4: If the mouse is over a publication entry extract the RDFa triple associated with it.
  • 9. Implementing Rules (1) { &quot;id&quot;: &quot;rule102&quot;, &quot;priority&quot;: 1, &quot;appliesTo&quot;: [&quot;http://localhost/example/&quot;], &quot;eventExpression&quot;:{ &quot;type&quot;:&quot;mouseover&quot;, &quot;target&quot;$X&quot;, }, &quot;condition&quot;: [ &quot;$X: HTMLImageElement( src=='index_files/34422.jpg‘ )&quot; ], &quot;actions&quot;:[ &quot;resizeImage(&quot;$X&quot;,200,300) ] } function resizeImage(elem,width,height){ try{ elem.setAttribute(&quot;width&quot;,width); elem.setAttribute(&quot;height&quot;,height); }catch(e){ alert(e); } } Assuming the DOM contains the following: <img src=&quot;index_files/34422.jpg&quot; width=&quot;72&quot; height=&quot;96&quot;> We can write the rule: When we hover with the mouse over this image element resize the image .
  • 10. Implementing Rules (2) {&quot;id&quot;: &quot;rule104&quot;, &quot;priority&quot;: 1, &quot;appliesTo&quot;:[&quot;http://localhost/example/&quot;], &quot;eventExpression&quot;:{ &quot;type&quot;:&quot;click&quot;, &quot;target&quot;:&quot;$X&quot; } , &quot;condition&quot;:[ &quot;$X:HTMLAnchorElement (href==‘http://www.informatik.tu-cottbus.de/%7Eagiurca/Publications.htm’, $Y:href)&quot; ], &quot;actions&quot;:[ &quot;openPublications($currentEvent,$Y)&quot; ] }
  • 11. A Simple Execution Flow … Object _name=$currentEvent _value=Event click Current Variable: $X … evaluatePropertyRestriction … property Binding - using hasAttribute: href … actionToFire openPublications
  • 12. Summary
      • Rule-based Mashups can be implemented both server-side and client-side
      • Widgets dependency can be rule-based
      • Interacting with rule repositories enrich users with mashup customization capabilities
      • Running client-side mashups reduce the user dependency of dedicated mashup servers
      • Running client-side mashups permit users to keep their rules (part of the mashup behavior) on their own silos (including on their local machine)