3
votes

I have been writing an application using ASP.Net MVC4, where the majority of the data has been stored in MongoDB. This has worked great for the majority of what I would consider the "meat" of my application, the functionality it was made for that sets it apart.

However, now I need to add static content and administrative capabilities (setting up accounts, billing, help, etc). I'm strongly inclined to use Orchard CMS to handle all of this functionality, and then migrate what I have done so far into Orchard modules.

The question is this: How much of my data should I be using Orchard's Content Types to model? I plan to continue to store at least some of my data in Mongo, so now I am unsure of where to put the dividing line between what goes where.

Have you implemented a web application in Orchard before? Where did your domain data go? If you used Content Types, were there any lessons learned?

1
After my other comment, did u look at FileTables in SQL Server?rfcdejong
@rfcdejong Sure, it is interesting but probably not the right tool for the job. If I really thought that SQL was the right tool, I would probably use SQL Server's Hierarchical Ids, which have been included since 2008.Chris Pitman

1 Answers

1
votes

Why do you want to keep using MongoDB? In Orchard all data access is done by NHibernate, using xxxRecord classes where a virtual property is mapped to a column. It works with SQL Compact, SQL Server 2008 (and R2) and SQL Azure.

I don't know the status of RavenDB, but there might be a module using RavenDB for storing blob data or just using it as no-sql data storage.

Personally i would not use multiple data storages.

A ContentType contains multiple 'attachable' ContentParts and ContentFields, either in code or else using the orchard admin user-interface. U can use repository's if u want, but only do that for data that is not directly a ContentPart. The DefaultContentManager has versioning, publishing, deleting, etc.. If u delete a ContentType it just get a flag that it has been deleted. (unless u use some another module that executes delete statements) Using repository's there is a risk u think the item still exists while it does not.

As final answer to your question: Yes, you should use ContentType's as domain model, and u do not have to worry about the differend query's being executed.