Question

I'm working on a lob application that will be deployed on mid-to-small companies. It will always be on a local networks or standalone. This app is not a large app.

The app will be develped with WPF in the front end, and EDM (SQL SERVER) on the back end.

Of course it will be with the MVVM approach and maybe a DI Framework.

I have to make a decision regarding these two appraches:

  • Use WCF to link EDM with DAL

enter image description here

  • Use connection string to link EDM with DAL

enter image description here

I'm considering the last approach, because it seems easier, and it works well for standalone cases

enter image description here

Although I was told that having WCF in the middle doesn´t hurt performance for the stand alone case

But besides the fact that it would only work on local networks and the app would be tied to SQL Server Express, I'm afraid that I could be missing some important limitations that make me regret it in the future.

Was it helpful?

Solution

If you use a repository pattern, you can change the storage implementation without changing your client. You can for example make it a configuration value (perhaps injected through an IoC container).

You're not explaining anything about your business logic or models, so a lot of assumptions here, but something like this in your client, in some screen:

var dataToDisplay = _fooRepository.GetByID(42);

And then this _fooRepository is an IRepository<Foo>, where the implementation can be a WCF client or a DbContext.DbSet<T> wrapper that implements the interface.

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