# Ruby good for RDF
Everybody I tell this to seem to be shocked, I have changed the programming language and tool that I am using from:
- Java with Sesame Repository
To:
- Ruby with Redland
This means I am currently going through a complete re-write of my undergraduate project —- 2 weeks before it has to be handed in. But I have done this for several reasons:
- I know Ruby like the back of my hand, and can develop in it quickly
- Ruby is a nice language that programs can be developed in quickly
- Ruby has a binding into Redland
- Redland is a very quick RDF and Semantic Web library/tool, and it is very stable
- Ruby is a functional object oriented language, and it will be interesting to dive into more of the functional side of it (as an external bit of research to my undergraduate project)
- Ruby has Ruby On Rails, which is an excellent Ruby Library for developing web applications. My project is a web app.
- Ruby has excellent webservices tools, which will be useful when connecting to web 2.0 sites.
—
One nice thing I have noticed is comparing a simple ruby file that makes an RDF file, with the RDF file. Look at the sizes:
| filename | filesize | type |
|---|---|---|
| foaf.rb | 920 Bytes | Ruby Program |
| foaf.rdf | 1452 Bytes | FOAF/RDF Document |
That is a difference of 532 Bytes!
Which means that it is more efficient to write a ruby program for each RDF document than it is to write each RDF document. Although I have to admit - this program is generating non-abbreviated RDF/XML, the rdf file would be a lot smaller if it was abbrev-rdf/xml. But at the same time, my ruby file isn’t the smallest it could be either!
Technorati Tags: rdf, ruby, redland, undergraduate, project

