471,354 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Stored Procedures or Web services

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
Jun 27 '08 #1
3 1671

"Best" is subjective.
You might look at WCF, which gives you better future flexibility.

Check
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry
or maybe look at Astoria
http://www.microsoft.com/downloads/d...displaylang=en
I have a web application that calls/uses/consumes WCF services.



"Marco Pais" <marco.pais[at]gmail.comwrote in message
news:Ow**************@TK2MSFTNGP04.phx.gbl...
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

Jun 27 '08 #2
On Apr 30, 10:57 am, "Marco Pais" <marco.pais[at]gmail.comwrote:
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

Jun 27 '08 #3
Marco Pais wrote:
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

Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Narayan Appachar | last post: by
2 posts views Thread by Kent Lewandowski | last post: by
5 posts views Thread by Tim Marshall | last post: by
2 posts views Thread by nbohana | last post: by
2 posts views Thread by Dean Slindee | last post: by
3 posts views Thread by leesquare | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.