I just wanted to let people know that I committed a very simple Jangle
core and Openbiblio connector to the Google code repository last
night. They're both written in Ruby (only because I write things
quickly in it, not because of any particular merits for this
application): the core is in the Merb framework, connector is in the
Camping framework.
They only support GET requests, presently. So, if you GET
http://angle.core.org/services
You get an Atom Services document with all of the defined backend
services. It defines a connector as a "workspace" and a resource as a
"collection".
So then, if you GET http://jangle.core.org/openbiblio/actors it routes
the request through a service proxy and sends the request to the
backend connector. The connector then constructs a JSON response (for
this request an array of vCards mainly) which the Jangle core turns
into an Atom feed.
For http://jangle.core.org/openbiblio/resources/ it does the same
thing, but returns marcxml. I haven't implemented paging, yet, so it
only returns the first 50 records (it has to build the MARC records
from DB rows, so it's a little slow and resource intensive for much
more than that).
Anyway, it's really crude right now, but gave me a bit of satisfaction
that I could make this much headway in what was really only 3 partial
days of work. I'm about to got into some radio silence as I close on
two houses next week (and pack and move), but when I get some down
time and an internet connection, I'll put a working demo on either
jangle.org or my own web host.
Right now you can look at them at:
http://jangle.googlecode.com/svn/trunk/jangle/
I think I'll be able to get these to meet the basic functionality that
the DLF is looking for in maybe another two days' work.
-Ross.
Ross --
I don't do Ruby on Rails (yet). I understand that the Rails framework
generates some code for the application, so it is difficult to know
what to look at (e.g. the code you wrote) versus what to ignore (e.g.
the generated code). Can you give a brief pointer to the "interesting
bits"?
Peter
- --
Peter Murray http://www.pandc.org/peter/work/
Assistant Director, New Service Development tel:+1-614-728-3600;ext=338
OhioLINK: the Ohio Library and Information Network Columbus, Ohio
The Disruptive Library Technology Jester http://dltj.org/
Attrib-Noncomm-Share http://creativecommons.org/licenses/by-nc-sa/2.5/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFIFe+S4+t4qSfPIHIRAhEPAJ0cMvILrx35oTlY/odkrTVZEEWWuACbBTv9
ty1lA3K29x+Ye9ujIUQJ6co=
=HZkp
-----END PGP SIGNATURE-----
The connector is pretty straightforward: Camping apps are almost like
a cgi script in that regard. It's all contained in one file.
The Merb app is a little more complicated because there's some magic
going on in the url routing in order to make the URIs cooler.
So the connector's output currently looks like:
http://dilettantes.code4lib.org:7676/resources/
or
http://dilettantes.code4lib.org:7676/resources/98
for "things"
And:
http://dilettantes.code4lib.org:7676/actors/
etc.
For the Jangle core, you can look at an (incomplete) Atom Services document:
http://dilettantes.code4lib.org:6767/services
which pulls from:
http://dilettantes.code4lib.org:7676/services
And then:
http://dilettantes.code4lib.org:6767/openbiblio/resources/
http://dilettantes.code4lib.org:6767/openbiblio/resources/98
http://dilettantes.code4lib.org:6767/openbiblio/actors/
In the core app, take a look at app/controllers/services.rb,
app/controllers/service_proxy.rb and app/models/service.rb.
Oh, and anything in app/views
-Ross.