1

I have developed a WPF desktop application which will be used in multiple client PC's and they will all have a centralized database to perform CRUD operations, and we have maximum 5-10 concurrent users, i have developed this application and i am pretty much done with it, recently it occurred to me that is it a good practice to use client-server centralized architecture with WPF desktop applications. i am new to WPF so i have no idea how the different requests will be handled in this scenario. i mean in ASP.net IIS created different application domain for every user session. please tell me if what i am doing is right and if not please explain why and suggest alternatives, thanks

Abdullah Malikyar
  • 231
  • 1
  • 4
  • 19

1 Answers1

0

You should probably look in to Windows Communication Foundation (WCF). It will allow you to create a standardized web API to develop against. WCF can either be hosted in process (a custom server you write) or by IIS.

Adapting an existing program to use WFC may be a challenge depending on how you structured it already though. Uusually the application needs to be designed for it from the start.

Bradley Uffner
  • 16,641
  • 3
  • 39
  • 76
  • I know about WCF services, but the connectivity isnt the problem the clients and server uses the same local network, my concern is concurrent requests, how are requests handled from multiple WPF apps to Sql server 2008 Database. – Abdullah Malikyar May 18 '15 at 14:07
  • What method are you currently using the access the database from each client (Entity Framework, ADO.net, etc)? – Bradley Uffner May 18 '15 at 14:26
  • ADO.net, mostly DataReaders, DataAdapters and normal Sqlcommands and i must mention that the datareaders arent open for long they just fetch a record and then they are closed back. – Abdullah Malikyar May 19 '15 at 07:28
  • 2
    As far as I know, WPF doesn't change the behavior of SQL. You shouldn't have any issues with concurrent requests against the sql server; it's designed to handle that. Each open request that the sql server receives creates a session on the server. The only possible issue you could have is with locking, where an open transaction locks a table and another client tries to read or write data to the same table. It will pause until the lock is released. It's possible to get in to a deadlock situation where 2 clients get stuck waiting for each other. – Bradley Uffner May 19 '15 at 14:01