Sunday Mar 16, 2008

Ajax World New York 2008 - This Week



Sun Microsystems is a Gold sponsor of Ajax World East 2008. The event kick starts in New York City tomorrow and you can see the complete agenda here.

From Sun speakers, you'll hear how jMaki, GlassFish Comet, GlassFish and NetBeans provide an easy-to-use and industry-grade platform to develop and deploy Rich Internet Applications. Here is the list of Sun sessions:

Here is my wish list of sessions that I'd like to attend:

Tuesday, Mar 18
Picking the Right Technology for Rich Internet Applications Track 5 2:00 - 2:45pm
Ajax Applicability: When should Ajax be used ? Track 2 2:50 - 3:35pm
RIA Approach for Web 2.0 Development using jMaki Track 3 3:40 - 4:25pm
Wednesday, Mar 19
Opening Keynote: Can we fix the Web ? Opening Keynote 7:30 - 8:20am
Think Fast: Accelerate Ajax Development with Appcelerator Session 2 8:25 - 9:15am
REST and Ajax Reconciled Track 6 9:20 - 10:05am
Enterprise Comet: Real-Time or Real-Time Web 2.0 ? Session 4 11:00 - 11:30am
jMaki as an Ajax Mashup Framework Session 5 11:35 - 12:05pm
Understanding the top Web 2.0 Attack Vectors Track 3 12:10 - 12:55pm
Building Web 2.0 Applications with Project Zero Track 3 2:05 - 2:50pm
Ajax and Social Computing for the Enterprise Session 7 2:55 - 3:30pm
Aptana IDE: Your unfair advantage for Ajax etc. Track 3 5:20 - 6:05pm
SYS-CON.TV Power Panel: The Business Value of RIAs Session 10 6:10 - 6:55pm
Welcome Reception 6:30 - 8:30pm
Thursday Mar 20
RIA Adoption in 2008: Risks, Rewards, Challenges & Opportunity Opening Keynote 8:00 - 8:50am
Ajax and Rails Track 6 8:55 - 9:40am
Now Playing: Desktop Apps in the Browser Session 3 9:45 - 10:15am
DreamFace: The Ultimate Framework for Creating Personalized Web 2.0 Mashups Session 4 11:55 - 12:25pm
Securing Ajax Development and Testing Track 6 12:30 - 1:15pm
Asynchronous Ajax for Revlutionary Web Applications Track 3 2:15 - 3:00pm
Saving your Investment: Transforming J2EE Applications into Web 2.0 using GWT Track 4 3:05 - 3:50pm
Building Scalable Ajax Applications using GlassFish Comet Track 4 5:30 - 6:15pm
SYS-CON.TV Power Panel: What Lies Beyond AJAX? Session 9 6:15 - 7:00pm

It's only a wish list cause I'll be spending time at Sun booth in the Expo Floor as well and this is New York City ;)

See ya there!

Technorati: conf sun ajaxworld jmaki glassfish mashups comet netbeans ria

Sunday Aug 05, 2007

Screencast #Web5: Creating Mashups with jMaki - Mashing up the Maps

This second screencast of the Creating Mashups with jMaki Series show how jMaki allows to embed and interact with map widgets in your application.

This screencast shows how to creates two mashups - the first one is where a city location is keyed from name and displayed in map widgets from two different toolkits, and the second one shows how to extract data from Craig's List, process it using jMaki filters and then display the relevant information in a map.

The NetBeans IDE is used for tooling and the jMaki-enabled Web application is deployed on GlassFish.

Enjoy it here!

The key message is jMaki + NetBeans IDE + GlassFish provides a complete platform for creating and deploying powerful mashups, quickly and effectively!

Technorati: jmaki mashups netbeans screencast glassfish jmakimashups

Tuesday Jul 24, 2007

Total Running Mileage Mashup with jMaki

I updated the running log filter to the one given below. This allows me to generate the total running mileage of all the weeks. The changes are highlighted in this color:

jmaki.namespace("jmaki.filters");

myDays= ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
oneDay = 24\*60\*60\*1000;

function addDays(myDate, days) {
    return new Date(myDate.getTime() + days\*24\*60\*60\*1000);
}

function formatDate(myDate) {
    var dateString = String (myDate.getDate());
    dateString = (dateString.length == 1 ? "0" + dateString : dateString);
    return (myDate.getMonth()+1) + "/" + dateString + "/" + myDate.getFullYear();
}

// convert Running blog feed to the jMaki table format
jmaki.filters.tableModelFilter2 = function(input) {

    var startDate = new Date();
    startDate.setFullYear(2007,1,12); // Feb 12, 2007
    var _columns = [
        {title: 'Title'},
        {title: 'Day of The Week'},
        {title: 'Date'},
        {title: 'Mileage'}
    ];
    var _rows = [];

    var totalMileage = 0;
    for (var _i=0; _i < input.channel.items.length;_i++) {
        var weekNumber = input.channel.items[_i].title.split(' ')[1];
        var weekStartDate = addDays(startDate, (weekNumber-1)\*7);
        var desc = input.channel.items[_i].description;
        desc = desc.slice(0, desc.lastIndexOf("</span"));
        var spanArray = desc.split("<span");
        for (var _j=1; _j < spanArray.length; _j++) {
            var span = spanArray[_j].split("</span>")[0];
            if (span.search(/run/) == -1)
                continue;

            var runDay = myDays[_j-1];
            var runDate = addDays(weekStartDate, _j-1);

            mileageInt = parseInt(dayMileage);
            totalMileage += mileageInt == "nan" ? 0 : mileageInt;
            var row = [
                'Week ' + weekNumber,
                runDay,
                formatDate(runDate),
                span.split(': ')[1]
            ];
            _rows.push(row);
        }
    }

    var summaryRow = [
        'Final Week',
        'Last Day',
        formatDate(new Date()),
        totalMileage
    ];

    _rows.push(summaryRow);
    return {type : 'jmakiModelData', columns : _columns, rows : _rows};
}

The updated web page looks like given below. Notice the first row of the table gives the total mileage:

Technorati: jmaki mashup running web2.0

Monday Jul 23, 2007

Screencast #Web4: Creating Mashups with jMaki - Display RSS feed in jMaki Widgets

jMaki provide a flexible framework to create mashups very easily. Today, I'm starting a series of screencasts that will focus on this aspect of jMaki.

The first one in the series is a very simple mashup that pulls RSS feed from a blog entry and display it in two different widgets, without any extra effort. The NetBeans IDE is used for tooling and the jMaki-enabled Web application is deployed on GlassFish.

Enjoy it here!

The key message is jMaki + NetBeans IDE + GlassFish provides a complete platform for creating and deploying powerful mashups, quickly and effectively!

Technorati: jmaki mashups netbeans screencast glassfish jmakimashups

Wednesday Jul 18, 2007

jMaki at Mashup Camp Report

Thursday (Jul 19) is the last day of Mashup Camp. Greg gave a jMaki session on Monday and today Carla helped staff the tabletop and I participated in Speed Geeking. This was my first experience and lot of fun to give a 5-minute pitch to bunch of participants. Here is the 5-minute pitch that I presented:

  • jMaki is a lightweight framework to create Ajax-enabled Web 2.0 applications.
  • jMaki - "j" stands for JavaScript and "Maki" is to wrap in Japanese (as in Sushi).
  • Toolkits: It allows to create native widgets and provide wrappers over widgets from multiple toolkits such as Yahoo, Dojo, Script.aculo.us and others.
  • Platform: jMaki widgets can be embedded in Java Server Pages (JSP), Java Server Faces (JSF), Phobos, PHP and Ruby-on-Rails applications.
  • Tools: jMaki-enabled applications can be easily created using NetBeans IDE, Eclipse and Ant-based command-line tasks.
  • The biggest benefit of jMaki is that it provides standard data models allowing developers to seamlessly change the underlying toolkits (for a better look-and-feel) and also shields developers from changes in data models in future version of these toolkits.
  • jMaki allows to create powerful mashups easily. Some of the powerful mashups that can be created are described here. Stay tuned for detailed blog entries and screencasts showing how to create them.

Julian @ Sun tabletop

Arun @ Sun tabletop

Jeremiah helping a customer @ Sun tabletop


Carla & Greg @ Sun tabletop

Speed Geeking Schedule

Unconference Event Planner

Technorati: jmaki mashup mashupcamp mashupu sun conf

jMaki Filters & Runners Mashup

jMaki allows filter to be configured on a widget. A filter is a JavaScript code fragment that performs data conversion from one object format to another. This allows a widget to consume data from multiple services outside the application domain and transform the received data into a standard data model.

There are several pre-defined filters in system-glue.js, for example jmaki.filters.tableModelFilter, that converts the data from a common data format to DataTable standard data model. This is explained in detail below:

  • Configure a DataTable widget to extract data from an RSS feed (defined in xhp.json). This is done by replacing value="..." attribute with service="/xhp?id=rss".
  • XML response comes back in various RSS format (RDF / Atom).
  • A stylesheet (rss.xsl) is already configured in 'xhp.json' to process all RSS to a common JSON data format "dataType" : "jMakiRSS".
  • A pre-defined filter, jmaki.filters.tableModelFilter (defined in 'system-glue.js' and wired in 'component.js'), is configured on all DataTable widgets. This filter understands the common data format and convert it to the new standard format described at: http://wiki.java.net/bin/view/Projects/jMakiTableDataModel.

How to add a New Filter ? A new filter can be defined in 'glue.js'. This filter can be configured on a widget with the following syntax:

 <a:widget name="yahoo.dataTable"
                 args="{filter : 'jmaki.filters.MyCustomFilter'}"
                 service="/xhp?id=rss" />

Each filter consumes data from a specific service and is widget agnostic. This allows the same filter to be used with multiple widgets, for example the following fragment shows how the filter mentioned above can be used with Dojo DataTable:

 <a:widget name="dojo.dataTable"
                 args="{filter : 'jmaki.filters.MyCustomFilter'}"
                 service="/xhp?id=rss" />

Here is a real-life filter that pulls the RSS feed from my running log, the 'rss.xsl' stylesheet (configured in xhp.json) converts the RSS feed into the common "jMakiRSS" format and then this filter processes the data to generate a running log by creating a row for each day of the week.

jmaki.namespace("jmaki.filters");

myDays= ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
oneDay = 24\*60\*60\*1000;

function addDays(myDate, days) {
    return new Date(myDate.getTime() + days\*24\*60\*60\*1000);
}

function formatDate(myDate) {
    var dateString = String (myDate.getDate());
    dateString = (dateString.length == 1 ? "0" + dateString : dateString);
    return (myDate.getMonth()+1) + "/" + dateString + "/" + myDate.getFullYear();
}

// convert Running blog feed to the jMaki table format
jmaki.filters.tableModelFilter2 = function(input) {

    var startDate = new Date();
    startDate.setFullYear(2007,1,12); // Feb 12, 2007
    var _columns = [
        {title: 'Title'},
        {title: 'Day of The Week'},
        {title: 'Date'},
        {title: 'Mileage'}
    ];
    var _rows = [];

    for (var _i=0; _i < input.channel.items.length;_i++) {
        var weekNumber = input.channel.items[_i].title.split(' ')[1];
        var weekStartDate = addDays(startDate, (weekNumber-1)\*7);
        var desc = input.channel.items[_i].description;
        desc = desc.slice(0, desc.lastIndexOf("</span"));
        var spanArray = desc.split("<span");
        for (var _j=1; _j < spanArray.length; _j++) {
            var span = spanArray[_j].split("</span>")[0];
            if (span.search(/run/) == -1)
                continue;

            var runDay = myDays[_j-1];
            var runDate = addDays(weekStartDate, _j-1);

            var row = [
                'Week ' + weekNumber,
                runDay,
                formatDate(runDate),
                span.split(': ')[1]
            ];
            _rows.push(row);
        }
    }

    return {type : 'jmakiModelData', columns : _columns, rows : _rows};
}

 

This filter can be configured on Dojo table as:

 <a:widget name="dojo.dataTable"
                 args="{filter : 'jmaki.filters.tableModelFilter2'}"
                 service="/xhp?id=rss" />

The filter expects each blog entry in the following format:

<span class="rest">Mon: Rest</span><br>
<span class="run">Tue: 8.5 miles</span><br>
<span class="run">Wed: 7 miles</span><br>
<span class="run">Thu: 7 miles</span><br>
<span class="rest">Fri: Rest</span><br>
<span class="rest">Sat: Rest</span><br>
<span class="run">Sun: 20 miles</span>

It then creates a new row in the DataTable model for each entry enclosed between <span>s and parses the content to extract mileage for a particular day. The web application with a Dojo and Yahoo DataTable configured to use this filter looks like:

Technorati: jmaki mashups running web2.0

Sunday Jul 15, 2007

jMaki @ Mashup Camp

Sun Microsystems is a proud sponsor of Mashup Camp. This is a Unconference-style event that brings together the software mashup community together face-to-face.
 

The event, at Computer History Museum, Mountain View, CA, consists of two sub-events - Mashup University (Jul 16-17) and Mashup Camp (Jul 18-19). We will be there demonstrating some of the cool and powerful mashups created using jMaki.

Here are the details:

  Mashup University Mashup Camp
Date Jul 16-17 Jul 18-19
Register here here
Schedule Class Schedule Who's Coming
Per Person
Fee
$35: developer
$495: Solution Providers
$995 public companies
$35: developer
$495: Solution Providers
$995 public companies
Exempt for MashU participants, sponsoring companies and developers with hardships

Follow the blog (although not updated since Jun 26). I'll do a follow up entry after the event.

Technorati: jmaki mashup mashupcamp mashupu sun conf

About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today