sign in
Home | Updates | Pages | Users | Admin | Help
Comparing version 19 and version 18 back

The Semantic Web on Rails Development (SWORD) plugin eases the development of semantic web applications. SWORD is a ruby-on-rails that provides scaffolding based on semantic web information.

h1. Overview

SWORD allows you to generate a controller, model and views for managing one type of semantic web data, such as a foaf:Person. The controller offers actions such as list all people, search a person, fetch online semantic web information about people, and show/edit/update specific people.  The generator also creates an ActiveRDF model for foaf:Person and basic views for each action.
Based on these files automatically generated files, the application developer can further configure, enhance, and develop his application.

h1. Example: a foaf editor and viewer

h2. current way of installing and trying SWORD

    $ have rapper installed, see http://librdf.org.
    $ gem install --include-dependecies rails
    $ gem install --include-dependecies activerdf-rdflite
    $ rails test-app
    $ cd test-app
    $ bzr co "http://bazaar.launchpad.net/~activerdf/sword/dev/":http://bazaar.launchpad.net/~activerdf/sword/dev/ sword 
    $ ./script/generate scabbard person foaf http://xmlns.com/foaf/0.1/
    $ ./script/server

First you create an (empty) rails app, and then you can download the SWORD plugin (the bzr repository only contains the plugin, not the full application anymore). After that you can create rails model, view and controller for a specific RDF Schema, of which you must provide a location. In the above example, a MVC is created for FOAF::Person.

h2. Install when sword is available as rails plugin

Currently SWORD is not available as rails plugin, but when it is, 
you will be able to use the following commands. 

    $ gem install --include-dependecies rails
    $ gem install --include-dependecies activerdf-rdflite
    $ rails foafapp
    $ cd foafapp
    $ ./script/plugin install [SWORD plugin location]
    $ ./script/generate scabbard person foaf http://xmlns.com/foaf/0.1/
    $ ./script/server

Done! The application runs and is fully functional, allowing users to fetch foaf data from the web, to  search, display, and edit information about people.

h2. Generated files

The scabbard generator constructs the following files (for the example of foaf:Person):

    app/controllers/people_controller.rb
    app/models/person.rb
    app/views/people/edit.rhtml
    app/views/people/list.rhtml
    app/views/people/new.rhtml
    app/views/people/show.rhtml

h1. Getting involved

* bzr"bzr branch "read-only":http://bazaar.launchpad.net/~activerdf/sword/dev/ or "read-write":sftp://username@bazaar.launchpad.net/~activerdf/sword/dev/ (with launchpad account and member of activerdf team)branch":https://launchpad.net/~activerdf/+branch/sword/dev
* bugs reports on http://launchpad.net/products/sword
* mailing list on http://lists.deri.org/mailman/listinfo/swaf
Powered by JunebugWiki v0.0.31