Originally I asked this question on Stackoverflow but I was suggested to move the question here.
I've asked this question a while ago in MSDN forums but I'd like a second opinion from StackOverflow since I tried this route and found some CONS, but I'd like to hear more opinions as well.
I have a windows service program, extracting data from files and inserting the extracted data into a MS SQL database. There is a GUI program which does some filtering and calculations and displays the SQL data in realtime. So the GUI basically displays selective records from the database at any moment. It should be also possible for the GUI to insert and update records based on rules. Also The data fetched from the Database can be huge and it would be also nice to allow remote access to the data by the GUI (not critical)
So my question in more details:
1 - should I create a WCF service in my Service program which provides some API to the GUI to access and update records?
- I can change the backend database and wouldn't need to update the GUI app.
- The GUI would be sql free.
- allow the GUI to directly access the Database and fetch and update itself.
2 - allow the GUI to directly access the Database and fetch and update itself. PROS:
security already in place faster than option 1 easier to implement
changed in records can trigger data change rather than polling for new data for real time display.
- The GUI can access data remotly if SQL database access is setup to be accessable remotely (a possible security risk?)
here is the original question: http://social.msdn.microsoft.com/Forums/pl-PL/architecturegeneral/thread/8ef537c5-9a79-42b5-a6a0-f7278d3f506e