Eric Pap

Eric Pap

  • NA
  • 1
  • 1k

Abstract Client-Server Aplication from Data Structure

Feb 28 2014 10:20 AM
I'm researching about wich is the best technology avaiable to migrate a client-server distributed app to .NET. Cliente will be WPF App, and comunication will occur over a WCF channel. My goal is to have a flexible application, having to recompile as less as posible (especialy on server side).

To do so, i want to make the application to be the more independent of db structure as i can. I came up with this idea. When i need to show a report on my aplication to a grid or Crystal Reports:

1) I create a view on database that made all joins and expose only the field that i need. 2) I create a method en server side to expose data, with posible filters as parameters. 3) Client call the method with filters selected by user in UI. 4) Server recive then request and query the database with provided filters sending the data to client. 5) Client assign result to a grid or Crystal Report.

In this scheme: A) Client doesn't have to know what data result contains. Only have to know how to ask for it and how to show it. B) Server doesn't have to know what view contains, only how to filter, and how to send the data to client.

So if i want to add a new column to my report, only have to modify the view on database, without the need to re-compile. If i want to add a new filter, only have to recompile client. How can i do this on a .NET distributed App? Wich technology options do i have? Thank you!