2

I'm just getting underway with Orchard CMS. How difficult would it be to create an Orchard module that uses RavenDB as its database? Is a hard dependency on SQL and NHibernate baked deeply into Orchard?

Tarfa
  • 1,145
  • 2
  • 8
  • 8

2 Answers2

2

All of Orchard's core features are based on NHibernate so it would be difficult to move the entire Orchard database to another DBMS not supported by NHibernate. However, Orchard is very extensible and it is quite easy to access all kinds of custom data sources from your own modules. For example, I am currently working in a project where we store our data in a graph database (neo4j) and access them in Orchard using a WCF service.

It depends on what kind of data you need to access, but you will probably need to create a custom content part which dynamically loads data instead of using the underlying SQL database through NHibernate. You can do this by inheriting from the non-generic ContentPart class (the generic one uses a record stored using NHibernate) and using a ContentHandler to populate the data from your custom data source.

Marek Dzikiewicz
  • 2,844
  • 1
  • 22
  • 24
  • I'm completely okay with the existing modules relying on a SQL database. My only concern is that I want to create new modules that can tap into other data sources. Can you recommend a module from the gallery that I should look at that use something other than SQL to fetch data? – Tarfa Jan 18 '12 at 15:37
1

There is an experimental RavenDB-based data layer implementation in 'ravendb' Mercurial branch.

It was built a couple of months ago and I'm not sure about the compatibility with the current release, but you can give it a try. There were no big changes to DL since then so I assume it should work or need just a couple of tweaks.

Piotr Szmyd
  • 13,371
  • 6
  • 44
  • 61