Tomas's Blog | 

URL-identifiable Content with AJAX

Published by Tomas Vitvar on July 15, 2008 in Programming

AJAX (Asynchronous JavaScript and XML) is a great technology which allows for the rich user experience with web browsers. With help of AJAX the page does not need to be reloaded every time the user requests a new content from a server. Instead, only relevant parts of the page related to the user’s request can be fetched at the background. This leads to a better performance of web applications and response times.

Although dynamically fetched content using AJAX is very much useful and popular today, there are some drawbacks. One of those drawbacks is to maintain the application state: when the user requests the page using some URL, the server sends that page and browser displays it along with its valid URL. Then, the user performs an action fetching a new content from the server which in turn the AJAX script dynamically embeds in the original page. This changes the content of the page (state of the application), however, the URL identifying the resource currently loaded in the browser refers to the original page’s state. From obvious security reasons, it is not allowed to dynamically modify the URL using AJAX without changing the browser’s content.

One of the main problems related to this drawback is that it is not possible to refer to such dynamic pages, for example, you cannot pass a reference to such pages to others or you cannot bookmark a particular application state, unless you implement additional features which allow you to do so. Below I will show how I have solved this problem in my web site.

If you look at my list of publications (see the picture above), there are two tabs: “Selected” and “All Publications”. By clicking on a tab the AJAX script will dynamically fetch the content of the tab and embeds it in the original page with no change in the URL of the browser. To identify the new content, I have included a “link to this page” at the right-hand side of the page which the AJAX script modifies whenever the user clicks on a tab. The URL which identifies the new content is simple, it adds the query part to the URL in a form of “?t=tabId” where tabId is the id of the newly generated content.
The tabs are represented using HTML <ul> and <li> tags as follows.

1
2
3
4
<ul id="tabul">
	<li><a id="tab1" href="javascript:changeTab(...)">Selected</a></li>
	<li><a id="tab2" href="javascript:changeTab(...)">All Publications</a></li>
</ul>

Every tab is represented using the anchor element which points to a java script function which, when activated by clicking on the anchor element, changes the tab, i.e. it loads the tab content from the server, loads the content to appropriate element in the page and takes care of changing the URL of the “link to this page” anchor; for brevity this script is not shown here.

In order to correctly process the “Link to this page” URL with query parameter in the browser window, I have implemented a simple script which looks for a tab parameter and its value in the URL every time the page is loaded. When such parameter is found, the script automatically activates the appropriate tab. The code below shows this script.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
   <script event="onload" for="window" language="javascript">
      // parse the URL using the regular expression and get the tab id
      /^\?t=(.*)$/.test(window.location.search);
 
      // get the id of the element (tab) that the parameter is referring to
      e = document.getElementById(RegExp.$1);
 
      // if the element is found, evaluate the value of the href element's attribute
      if (e != null)
         eval(e.href);
      else
      // if the element is not found, evaluate the value of
      // the href attribute of the first tab in the list of tabs
      eval(document.getElementById('tabul').
         childNodes.item(0).childNodes.item(0).href);
   </script>

The script first parses the URL search string and gets the id of the tab element. If the tab element is found, it evaluates its href attribute (in other words, the script simulates a click on the tab’s anchor element). If the the tab element is not found, the script activates the first tab in the list. Using this approach, you can now easily refer to the content of any of the tabs, to my selected publications as well as to all publications.

URL identifiable content in AJAX is important when you want to bookmark the application state or pass a reference to others. The solution I have shown in this post is part of the system called Konamara that I develop for web site management. I plan to enhance the system with various features of Web 2.0 as well as Semantic Web hence building a test-bed for various research activities on which I work or plan to work. I plan to reveal its source code as an open-source in the near future.

Success of a PhD Endeavor

Published by Tomas Vitvar on July 11, 2008 in Ideas, Research

I have asked myself a question when observing several PhD students, those I have been supervising as well as friends or colleagues I have been working with: What are successful factors in completing a PhD degree? There is no ideal student who knows what he/she wants from the very beginning till the end, however, there are several aspects that a student should learn in order to be well prepared to work as a research in the future. Although a PhD degree is awarded based on a successful defense of a PhD thesis — a report on research results that a student completes during his/her studies — a PhD student should be active in the community, publish papers in conferences and journals, and, most importantly, do some innovative work. A PhD thesis is thus a report describing results of a PhD work which reflects the student’s life.

In my view, you as a PhD student should ideally:

  • Know what to do. Before you start a PhD you should already know what your PhD should be about. This does not mean that the idea should be clear, but the direction of your work should be clear. This is usually dependent on a research group that you are working with, however, frequent changes of topics is not a good sign.
  • Be at the right place. It is important that you are affiliated with a right group that works in the area of your PhD topic. A student alone is unlikely to do a valuable research as research areas are usually so broad that one cannot cover. Talking to professors, attending meetings, lectures, etc. is the most important thing in getting enough background knowledge for your thesis.
  • Have the experience. Depending on the research topic, it is sometimes important that you have some experience with “real life”. Research is about creating new methods, technologies, or techniques which can be used for better solutions of real problems. Lack of real-world experience might cause resulting work to be “off the grounds”.
  • Have a motivation. Doing a PhD is a long way to go. Getting familiar with the field, learning how to publish and write, finding out gaps to solve, etc. are all important aspects of your research. It is very much easy to lose the motivation on the way in many aspects. You may feel that what you do does not have any value. You may feel that you cannot do any innovative work as what you do has already been done by hundreds of others. You may feel “down” once you get rejection of your paper from a workshop or a conference. At some point in time you will understand that all this is about understanding of how to do research, how to publish and write.
  • Keep deadlines. It is easy to say “there is enough time, I will do it tomorrow” or “there will be another opportunity to publish my paper”. Postponing your deadlines is a start of losing your way in doing your research and, most importantly, completing your thesis. External deadlines such as those set by conferences or journals are very important as you cannot change them, so keeping those always bring you a step forward.
  • Know your supervisor. A good supervisor is one of the most important things in your PhD. A supervisor is an expert in your field and gives you feedback to your intermediate results and teaches you the technical quality of your work. He/she should also provide you with the access to the community, that is, he/she should introduce you to people, research groups, and provide you with publishing opportunities (well-established conferences, journals, magazines etc.). The supervisor is also usually busy as he/she might have more students, managing more projects, etc. Despite what your supervisor does or does not, it is the person who approves your work and eventually your thesis. So, it is important that you learn how to deal with your supervisor, i.e. what are his/her requirements and what you have to do to fulfill those requirements.
  • Have enough time. Students are usually young, knowledgeable and enthusiastic so it is easy to commit students to too many things. You can end up teaching, working in projects, managing projects, organizing conferences, meetings, or doing some evangelism of your research field. Although all of these are very much important tasks that are certainly very important to learn, however, you should keep them in line of your original PhD work while at the same time not committing to too many of them as they can easily distract you from your work.

I have also seen many students who started their PhD from several reasons. The first group of students just want to extend their student life - they feel to be still “young” to start a “serious” life while they want to stay in touch with the university, with student style of living. The second group of students are naturally born theoreticians and researchers who want to push their idea forward, make it right and make it real. The third group of students love expressing themselves in front of some audiance, they love to teach and explain stuff to others. The fourth group of students want to get their degree as they think it will bring them an advantage in finding a good position in the future. There is certainly a big overlap between these groups, however, a common thing to all is that as a PhD student you are supposed to learn what the research is about so that you are well prepared to work as a researcher in the future.

New Version of my Website

Published by Tomas Vitvar on April 25, 2008 in Personal, Programming

I have recently updated my website with some new features. First of all, I have migrated the whole website to a new location and at the same time I have rewritten its source in the language and using the tool called Konamara which I develop for website content management and publishing (there is currently two websites maintained by Konamara, my personal one and the CMS WG website).

Following are the new features of the website:

  • Wordpress blog is fully and seamlessly integrated with website look with recent blog posts displayed on the entry page.
  • Events which I maintain separately in the Google calendar are displayed on the website. Whenever the new event appears in the calendar, the list of events is updated on the website.
  • Integrated Google search engine using Google AJAX Search API to search the content of my website.
  • List of my publications and presentations is generated from the XML of all my publications. Konamara can easily generate selected publications (those with higher rank) and all publications on separate tabs.
  • Some AJAX features such as tabs for “selected” and “all” publications.

The major driver behind Konamara is to allow ease of use of website development powered by Web 2.0 features such as rich user experience, service mashups, etc. I also plan to use it as a basis for semantic service mashups and incorporate some of the ongoing work in semantic web services. I will provide some more details about Konamara later in my blog.

WSMO-Lite at ESWC 2008

Published by Tomas Vitvar on April 25, 2008 in Publications, Research

WSMO-Lite, which describes a lightweight service ontology and annotation mechanism for Web Service Description Language (WSDL), has been accepted for the European Semantic Web Conference 2008 (you can download the paper here).

WSMO-Lite which is currently under the review process in the CMS WG, has been co-authored by Tomas Vitvar, Jacek Kopecky, Jana Viskova and Dieter Fensel. In the paper we define the service ontology describing constructs for services’ information model (ontology) as well as functional services’ descriptions (i.e., categorization, conditions and effects). Using the W3C Semantic Annotations for WSDL and XML Schema (SAWSDL), we define a mechanism for annotation of various WSDL components with WSMO-Lite semantic descriptions. In addition, we define the algorithm to derive the behavioral service descriptions in a form of Abstract State Machines (ASM) from functional annotations (i.e. conditions and effects) of WSDL interface operations and we outline a usage of semantic annotations for a number of services’ use tasks such as service discovery, composition, selection, mediation, etc.

Time to Move on…

Published by Tomas Vitvar on March 12, 2008 in Personal

It has been 3 years and 4 months I have arrived to Ireland and started working with Semantic Web Services group in DERI. I was initially hired by Christoph Bussler, the co-founder of DERI Galway, and since then worked with Stefan Decker, Dieter Fensel, and Manfred Hauswirth. I contributed to many projects and initiatives including Knowledge Web, SemanticGov, Lion, WSMO, SAWSDL, etc. Ireland will always mean a special place for me and my family as this was the place where I started family life and where my two children Tomas and Klara were born. Ireland will be the second home for us.

With the beginning of March, I moved over to Innsbruck, Austria where I joined the group of Dieter Fensel at the Semantic Technology Institute (STI2). This is not a big change since I know almost all people here from existing and past projects in DERI. In STI2, I will lead the group on Service Web Intelligence working on lightweight semantic service models for WSDL and RESTful services as well as on techniques to crawl and integrate services on the Web. All these activities will be mainly focused around the new EU FP7 project SOA4ALL where we will develop the technology for the large-scale SOA for the Web.

RESTful Services and Semantic Descriptions

Published by Tomas Vitvar on January 10, 2008 in DERI, Ideas, Projects, Research

Today, we had a WSMO phone conference where we discussed the semantic annotations for RESTful services. I have presented the work done by Amit Sheth and his group on SA-REST (see the presentation below and my previous post).

RESTful services are usually described in a free-text form in HTML while service descriptions (i.e. service contracts) are not explicitly defined. In addition, when creating Web 2.0 applications (mashups), the problem with integration of data produced or consumed by these services is still a remaining issue. A developer must either implement a mediator or change the implementation of a service (if possible) to conform to integration needs. SA-REST introduces a novel approach to annotation of RESTful service description in a HTML using microformats. Semantic descriptions can significantly improve the data integration and automation of service lifecycle. SA-REST proposes to use W3C recommendation where possible, thus the annotation mechanism is based on RDFa and GRDDL

SA-REST, however, does not define any forms of semantic descriptions but assumes that such descriptions will be reused. In this respect, SA-REST is an analogous approach to semantic annotations of WSDL using SAWSDL. In the WSMO WG, we have recently done the work on WSMO-Lite (see our paper in ECOWS 2007 conference) which defines a minimal lightweight service ontology and which can be used for annotations of WSDL services by means of SAWSDL. This is the new approach to augmenting existing service descriptions already available (within or outside of enterprises) in a bottom-up fashion. However, it is important to note that WSMO-Lite is independent on WSDL (and SAWSDL). In this respect, we plan to use WSMO-Lite as a concrete service ontology for annotation of RESTful services, and possibly build on top of SA-REST. This will introduce the second annotation mechanism for WSMO-Lite allowing to use both, WSDL and RESTful services as mechanisms for invocation and communication. We call this annotation mechanism MicroWSMO.

The MicroWSMO together with WSMO-Lite are the core specifications of the upcoming EU funded project SOA4ALL.The goal of this project is to enable SOA architectures in the large-scale Web environment where semantics will play the central role in service provisioning, automation, and scalability.

Linux Freedom — Basis for Integrated Home Building on Open Source

Published by Tomas Vitvar on January 3, 2008 in Ideas, Linux

I have recently purchased a Linksys WRTSL54GS router, and installed a third-party firmware called OpenWrt.

It is really amazing as I actually got almost a fully-fledged linux running in a very small box (see for example the packages available for white russian distribution of OpenWrt). In fact, I was always thinking about having a linux server for my home network management, however, I did not like the idea of having a big server (due to the power consumption, space and possibly noise). I have deliberately chosen WRTSL54GS as it is quite powerful (comparing to other devices in the area): 8MB of flash and 32MB of RAM, it has a USB port and is only around $100. The only drawback is that Linksys does not sell it in Europe so I had to get one on eBay from the US directly. With shipment costs it was something around 100€. An alternative would be for example ASUS, FREECOM, Siemens, etc., however they are usually more expensive, less powerful or they include HDD already. There is also an interesting book Linksys WRT54G: Ultimate Hacking describing various linux distributions for various Linksys devices as well as hardware hacking tips and tricks. This is a must have too if you plan to do more than just clicking on router’s management web interface.

So may hands are free to configure my SOHO network directly using iptables, cron, samba, and other great stuff which OpenWrt offers. With more devices on my network it will be even more fun to manage all…

With the need for integration of various data sources from various devices on the SOHO network, there is a joint initiative between DERI Galway and EPFL called semantic reality. The idea is to develop a technology for seamless integration of various devices (sensors) in ad-hoc networks. Although I am not personally involved in this project, I believe that linux-based firmware provides a great flexibility for functionality — the basis for integrated home building on open source software.

Knowledge Web Project Comes to its End…

Published by Tomas Vitvar on December 14, 2007 in DERI, Projects, Research

Knowledge Web project, a four-year EU R&D project, comes to its end by the end of this year. The project forms the Semantic Web community in Europe while contributing to the cutting edge research and development of semantic technologies along the lines of education, research and industry. My major contributions were in the research area with focus on the semantic web and its adoption by web services enabling automation of services tasks. Over the past three years, I worked as the leader of these activities and, thanks to the project, we were able to make a significant contribution in the semantic web services community. Here are our major achievements:

  • Development of the WSMO, a service ontology.
  • Development of the WSML, a language for Semantic Web Services,
  • Development of the WSMX, a middleware system and architecture for Semantic Web Services execution;

Along the above lines, we contributed to the development of the SWS Challenge, a methodology and testbed for the Semantic Web Services as well as solutions for the challenge scenarios, standardizations in OASIS (SEE TC, Semantic Execution Environment Technical Committee), and standardizations in W3C (SAWSDL, Semantic Annotations for WSDL and XML Schema) and published over 60 papers in conferences and journals.

With the end of the project, these activities will not come to the end. We will further continue developing the lightweight ontology for Semantic Web Services (known as WSMO-Lite), services mashups powered by the semantic technologies and related services tasks. There is a number of follow up projects such as SOA4ALL, Service Web 3.0, etc. where all these activities will find its place.

SA-REST: Semantic Annotations for RESTFul Services

Published by Tomas Vitvar on November 8, 2007 in Ideas, Research

IEEE Internet Computing magazine in its November/December issue published the article authored by Amit Sheth et al. entitled SA-REST: Semantically Interoperable and Easier-to-Use Services and Mashups. They discuss how to enable semantic annotations for RESTful services in an analogical way as SAWSDL does (see my previous post and article on SAWSDL). They define a very simple mechanism to mark input, output, lifting, lowering and fault in the REST specification usually available through some XHTML page and by using RDFa and GRDDL. The main point is that since REST providers usually define the services in a textual form on the web there is no explicit and formal form for definition of input, output or fault schema for messages. SA-REST introduces a micro-format style to their semantic description as part of the REST service specification embedded in a XHTML page.

I only wonder why authors define input and output keywords for SA-REST and do not adopt SAWSDL modelReference. SAWSDL modelReference is more generic annotation you can use for any kind of service description including information model (like they do with input and output) as well as functional (capability such as preconditions and effects) or non-functional descriptions. In my opinion, it would also be handy that the annotation framework is the same as the one introduced by SAWSDL as it would allow to work with independent semantic layer on the top of technologies like WSDL and REST.

What I like in this work is the way how semantic annotations for services can be done using micro-format style to definition of meta-data about resources (in this case XHTML describing a RESTful service). They use RDFa and GRDDL for that purpose. This approach very much complements our work on WSMO-Lite and it is inline with what we plan to further introduce in our conceptual models for services around WSMO. This will all happen in the EU FP7 project SOA4ALL and W3C Incubator Group called SWS-Testbed (Amit contributes to this group with semantic annotations for REST too).

SAWSDL: Semantic Annotations for WSDL and XML Schema

Published by Tomas Vitvar on November 2, 2007 in DERI, Publications, Research

In November/December, IEEE Internet Computing magazine published our article on the Semantic Annotations for WSDL and XML Schema (SAWSDL). In this article we summarize the results of the W3C SAWSDL Wokring Group.

SAWSDL is the first step in W3C toward standardizing technologies for Semantic Web services. As a standard, SAWSDL provides a common ground for the various ongoing efforts toward SWS frameworks, such as the Web Service Modeling Ontology (WSMO) and the OWL-based Web Service Ontology (OWL-S). SAWSDL extends the major Web service technology WSDL with pointers to semantics that are crucial for achieving automation.

Newer Posts »