Sql Adapter in windows forms application vs webservice

  • Thread starter Thread starter Dan Davenport via .NET 247
  • Start date Start date
D

Dan Davenport via .NET 247

I am somewhat new to .NET and am working on a windows forms application in C#.

My application will be accessing a database on a different machine than the windows application. About 10 instances of the windows forms application will be accessing the database at any given time. No other application needs to use the data.

From a performance standpoint, is it better to have the windows forms application access the database with sqlAdapters right in the application, or is it better to use a webservice to return a dataset?

Thank you!
 
Dan,
If your application is accessing a database that is on a local network
there is no reason to use a web service. Web Services are not usually used
as the primary mechanism for an applications data. If the data that is being
retreived from the db needs to be accessed by multiple applications / web
sites across the internet, then it might be a more viable solution, but I
would still hesitate. In fact, you would see a performance hit using a web
service vs connecting directly to the sql server.

HTH

--
Lateralus [MCAD.Net]


Dan Davenport via .NET 247 said:
I am somewhat new to .NET and am working on a windows forms application in C#.

My application will be accessing a database on a different machine than
the windows application. About 10 instances of the windows forms application
will be accessing the database at any given time. No other application needs
to use the data.
From a performance standpoint, is it better to have the windows forms
application access the database with sqlAdapters right in the application,
or is it better to use a webservice to return a dataset?
 
You will definitely see a performance hit using a web service vs. directly
accessing SQL Server. That's the nature of the beast (for now).

However, performance isn't everything. MSFT stated at tech-ed that
performace is not the end all reason for model choice. I think that using a
web service helps define lines between progam sections and if there is an
object model that might be reused for other applications, I would look
closer at implementing the model as a web service.


Lateralus said:
Dan,
If your application is accessing a database that is on a local network
there is no reason to use a web service. Web Services are not usually used
as the primary mechanism for an applications data. If the data that is being
retreived from the db needs to be accessed by multiple applications / web
sites across the internet, then it might be a more viable solution, but I
would still hesitate. In fact, you would see a performance hit using a web
service vs connecting directly to the sql server.

HTH

--
Lateralus [MCAD.Net]


Dan Davenport via .NET 247 said:
I am somewhat new to .NET and am working on a windows forms application
in
C#.

My application will be accessing a database on a different machine than
the windows application. About 10 instances of the windows forms application
will be accessing the database at any given time. No other application needs
to use the data.
From a performance standpoint, is it better to have the windows forms
application access the database with sqlAdapters right in the application,
or is it better to use a webservice to return a dataset?
 
Why overegg the pudding. If winforms alone fits the bill (as it seems to in
this example) I see now benefit complicating the development -unless of
course their is a *real* possibility for reuse at Dans place of work. He
does say that "no other app will use the data" so Im inclined to go with the
simplified model.

Br,
Mark.

Joel Rumerman said:
You will definitely see a performance hit using a web service vs. directly
accessing SQL Server. That's the nature of the beast (for now).

However, performance isn't everything. MSFT stated at tech-ed that
performace is not the end all reason for model choice. I think that using a
web service helps define lines between progam sections and if there is an
object model that might be reused for other applications, I would look
closer at implementing the model as a web service.


Lateralus said:
Dan,
If your application is accessing a database that is on a local network
there is no reason to use a web service. Web Services are not usually used
as the primary mechanism for an applications data. If the data that is being
retreived from the db needs to be accessed by multiple applications / web
sites across the internet, then it might be a more viable solution, but I
would still hesitate. In fact, you would see a performance hit using a web
service vs connecting directly to the sql server.

HTH

--
Lateralus [MCAD.Net]


Dan Davenport via .NET 247 said:
I am somewhat new to .NET and am working on a windows forms
application
in
C#.

My application will be accessing a database on a different machine
than
the windows application. About 10 instances of the windows forms application
will be accessing the database at any given time. No other application needs
to use the data.
From a performance standpoint, is it better to have the windows forms
application access the database with sqlAdapters right in the application,
or is it better to use a webservice to return a dataset?
 
Back
Top