Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / April 2008

Tip: Looking for answers? Try searching our database.

Stored Procedures or Web services

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marco Pais - 30 Apr 2008 15:57 GMT
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
sloan - 30 Apr 2008 16:06 GMT
"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/details.aspx?FamilyId=1B6F85BC-8933-4D0E-A639
-934EF85ADCE1&displaylang=en


I have a web application that calls/uses/consumes WCF services.

> Hi there.
>
[quoted text clipped - 13 lines]
>
> Marco
parez - 30 Apr 2008 18:41 GMT
> Hi there.
>
[quoted text clipped - 13 lines]
>
> 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
Arne Vajhøj - 01 May 2008 00:55 GMT
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.