Feed on
 Posts
 Comments
Java Beans dot Asia

Just a few simple tutorials …

I came across a Firefox Add-On today by Matthias Tylkowski, that lets user to modify the browser view of his/her preferred web pages. For example, user can modify the appearance of cnn.com to suit his/her needs.

The add-on or the web rules is a JSON-based rule language, where each rule is a JSON object. In addition, Javascript is used for method calls. The web rules use Drools-like condition language:

{
    "id":"rule101",  "appliesTo": [
              "http://www.cnn.com"],
               "condition":  "$X:Element( class == 'note', $Y:firstChild ) &&
                              ($Y.nodeName == 'ul')",
               "actions":[  "changeBackground($Y, 'blue')"   ]
}

For all elements of class note having as first child an ul, change the first child background color to blue.

I think its a quite cool add-on.

Resources:
JSON RuleS

GD Star Rating
loading...
Enriching Rich Internet Applications with Rule-Based Reasoning, 8.6 out of 10 based on 5 ratings

There are no related posts for this blog entry.


Comments
  • Alexander Zagniotov February 23, 2010 at 3:48 am

    Enriching Rich Internet Applications with rule-based reasoning: I came across a Firefox Add-On today by Matthias T… http://bit.ly/bru8Sf

    GD Star Rating
    loading...