Question

We are about to embark on a large project & I would like to use Sharp Architecture (plan is to use NHibernate & MVC already).

Initially we will offer WCF services to external providers & then plan on building a MVC site that will talk to these backend WCF services.

Architecture here states that we need a Front End WCF server (in the DMZ) server talk to a back end WCF server (then onto the DB server) -- the web site will also be on its own server in the DMZ.

Can I use Sharp Architecture to expose a WCF service on the front server which will start a NHibernate session & pass the data to the back server?

Then later can the MVC site talk to the backend WCF service (with use of WcfOperationSessionContext????)

Looking for a way to handle sessions across both WCF and the website.

Is this possible? Or should I just pass DTOs to the back end server & use NHibernate there?

Many thanks

Was it helpful?

Solution

I would have thought it would be beneficial to have all your application logic centralised. It has maintainability/deployment benefits when the service implementations change. It also means that if you want to use second-level caching with NHibernate, you don't need to go for a distributed implementation (which is required if you have more than one process), you can just use SysCache2.

So I would go with the DTOs and NHibernate in one place. MVC web site will be just another client.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top