We have to code a digital signage app for an University project. The language and frameworks we are using initially are :.Net, C#, entity framework (with plans to use NHibernate), Winforms (with plans to use WPF).
We were told to do so in a way which would allows us to change the presentation and persistence logic easily.
Because of this,we decided to work with three layers: the UI layer which "knows" the service layer (or business logic layer), the service layer which knows the persistence layer and the persistence layer. Each of them is a separate project. At the moment, the domain classes or entity classes (in this case, classes such as Campaign, RSSFeed, User, etc) are contained in a "Model" namespace under the persistence project or layer.
We have defined some interfaces for the data access logic, In order to be able to switch the storage media easily.
The questions would be: if in order to change the persistence logic we would have to change the actual project references for those of the replacement (eg. Entity Framework for NHibernate) where should this interfaces be defined? More importantly, where should the domain classes be defined? Is it "valid" to add another layer named for example "Domain", known by the persistence layer and the Service layer?
I apologize if something I wrote comes off as strange, my written English is somewhat rusty.
What you could do is extract the interface for the persistence logic into a separate project. Then just inject the implementation (EF or NHibernate) into the class that is using it. This way the class that uses it only needs a reference to the project containing the interface, and not to the specific implementation.
As for the domains, you could create for each domain a set of projects like Domains.NameHere.Facade, Domains.NameHere.Implementation, Domains.NameHere.UnitTests. This way you also separate the interfaces in the façade project. You could add your service layer inside the Domains.Implementation project, and also include al your other domain classes in here.
For your models you could add a separate project like Domains.Models for instance or add them to your façade projects. For your persistence part you can have your own models project. This way you can change something in your models without having to change on your persistence part.