views:

29

answers:

1

I'm currently developing an app which will use a Linq to SQL (or possibly EF) data access layer. We already have a database which holds all our Contacts information, but there is currently no API around this. I need to interact with this DB from the new app to retrieve contact details.

I can think of two ways I could do this - 1) Develop a suite of web services against the contacts database 2) Write a Linq to SQL (or EF) DAL and API against the contacts database

I will probably be developing several further apps in the future which will also need access to the Contacts data.

Which would generally be the prefered method? What are the points I need to consider? Am I even asking a sensible question, or am I missing something obvious?

+2  A: 

You would develop a set of web services if you will need to retrieve information from the database across the internet, or across some other boundary like a department, where the contacts database is not directly accessible.

Otherwise, I would go the simple route and wrap a DAL around it. Developing web services is more expensive at several levels, so consider carefully your need before you do that.

Robert Harvey
While I agree violently with Roberts recommendation, be careful whom you explain that choice to. Some SOA zealots will say that his advice is anachronistic and passe and (try to) convince you to employ SOA.
Stephanie Page