Latest Posts

Archives [+]

Categories [+]

Authors [+]

JCR and Rails revisited

Pengchao Wang of Thoughtworks has published his approach to using JCR as a backend for a JRuby-based Rails app. Interestingly, Pengchao uses unstructured nodes (at least, that is what I gather from reading the code), so he can take full advantage of the schema-free side of JCR and freely add properties to JCR-persisted Ruby objects. The code is on GitHub, have a look at jcr-rails-demo/lib/jcr/record_base.rb from which the models classes inherit. If Rails and JCR is of interest to you: also have a look at what Ngoc Dao wrote on how to use JCR in Rails applications

 
(optional)
1 comment
Just a note, to get a clearer understand the intent of this project, it may be better to look at the tests, e.g.:

http://github.com/wpc/jcr-rails-demo/blob/master/test/unit/item_test.rb

0 Replies » Reply