views:

47

answers:

1

Hi all,

I've started to build a Windows Forms application. The application will work in two different modes:

  • local (1 user, opening and saving files just like a Microsoft Office application)
  • network (multiple users, all accessing a shared database in another host of the network)

For the local mode I am planning to use a SQLite embedded database, I've made some tests and it worked very well. For the network mode I'm thinking about SQL Server Express. Both solutions are free.

Now I'm worried about architecture best practices for this app. I usually split my application layers in 3: Presentation, Service (or business logic) and Data Access.

In your opinion, what are the architecture "best practices" for this kind of application, specially considering the data access layer in those 2 modes (local and network)?

For example, should I create one DAL class for local and one DAL class for network, and build a factory for them? Do you think nHibernate would work for this scenario (then I could use the same DAL class for both local and network modes)? Can you see better options for the database solutions I've chosen?

I appreciate any advice, hint, example, suggestion :)

Thanks!

+1  A: 

If you use NHibernate, you can create your application any way you want. Plugging in a different database is just a matter of configuration.

By the way, i would prefer using MS SQL Server CE for the local database, because it is more compatible with MS SQL Server.

Jan Willem B