<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Semantics</title>
	
	<link>http://s139459221.onlinehome.fr/MichaelSokol</link>
	<description>A knowledge-driven internet</description>
	<lastBuildDate>Tue, 09 Nov 2010 15:02:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Semantics" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="semantics" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>TopDown query of Linked Data</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=84</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=84#comments</comments>
		<pubDate>Tue, 09 Nov 2010 15:02:17 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=84</guid>
		<description><![CDATA[Recently, I was reading an article written for this year’s ISWC that takes place in Shanghai. It looks really cool by the way &#8211; I’m trying to follow it on Twitter, but it seems like they have some problems to &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=84">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently, I was reading an article written for this year’s ISWC that takes place in Shanghai. It looks really cool by the way &#8211; I’m trying to follow it on Twitter, but it seems like they have some problems to access it with the “big firewall”. The article “<a href="http://iswc2010.semanticweb.org/accepted-papers/152">Linked data Query Processing Strategies</a>” present three query strategies for retrieving data from Linked data, as opposed to a single source.</p>
<p><a href="http://semweb.tumblr.com/post/1525356704/topdown-query-of-linked-data">Read more</a></p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=84</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Rubyist’s instant grasp on semantic web</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=81</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=81#comments</comments>
		<pubDate>Mon, 01 Nov 2010 20:25:05 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Semantic Web]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=81</guid>
		<description><![CDATA[Recently, I have been working on a a guide to semantic web using Ruby. It&#8217;s only an introduction, and it&#8217;s there to help the rubyist out there who doesn&#8217;t really know about semantic web but want to give it a &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=81">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently, I have been working on a a guide to semantic web using Ruby. It&#8217;s only an introduction, and it&#8217;s there to help the rubyist out there who doesn&#8217;t really know about semantic web but want to give it a shot.</p>
<p>I called it &#8220;<a href="http://s139459221.onlinehome.fr/Semantic_web_guide/">A Rubyist&#8217;s instant grasp on semantic web</a>&#8220;. I&#8217;m still working on it, but it would be nice to have some comments. I feel like it&#8217;s not as fun to work on something on our own, so that&#8217;s why I decided to share it at this early stage.</p>
<p>Ok I&#8217;m now gonna merge this blog to another plateform. Wish me luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby gem to handle SPARQL queries over HTTP</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=71</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=71#comments</comments>
		<pubDate>Tue, 19 Oct 2010 13:07:15 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Semantic Web]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=71</guid>
		<description><![CDATA[Being new to Ruby and the open-source world, I wanted to immerse myself with a project, a useful one &#8211; at least for me &#8211; to get a feeling of what it&#8217;s like. Because I&#8217;m deeply interested in the semantic &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=71">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Being new to Ruby and the open-source world, I wanted to immerse myself with a project, a useful one &#8211; at least for me &#8211; to get a feeling of what it&#8217;s like. Because I&#8217;m deeply interested in the semantic web, and in the beauty of the ruby language, I&#8217;ve decided to create a library that handles SPARQL transmissions to end-points, over HTTP. The main idea was for me to understand the different aspects of building a library in Ruby, but also to learn and discover syntax tricks and of course the process that leads to the creation of a gem.</p>
<p>Also, I created my Github account where I had my first encounter with, well, git. I come from the world of Subversion, and yes, it is definitely different. It has its own strength and I like the underlying simplicity behind the git philosophy, where we only deal with &#8220;snapshots&#8221; (which IS confusing when you are used to svn).</p>
<p>If I&#8217;m posting this article it&#8217;s mainly because I would like to get feedback form experienced Rubyist concerning the coding, the api, the github aspect, all of that.</p>
<p>The github page for the library is <a href="http://github.com/mikaa123/SparqlTransmission">http://github.com/mikaa123/SparqlTransmission</a></p>
<p>I will probably talk about the library in more details in a few days, as the development goes on.</p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=71</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Café com Browser, Semantic web conference in Brazil</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=63</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=63#comments</comments>
		<pubDate>Fri, 15 Oct 2010 15:32:54 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=63</guid>
		<description><![CDATA[I don&#8217;t know about you, but one of my pleasures in the morning is making a hot coffee. You know, when you go to the kitchen, turn on the boiling machine, take out a big mug where you put lots &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=63">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about you, but one of my pleasures in the morning is making a hot coffee. You know, when you go to the kitchen, turn on the boiling machine, take out a big mug where you put lots of coffee in it, some sugar and add the steamy hot water. Then I like to take this mug with me and smell the roasted, smashed, coffee beans mixed with water. What a great way to start the day.</p>
<p>Then, I usually check what&#8217;s happening in my little Internet &#8220;microcosm&#8221;. What I came across this morning was a tweet from W3C. It was announcing a webcast called &#8220;<a href="http://www.w3c.br/cafecombrowser/">Coffee with Browser</a>&#8220;, that talks about Semantic web. Wow. W3C, Coffee, Semantic web, all in the same sentence? Well yea, it does make sense, but come on! Coffee! I was drinking coffee! Those guys are genius.</p>
<p style="text-align: center;"><a href="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/10/Capture-d’écran-2010-10-15-à-11.29.56.png"><img class="size-full wp-image-65 aligncenter" title="Capture d’écran 2010-10-15 à 11.29.56" src="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/10/Capture-d’écran-2010-10-15-à-11.29.56.png" alt="" width="356" height="259" /></a></p>
<p style="text-align: center;"><em>Ivan Herman at Coffee With Browser conference about Semantic Web</em></p>
<p>This webcast featured a presentation by Ivan Herman, the lead of the Semantic Web Activity at the World Wide Web Consortium. It was held in Sao Paulo, Brazil. It was an introduction on the different set of practices and standards that form the Semantic web. When I got on the webcast, he was talking about the Resource Description Framework, or RDF, one of the most basic layer. What&#8217;s interesting is to realize than at the end, it all comes down to RDF. If you want to open your data to the semantic web world, all you need to provide is a usable RDF dataset. Of course, on top of that, there are a large panel of other standards, because the semantic web isn&#8217;t about technologies, it&#8217;s not meant to be relying on a technology, it&#8217;s meant to rely on standards. Take RDF, it&#8217;s not a technology: it&#8217;s an abstract language that uses the graph theory to describe data. It is not an implementation. RDF/XML is an implementation.</p>
<p>From this webcast I&#8217;ve also learnt that companies like Oracle are very interested about semantic web, and that, if I understood correctly, could provide ways to store RDF and query it using SPARQL? That&#8217;d be very promising. It has also been said that Google is involved, and here&#8217;s a tip for all you SEO fanatics: supposedly, adding RDFa &#8211; which is only a small micro-format you can wrap your html data in &#8211;  to your pages increases your position on the search engine&#8230; supposedly.</p>
<p style="text-align: center;"><a href="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/10/Capture-d’écran-2010-10-15-à-11.28.47.png"><img class="size-full wp-image-66 aligncenter" title="Capture d’écran 2010-10-15 à 11.28.47" src="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/10/Capture-d’écran-2010-10-15-à-11.28.47.png" alt="" width="357" height="241" /></a></p>
<p>What I loved was one example of an &#8220;unexpected&#8221; use of linked-data. It is called the Newspaper Club. The idea is to provide an actual newspaper for small neighborhood. With newspaper club you can create a newspaper for, let say, everything that happens within 3 blocks of your house. The newspaper is then printed, and you can give it to your neighbors. What&#8217;s fun and surprising, is that you won&#8217;t need to write anything in the newspaper: it&#8217;ll be created automatically. What happens is that it uses the data provided by the english government, which is huge, and &#8211; using the defined vocabularies &#8211; extracts facts about your neighbor, such as the newest grocery store, or what event is going on this week. Things like that.</p>
<p>There&#8217;s something I&#8217;d like to mention, though. Ivan Herman said, as a conclusion, that we still have a &#8220;long way to go&#8221; for the semantic web. I don&#8217;t believe this. I think it&#8217;s usable TODAY. Not only can you ALREADY (please forgive me for the capslock) use a HUGE amount of linked-data, but it&#8217;s EASY to publish your OWN! We have the standards, we have the technologies. Yes, it&#8217;s evolving, but I&#8217;m pretty sure you can already publish some RDF file that uses solid, trusted ontologies, and those RDF files will still be usable in a few years. Even easier: just add RDFa description to your html pages! It&#8217;s as simple as that. Seriously. You don&#8217;t need to re-build your web-site from scratch: you can just add description to your data, little by little.</p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=63</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ruby meta-programming and some diagram</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=53</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=53#comments</comments>
		<pubDate>Tue, 12 Oct 2010 13:08:39 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=53</guid>
		<description><![CDATA[To start with, I&#8217;d like to say that I just set up a new twitter account (_ms123). Oh and also, I&#8217;d like to mention something I&#8217;m personally very proud of. Visit-IT, one of my project received an award at my &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=53">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To start with, I&#8217;d like to say that I just set up a new twitter account (<a href="https://twitter.com/_ms123">_ms123</a>). Oh and also, I&#8217;d like to mention something I&#8217;m personally very proud of. Visit-IT, one of my project received an award at my school (ECE) last month, <a href="http://www.ece.fr/ecole-ingenieur/ppe-awards-2010-les-meilleurs-projets-ingenieurs-recompenses-lors-dune-ceremonie-officielle-au-cnam/">here</a> is the article. You can watch the video under &#8220;Visit-IT&#8221;, or simply there: <a href="http://www.youtube.com/watch?v=1yTat6PTUCo">Visit-IT Video</a> (notice how I&#8217;m doing Search Engine Optimization here)</p>
<p>So this post addresses all of you trying to understand ruby meta-programming. It&#8217;s not a tutorial, and I&#8217;m not going to explain how it works, since there are a lot of amazing, well-written resources that do it perfectly. One of my personal favorite is <a href="http://www.wikyblog.com/AmanKing/Metaclass_in_Ruby">this one</a>.</p>
<p>So you know how Ruby is a dynamic language. It lets you add code even after run-time. It also allows you to have <strong>instance-specific</strong> behavior. To clarify, take this example: you have teddy, an instance of the class Turtle, and his friend nick (just call that one neck &#8211; as in turtle neck), his friend. They are both Turtles. Yet teddy, and only teddy can fly. How would you normally do such a thing, without creating a new SuperTurtle class? Well, in Ruby, you can.</p>
<p>Keep in mind that in Ruby, almost everything is an instance, or an object, if you will. The Turtle class is an instance of Class, which is itself an instance of Object. A Turtle being an instance, it can have its own instance methods: Turtle.new. Sounds familiar? But the &#8220;new&#8221; method is common to all the &#8220;Class&#8221; objects, since it was defined in the Class class. Okay, what about we create some class method in Turtle? Turtle.number_of_turtles, which returns the number of turtles. If you are familiar with Ruby, creating a class method is no big deal, still, we are calling a method on an instance of Class, and Class doesn&#8217;t define such a method. Do you see it coming? We are defining instance-specific behavior again.</p>
<p>It is possible to do such a thing because of the mighty <strong>meta-classes</strong>. Every instance has its own meta-class that stores instance-specific definitions.</p>
<p>Because I&#8217;m someone visual, and I know you are too, here is a diagram I did that might help you. It&#8217;s UML-Like (I didn&#8217;t want to use UML for this one, since we&#8217;re not doing it with classes but with meta classes). The white, round rectangles represent meta-classes.</p>
<p><a href="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/10/Capture-d’écran-2010-10-12-à-09.05.14.png"><img class="alignnone size-full wp-image-57" title="Capture d’écran 2010-10-12 à 09.05.14" src="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/10/Capture-d’écran-2010-10-12-à-09.05.14.png" alt="" width="597" height="225" /></a></p>
<p style="text-align: center;"><em>Ruby&#8217;s Classes, Meta-Classes and their relationships</em></p>
<p style="text-align: left;"><em><span style="font-style: normal;">I&#8217;m hungry. Aren&#8217;t you?</span></em></p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=53</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What if Internet was handwritten?</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=49</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=49#comments</comments>
		<pubDate>Sun, 10 Oct 2010 22:44:15 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=49</guid>
		<description />
			<content:encoded><![CDATA[<p><a href="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/10/photo-1.jpg"><img class="alignnone size-full wp-image-50" title="Handwritten Internet" src="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/10/photo-1.jpg" alt="" width="525" height="640" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphical User Interface in Ruby</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=43</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=43#comments</comments>
		<pubDate>Tue, 05 Oct 2010 13:23:22 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=43</guid>
		<description><![CDATA[Lately I have been looking for GUIs based on the Ruby programming language. I like the simplicity and expressiveness of Ruby and I wanted to find a GUI that complies to those de-facto principles of Ruby. After a few searches, &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=43">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lately I have been looking for GUIs based on the Ruby programming language. I like the simplicity and expressiveness of Ruby and I wanted to find a GUI that complies to those de-facto principles of Ruby. After a few searches, I came across a project called <a href="http://www.macruby.org/">Macruby</a>. After reading what it is about, I got really interested. Macruby is a mapping of the Cocoa Framework of Mac OS X on Ruby, and further more, it&#8217;s an initiative by Apple itself. It started on 2007 and as of today, it is very active.</p>
<p>I have a Macbook as a laptop, and I love the look and feel of applications in OS X. Macruby&#8217;s goal is to allow Rubyist to develop mac applications that runs as smoothly as applications created using Objective-C and XCode. But my story of Macruby doesn&#8217;t end here. After a few clicks here and there, I came accross something that literally blew my mind. The name is Hotcocoa. It&#8217;s a library that ships with Macruby as a layer on top of it. Hotcocoa takes the Cocoa framework and its 30-letters-long method names, and adds simplicity and expressiveness: it makes a philosophy shift from Objective-C to Ruby.</p>
<p>Hotcocoa was built by Rich Kilmer, and he did a brilliant presentation of it during RubyConf 2008, in Orlando. I highly recommend you to watch the <a href="http://rubyconf2008.confreaks.com/os-x-application-development-with-hotcocoa.html">video</a> recording of the conference. After seeing this, I instantly started to build a small program using Hotcocoa, but I couldn&#8217;t find documentation, and as simple as a library can be, with no documentation, it&#8217;s impossible to use. For this reason I subscribed to Macruby&#8217;s mailing-list and asked about Hotcocoa&#8217;s API doc.</p>
<p>To my biggest dismay, I was informed that the project was no longer maintained, and that it won&#8217;t likely be maintained again. Rich Kilmer doesn&#8217;t have the time to work on it and moreover, people told me that they were using Interface Builder (which works with Macruby) to create their GUIs. I think Interface Builder is great and yes, it is way easier than using any method involving code to build user interfaces, but I like to hack around when I&#8217;m using Ruby. I like to try things. I don&#8217;t want to get restrained by some sort of architecture, and sometimes, I don&#8217;t feel like having this high-level of abstraction, Interface Builder and XCode open for a basic interface.</p>
<p>That&#8217;s when I met up with <a href="http://shoes.heroku.com/">Shoes</a>. It is described as a tiny GUI for Ruby. It was created by a very famous person among the Ruby community, Why the lucky stiff, who is also the author of a great programming book on Ruby (that is free, by the way) <a href="http://en.wikipedia.org/wiki/Why's_(poignant)_Guide_to_Ruby">Why&#8217;s poignant guide to ruby</a> which is full of humour and comics stripes, a delight to read! Anyway, _why disappeared of the internet one year ago, and left a big void (if you are interested by this, you can check the &#8220;<a href="http://whyday.org/">Whyday</a>&#8220;. PLEASE WHY, COME BACK!) Still, to come back to the main subject of this article, Shoes is being taken a good care by the Ruby community.</p>
<p>I have been working on a program using the Shoes GUI and I&#8217;m pretty sure my next posts are going to be about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=43</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic languages and reflectivity</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=30</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=30#comments</comments>
		<pubDate>Wed, 29 Sep 2010 04:08:14 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=30</guid>
		<description><![CDATA[I don&#8217;t know if you have ever tried to load dynamically code in a Java or C++ program after compilation. It requires a deep understanding of the runtime environment of the language&#8217;s specification. For instance, in a Java program, if you want &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=30">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if you have ever tried to load dynamically code in a Java or C++ program after compilation. It requires a deep understanding of the runtime environment of the language&#8217;s specification. For instance, in a Java program, if you want to load classes (.class files) dynamically and use them on-the-fly, you need to use a ClassLoader, which is the class that instantiates every classes during execution. If you want to change its default behavior, you need to subclass it and use it to load classes (from a file, for instance), then you need to use Java&#8217;s reflection API to call methods on it. It is a big pain.</p>
<p>Here is how a sub-classed ClassLoader that loads classes from a file looks like in Java:</p>
<p>[cc lang="java" escaped="true" width="100%"]</p>
<p>public class CommandLoader extends ClassLoader {<br />
private String classpath;</p>
<p>public CommandLoader(String cp) {<br />
super(CommandLoader.class.getClassLoader());<br />
classpath = cp;<br />
}</p>
<p>public Class loadClass(String className) throws ClassNotFoundException {<br />
return findClass(className);<br />
}</p>
<p>public Class findClass(String className){</p>
<p>byte classByte[];<br />
Class result = null;</p>
<p>try{<br />
result = findSystemClass(className);<br />
return result;<br />
}catch(ClassNotFoundException e){<br />
e.toString();<br />
}</p>
<p>String classp = classpath+className+&#8221;.class&#8221;;<br />
System.out.println(classp);<br />
try {<br />
classByte = loadClassData(classp);<br />
result = defineClass(className, classByte ,0 ,classByte.length, null);<br />
System.out.println(result.toString());<br />
return result;<br />
} catch (IOException e) {<br />
e.printStackTrace();<br />
}<br />
return null;<br />
}</p>
<p>private byte[] loadClassData(String className) throws IOException{</p>
<p>File f ;<br />
f = new File(className);<br />
int size = (int)f.length();<br />
byte buff[] = new byte[size];<br />
FileInputStream fis = new FileInputStream(f);<br />
DataInputStream dis = new DataInputStream(fis);<br />
dis.readFully(buff);<br />
dis.close();<br />
return buff;<br />
}</p>
<p>public String getClassPath() {<br />
return classpath;<br />
}</p>
<p>public static void main(String[] args) {</p>
<p>}<br />
}</p>
<p>[/cc]</p>
<p>Why is it so complicated? Java is not a dynamic language, although it offers way of making it dynamic, such as the ClassLoader. To actually invoke methods on the classes loaded from a file at run-time, you still need to use Java&#8217;s reflective API.</p>
<p>Just to compare, doing the exact same thing using a dynamic language such as Ruby needs only the following code:</p>
<p>[cc lang="ruby" escaped="true" width="100%"]<br />
buff = String.new</p>
<p>File.open(&#8220;classtest&#8221;).each do |line|<br />
  buff += line<br />
end</p>
<p>eval buff<br />
t = eval &#8220;Test.new&#8221;</p>
<p>t.hey<br />
[/cc]<br />
In dynamic programming languages, it is possible to add code at run-time, and that code above loads a class and evaluates it.</p>
<p>The important line of the above is this one:<br />
[cc lang="ruby" escaped="true" width="100%"]<br />
t = eval &#8220;Test.new&#8221;<br />
[/cc]</p>
<p>The eval method checks if the expression between quotes makes any sense during run-time, and if it&#8217;s the case, it executes it. Another good point for scripting languages.</p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=30</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Seamlessly adding semantics to current web-applications</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=27</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=27#comments</comments>
		<pubDate>Sun, 26 Sep 2010 20:53:36 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Semantic Web]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=27</guid>
		<description><![CDATA[&#8220;The web is ugly&#8221; &#8211; okay, so that&#8217;s what I read on a blog article a few days ago, unfortunately, I can&#8217;t find the link to the post. It was talking about CSS and HTML, and how what we see &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=27">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&#8220;The web is ugly&#8221; &#8211; okay, so that&#8217;s what I read on a blog article a few days ago, unfortunately, I can&#8217;t find the link to the post. It was talking about CSS and HTML, and how what we see might look nice, what&#8217;s underneath can look pretty bad. If you have a technical background, you probably know what&#8217;s &#8220;hidden&#8221; behind the webpage you are seing &#8211; let&#8217;s say, this blog. It all goes down to two things: an xhtml page, and a CSS file. That&#8217;s it! That&#8217;s what you see, or at least, what you see comes from these two items.</p>
<p>Yes, but if you dig deeper, you will find that those html pages- the content &#8211; are most of the time generated dynamically. It is the case because thankfully, we don&#8217;t create a new html file each time we want to add content to our website., instead, we fill nice forms, click the submit button and voilà, the content is added to our website. The content is stored on a database, which is where your actual <em>code</em> will get the data to generate nice looking html pages.</p>
<p>If you think about it, on the above description I identified three things, lets call them layers. The html pages (what you see), your code (that generates the html pages) and the database. This decomposition goes by the name of Model-View-Controller (MVC). It is the most used architecture for a website today, because it makes maintenance easier. I&#8217;m saying all this because the web, today, use this model. It is so widely used that companies released their own MVC architecture to be used as a framework for the development of other web-applications. It is the case of a software company called 37signals, who created <a href="http://rubyonrails.org/">Ruby On Rails</a> (version 3 came out a few weeks ago), one of my favorite MVC framework for the web (I love Ruby&#8217;s expressiveness.)</p>
<p>I don&#8217;t want to get to techie here, I hope I&#8217;m not losing your attention, because here is the actual interesting part. I can&#8217;t query (access) another website&#8217;s database. First because they won&#8217;t allow me (it&#8217;s way too risky), and second because I don&#8217;t know how the database is modeled. Yet, all the information is there, and it has meaning &#8211; it is stored as tuples in tables &#8211; , but it&#8217;s not accessible. This raises the question: do we need a new architecture to build an interoperable web? Well, the <a href="http://www.w3.org/2001/sw/">Web Semantic Workgroup</a> at W3C don&#8217;t see it like that. For them, the semantic web has to be an add-on on today&#8217;s web. It has to work without the need to start everything from scratch. In other words, it won&#8217;t require to change every website&#8217;s architecture. Actually, it doesn&#8217;t even require to stop using a database. We can take today&#8217;s 3-tier architecture (your browser, the website&#8217;s server, and its database) and add a fourth tier.</p>
<p><a href="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/09/4tier.png"><img class="alignnone size-full wp-image-28" title="4tier" src="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/09/4tier.png" alt="" width="475" height="210" /></a></p>
<p>This fourth tier is a division of the 2nd tier between a presentation tier and an application tier. The role of the presentation tier will be to generate a regular html view for requests coming form a browser, while generating RDF responses each time its being queried using SPARQL (which is the language, standardized once again by the W3C, to query &#8220;semantic databases&#8221; &#8211; RDF files). This would be an immediate answer to add semantics to any website, without redefining all the architecture and re-doing everything from scratch. In this model, we are still using a database as the 4th tier, and the RDF generated by the presentation layer only describes the ressource requested. It&#8217;s not a complete representation of the database. I don&#8217;t think a complete representation of the database would be good either, security-wise.</p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The state of linked data</title>
		<link>http://s139459221.onlinehome.fr/MichaelSokol/?p=21</link>
		<comments>http://s139459221.onlinehome.fr/MichaelSokol/?p=21#comments</comments>
		<pubDate>Sat, 25 Sep 2010 12:20:50 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Semantic Web]]></category>

		<guid isPermaLink="false">http://s139459221.onlinehome.fr/MichaelSokol/?p=21</guid>
		<description><![CDATA[I just stumbled upon the new Linked Data map. Linked data is a subject among the semantic web that adds a set of principles on the dataset (think of it as information with information on it) one provide to make &#8230; <a href="http://s139459221.onlinehome.fr/MichaelSokol/?p=21">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just stumbled upon the new <a href="http://richard.cyganiak.de/2007/10/lod/">Linked Data map</a>. Linked data is a subject among the semantic web that adds a set of principles on the dataset (think of it as information with information on it) one provide to make it more connected. It was introduced by Tim Berners-Lee, who also happen to be the guy who created the World Wide Web. If you are interested, you can watch him talk about it at the 2009 TED conference <a href="http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html">here</a>.</p>
<p>In order to view the fast growing of Linked Data, I created a little image showing the 2008, 2009 and the new 2010 graph. Those graph were taken from <a href="http://richard.cyganiak.de/2007/10/lod/">here</a>, and are under the <a href="http://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a> license, so you may use the following image too, as long as it stays under CC-BY-SA license.</p>
<p style="text-align: center;"><img class="size-full wp-image-22 aligncenter" title="semanticMap" src="http://s139459221.onlinehome.fr/MichaelSokol/wp-content/uploads/2010/09/semanticMap.png" alt="" /></p>
<p style="text-align: center;"><em>“Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/”</em></p>
<p style="text-align: left;"><em><br />
</em></p>
<p>What&#8217;s interesting here is to see that the amount of dataset more than double each year, in fact, it&#8217;s an exponential growth. Also, the above doesn&#8217;t depict all the linked data, but only the largest datasets (those with more than 1000 triples). As a developer, you can already query this huge distributed database and start building your own semantic applications within that circle. I&#8217;m curious to see what the 2011 graph will be looking like. I couldn&#8217;t find the FOAF profiles dataset in the new graph, maybe is it because it doesn&#8217;t have enough triples? You can find literally any kind of information, for instance there&#8217;s a dataset that represents the &#8220;<a href="http://pokedex.dataincubator.org/.html">Pokedex</a>&#8220;, a Pokemon classification.</p>
]]></content:encoded>
			<wfw:commentRss>http://s139459221.onlinehome.fr/MichaelSokol/?feed=rss2&amp;p=21</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

