Using Orchard for Enterprise App.

Topics: Core, Customizing Orchard, General, Writing modules
Jan 17, 2013 at 12:49 PM
Edited Jan 17, 2013 at 12:59 PM

Hi

I wish to develop an enterprise application using the Orchard CMS. As of now, it has nothing to do with CMS features like Blog, Comment, Post, Archive, etc.

Is it possible to create the Model, Views, etc. and specify the NHibernate mappings without using the Orchard.ContentManagement Library? For instance, the Entity classes should not derive from Orchard Framework classes like ContentPart, ContentRecord etc. and still we should be able to make use of the other features of the framework like Logging, Search, Indexing,second-level cache, We should be able to specify the N-Hibernate Mappings using List, Bag, etc. (I don't like to code something like Migrations.cs)

Again, the bottom line is to use the Orchard's framework features (there are so many) other than the Content Management (ContentItem, ContentPart, Record, Driver, etc.) itself. Is this possible? If yes, could you  help me get on the track with a real-world example?

Thanks and Regards

Jan 17, 2013 at 4:04 PM
Edited Jan 17, 2013 at 4:07 PM

I am currently developing an enterprise app using orchard framework

and up till now am very happy with my choice. 

In short to answer your question , yes its possible to use it. 

My Data access layer and my business models are all on Entity framework. 

You would need a good understanding about Content parts and shapes (which ar the main UI blocks of orchard).

A record is not necessary to use in your case. 

Do all your dataaccess logic in controllers (or drivers) , then pass that data down to the UI through  content part properties.

I also store  an Id key of my data instanses in orchard only to use it as an identifier when querying my custom repository (see here). 

 http://stackoverflow.com/questions/4727843/how-to-change-orchard-record-repository

It all depends on what your after. For me, extensibility was important which is why i made the choice. 

You are making an investment by choosing orchard. 

In any case, you can still learn a lot by just understanding the code and implementing some best practices in your custom solution.