Sunday, November 08, 2009

Native REST support in NextDB.net

I'm really stoked on using REST to access NextDB.net. I've setup a Wiki for NextDB.net and here is our REST wiki page: http://www.nextdb.net/wiki/en/REST


Beeing down with a bad cold the last few days, ironically this has given me
some time to work with Jen from Dartmouth Design on using the REST features
to build some features for Project Have Hope. She has graciously offered to
share the preliminary results. So far we've used nextdb for creating
profiles of children to sponsor. The entire page, including the paging
links, profile data, and paypal buttons, is created by applying an XSLT
transformation to the table served up by nextdb. The result is sourced in an
iframe and loaded into a Joomla module. This appears to be a very nice way
to integrate nextdb content with Joomla. I'm also very stoked to see NextDB
used on such a worthy project.




You can read about the XSLT approach here:

http://www.nextdb.net/wiki/en/REST#XSLT_(reformatting_your_data%27s_presentation


This is the XSLT that is being used by Project Have Hope.
http://nextdb.net/nextdb/rest/dd/phh/config_files/row/1/xslt.xslt

I've just learned XSLT so I think there are many things that can be done
smarter, and there is also a bit of cruft template in the XSLT that is never
used (for example the 'append-pad' template is never used) and needs to be
cleaned up. But that aside, it's an amazingly small amount of XSLT
considering this XSLT is the *only* code required to bring together this
dynamic page.

No comments:

Post a Comment