Comparing
version 6 and
version 5 backSWORD stands forThe Semantic Web Onon Rails Development.Development It is a ruby on rails(SWORD) plugin which easeeases the development of semantic web applications.
Our paradigmSWORD is toa createruby-on-rails applicationsthat directlyprovides scaffolding based on the semantic web informationinformation.
h1. standards.Overview
SWORD integrates nicely with rails and activeRDF and offers scabbard generators, same as scaffolding for semantic web applications. In one command line,allows you createto generate a controller, model and views tofor managemanaging one particulartype of semantic web data type,data, such as a Person of the foaf ontology.foaf:Person. The views and the controller offers actions such as search/list,list new/create,all fetch/show,people, edit/update.
Oncesearch 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 basic files areautomatically generated,generated files, the application developer configures,can enhancesfurther configure, enhance, and growsdevelop his application.
h1. DevelopingExample: a foaf editor/viewereditor inand viewer
$ gem install --include-dependecies rails with SWORD
$ requiregem rails
$install require activerdf
$ require--include-dependecies activerdf-rdflite
$ rails foafapp
$ cd foafapp
$ ./script/plugin install svn://sword.......
http://sword....... (not yet online)
$ ./script/generate Personscabbard person foaf "http://xmlns.com/foaf/0.1/"
http://xmlns.com/foaf/0.1/
$ ./script/server
AndDone! you are done, theThe application can already be runruns and hasis fullfully functionalitiesfunctional, allowing users to fetch rdffoaf data formfrom the web, to search, adddisplay, new persons,and edit theminformation andabout obviouslypeople.
h2. searchGenerated and display them.files
The scabbard generator constructs the following files are generated which can then be edited by(for the developer:
Theexample fileof foaf:Person):
app/controllers/people_controller.rb
The file
app/models/person.rb
The file
app/views/people/edit.rhtml
The file
app/views/people/list.rhtml
The file
app/views/people/new.rhtml
The file
app/views/people/show.rhtml