Wednesday, December 12, 2007
Young guys are growing...
On Friday, Bruno Farina and Paolo Mauri are going to take their Master Degree in Computer Science. I'll be present and I have to say that this is a special event for me. I have been mentoring other students before... but the idea that this project become true and available open source is somehow awesome. I am talking about the JDPF project. Paolo and Bruno did a great job and this has been (hoping it is also going to be) a really good learning experience!
Wednesday, December 05, 2007
JDPF (Java Data Processing Framework)
JDPF (www.jdpf.org) is a framework for the definition of pipelines/nets for performing data analysis. I've been personally involved many times in the definition of algorithms for doing every sort of data processing (mainly in medical informatics). For this reasons, some time ago, we thought to create something that was able to foster re-usability of data analysis components. And I thought it should have been free, hopefully community driven.
The first implementation, two years ago, has been done from scratch and it was already giving an idea of the power of such an architecture (pipelines are not a news). Recently with the outstanding work of a couple of students (Bruno Farina and Paolo Mauri) and with the valuable help of Ezio Caffi we decided to move to OSGI technology. Working with OSGI has been really interesting and hard at the very beginning (at that time the documentation was really skinny). Now, JDPF is composed by a set of core bundles (that are taking care of net loading, validation and running) and a set of classes that can be used to develop new calculation blocks.
Right, because JDPF is an open architecture upon which you can run your own modules (or re-using the available ones). Let's say for instance that I need to clean some data. I can create my component (right now still editing an xml file, we are going to publish the visual builder soon) putting together the existing modules:
After the creation of these two xml files JDPF is ready to run on your data... no single line of code has been written by the user.
Of course if you need a new custom block, you need to implement the algorithm. In this case, JDPF helps you in focusing only on that, forgetting the validation and running aspects...
The first implementation, two years ago, has been done from scratch and it was already giving an idea of the power of such an architecture (pipelines are not a news). Recently with the outstanding work of a couple of students (Bruno Farina and Paolo Mauri) and with the valuable help of Ezio Caffi we decided to move to OSGI technology. Working with OSGI has been really interesting and hard at the very beginning (at that time the documentation was really skinny). Now, JDPF is composed by a set of core bundles (that are taking care of net loading, validation and running) and a set of classes that can be used to develop new calculation blocks.
Right, because JDPF is an open architecture upon which you can run your own modules (or re-using the available ones). Let's say for instance that I need to clean some data. I can create my component (right now still editing an xml file, we are going to publish the visual builder soon) putting together the existing modules:
- the generator able to load data from a file or location over the internet
- the range filter able to clip or simply erase all the data that are outside the specific, allowed range
- the serializer that is writing the results in a file
After the creation of these two xml files JDPF is ready to run on your data... no single line of code has been written by the user.
Of course if you need a new custom block, you need to implement the algorithm. In this case, JDPF helps you in focusing only on that, forgetting the validation and running aspects...
Monday, September 17, 2007
Creating Tabs Programmatically with Dojo 0.9 [2]
If you had a look of the previous post, you probably saw that it was working. But there was at least an error in there.
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
style="float: left; margin-right: 30px; width: 100%;
height: 100%; overflow: hidden">
<div id="tabs"></div>
</div>
I put a div with an id 'tabs'. This is a really bad idea. In fact, even if the tabs are displayed correctly, this is messing up for instance the access by javascript code to those tabs:
for(var i=this.getChildren().length-1; i>=0; i--) {
this.tablist.onCloseButtonClick(this.getChildren()[i]);
}
This code (in my personal tab widget that is an extension of the dojo tab widget - if I will have time I'll post it later), for instance, is not working, as the method getChildren() is returning always and only an element. To get over this problem, instead of declaring a div in the html, I create some divs dynamically, when needed:
var pane1 = new dijit.layout.ContentPane({ id: 'tab1', title: 'Test tab 1' }, dojo.doc.createElement('div'));
and the HTML code will become:
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
style="float: left; margin-right: 30px; width: 100%;
height: 100%; overflow: hidden">
</div>
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
style="float: left; margin-right: 30px; width: 100%;
height: 100%; overflow: hidden">
<div id="tabs"></div>
</div>
I put a div with an id 'tabs'. This is a really bad idea. In fact, even if the tabs are displayed correctly, this is messing up for instance the access by javascript code to those tabs:
for(var i=this.getChildren().length-1; i>=0; i--) {
this.tablist.onCloseButtonClick(this.getChildren()[i]);
}
This code (in my personal tab widget that is an extension of the dojo tab widget - if I will have time I'll post it later), for instance, is not working, as the method getChildren() is returning always and only an element. To get over this problem, instead of declaring a div in the html, I create some divs dynamically, when needed:
var pane1 = new dijit.layout.ContentPane({ id: 'tab1', title: 'Test tab 1' }, dojo.doc.createElement('div'));
and the HTML code will become:
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
style="float: left; margin-right: 30px; width: 100%;
height: 100%; overflow: hidden">
</div>
Thursday, September 13, 2007
Creating Tabs Programmatically with Dojo 0.9 [1]
I am in the process of moving one of the projects I am working on from Dojo 4.3 to Dojo 0.9. One of the things I need is to develop an extended version of the dijit.TabContainer. First, I need to be able to create the standard components programmatically.
I created a simple css file like this:
html, body, #main{
width: 100%; /* make the body expand to fill the visible window */
height: 100%;
overflow: hidden; /* erase window level scrollbars */
padding: 0 0 0 0;
margin: 0 0 0 0;
font-family: Verdana,sans-serif;
font-size: 11px;
}
#banner {
width: auto;
float: right;
margin: -1px -4px;
height: 20px;
position: absolute;
z-index: 100;
right: 10px;
top: 6px;
}
And here's the code to be inserted in the html head (pay attention in adjusting the dojo path according to your dojo installation):
<script type="text/javascript" src="../dojo09/dojo/dojo.js"
djConfig="parseOnLoad: true, isDebug: true"></script>
<script type="text/javascript" src="../dojo09/dijit/dijit.js"></script>
<style type="text/css">
@import "../dojo09/dijit/themes/soria/soria.css";
@import "../dojo09/dojo/dojo.css";
@import "css/extTabContainerTest.css";
</style>
The html body:
<body class="soria">
<div id="banner">
<button dojoType="dijit.form.Button" onclick="call_function">
Start Programmatic Test!
</button>
</div>
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
style="float: left; margin-right: 30px; width: 100%;
height: 100%; overflow: hidden">
<div id="tabs"></div>
</div>
</body>
Finally the script to be added again in the html head:
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.form.Button");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");
function call_function() {
var pane1 = new dijit.layout.ContentPane({ id: 'tab1', title: 'Test tab 1' }, dojo.byId('tabs'));
var pane2 = new dijit.layout.ContentPane({ id: 'tab2', title: 'Test tab 2', closable: true }, dojo.byId('tabs'));
var tabContainer = dijit.byId('mainTabContainer');
tabContainer.addChild(pane1);
tabContainer.addChild(pane2);
}
</script>
Now loading the page and pressing the button on the top right you'll see the two new tabs
I created a simple css file like this:
html, body, #main{
width: 100%; /* make the body expand to fill the visible window */
height: 100%;
overflow: hidden; /* erase window level scrollbars */
padding: 0 0 0 0;
margin: 0 0 0 0;
font-family: Verdana,sans-serif;
font-size: 11px;
}
#banner {
width: auto;
float: right;
margin: -1px -4px;
height: 20px;
position: absolute;
z-index: 100;
right: 10px;
top: 6px;
}
And here's the code to be inserted in the html head (pay attention in adjusting the dojo path according to your dojo installation):
<script type="text/javascript" src="../dojo09/dojo/dojo.js"
djConfig="parseOnLoad: true, isDebug: true"></script>
<script type="text/javascript" src="../dojo09/dijit/dijit.js"></script>
<style type="text/css">
@import "../dojo09/dijit/themes/soria/soria.css";
@import "../dojo09/dojo/dojo.css";
@import "css/extTabContainerTest.css";
</style>
The html body:
<body class="soria">
<div id="banner">
<button dojoType="dijit.form.Button" onclick="call_function">
Start Programmatic Test!
</button>
</div>
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"
style="float: left; margin-right: 30px; width: 100%;
height: 100%; overflow: hidden">
<div id="tabs"></div>
</div>
</body>
Finally the script to be added again in the html head:
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.form.Button");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");
function call_function() {
var pane1 = new dijit.layout.ContentPane({ id: 'tab1', title: 'Test tab 1' }, dojo.byId('tabs'));
var pane2 = new dijit.layout.ContentPane({ id: 'tab2', title: 'Test tab 2', closable: true }, dojo.byId('tabs'));
var tabContainer = dijit.byId('mainTabContainer');
tabContainer.addChild(pane1);
tabContainer.addChild(pane2);
}
</script>
Now loading the page and pressing the button on the top right you'll see the two new tabs
Saturday, July 28, 2007
Vocabularies for contact details
Here's a list of vocabularies that can be used to define people/groups/projects details:
- FOAF - Friend Of A Friend (Version 0.9 in RDF): it is the most popular vocabulary for representing people and groups details and relationships. One of the things I've always been curious about, is how FOAF models the names (name, given name, first name, family name, surname are all in the vocabulary in 'testing' status). An interesting reading about it can be found in the FOAF wiki. Moreover, FOAF includes also classes such as Project (defined as 'a collective endeavour of some kind' keeping in mind that a project can be not only collective but also individual.. uh?) and Document (which is loosely defined as class that represents those things which are, broadly conceived, 'documents'. An Image is a subclass of Document).
- CONTACT (Version 1.13 in RDF) by Tim Berners Lee. I don't know if you can find a 'human readable' resource on it. You probably have to read the rdf file. It is a quite complete vocabulary for defining all contact details of a person. You can find also properties like "nearest airport" or "mother tongue".
- VCARD (Version 3.0 in RDF). vCard is defined by RFC 2426 and this RDF representation provides equivalent functionality to its standard format.
- DOAP - Description Of A Project (website, rdf).
Thursday, February 08, 2007
An invited talk by Prof.Carole Goble on Google Video
In a recent meeting with Prof. Carole Goble we discovered, that in her keynotes, she's using a screenshot (around minute 12) coming from the prototype of the SWAN (Semantic Web Applications in Neuromedicine) application. Which is the project I am working on now for Mass General Hospital and Harvard Medical School.
Carole Goble is a Professor in the School of Computer Science. She is co-leader of the Information Management Group. She has a leading role in the Semantic Web, e-Science and the Semantic Grid. She applies technical advances in knowledge technologies and workflow systems to solve information management problems for Life Scientists and other scientific disciplines. She was co-PC chair of WWW2006 and is an EIC of the Elsevier’s Journal of Web Semantics.
She is the director of the large UK e-Science my Grid/Taverna programme of work for workflow based middleware for Life Scientists (http://www.mygrid.org.uk). My Grid uses semantic technologies for service and workflow discover and metadata management of workflow-based experiments. My Grid is now part of the Open Middleware Infrastructure Institute UK (http://www.omii.ac.uk); Carole is the chair of this Institute (of 40+ software developers), which has been funded to harden and support developments from the UK’s e-Science programme. She is the co-chair of the Open Grid Forum Semantic Grid Research Group, and the Technical Director of the EU Strep OntoGrid (http://www.ontogrid.net), which has developed the Semantic-Open Grid Service Architecture (S-OGSA) framework for Semantic Grids.
Subscribe to:
Posts (Atom)