Stored Procedures or Web services

M

Marco Pais

Hi there.

I am developing a client-server application using C# and SQL Server 2005.

Right now, I am using web services to access database, but I'm wondering if
this is the best way. The purpose of using web services is to reuse them
with a web application, for instance. However, I think I could use stored
procedures, and when I need to build a web application, I could then build a
web service to call this stored procedures.

What are the advantages/disadvantages of each one?

Thanks in advance.

Regards,

Marco
 
P

parez

Hi there.

I am developing a client-server application using C# and SQL Server 2005.

Right now, I am using web services to access database, but I'm wondering if
this is the best way. The purpose of using web services is to reuse them
with a web application, for instance. However, I think I could use stored
procedures, and when I need to build a web application, I could then build a
web service to call this stored procedures.

What are the advantages/disadvantages of each one?

Thanks in advance.

Regards,

Marco
This is what i think..

It will depend on many factors. like where will your c# app going to
run? is this an intranet application or should it also work from your
home (without vpn)

I am assuming that you are going to use Stored procedures with Data
access layer. with the web service/WCF.

If it is intranet app,
you will get better performance if you use your app + Stored
procedures with Data access layer
If your web application will be Asp.net application then you can re-
use the "Stored procedures with Data access layer"
but if you have some other technology you will better off with the web
services + Stored procedures with Data access layer approach.

if your app is going run over internet, then web services/wcf approach
would be better
 
A

Arne Vajhøj

Marco said:
I am developing a client-server application using C# and SQL Server 2005.

Right now, I am using web services to access database, but I'm wondering if
this is the best way.

You should only expose your DAL as web service in very special
circumstances.

You should expose your BLL as web service if you foresee a need to
use it from apps written in different technologies/languages.
The purpose of using web services is to reuse them
with a web application, for instance.

No. See above.
However, I think I could use stored
procedures,

You could.

But the decision whether to use SP's or plain SQL in your DAL is not
related to the interfaces provided by DAL and BLL.

and when I need to build a web application, I could then build a
web service to call this stored procedures.

See above.
What are the advantages/disadvantages of each one?

Web services and stored procedures can not replace each other so
advantages/disadvantages between them does not have any meaning.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top