VB Class v WebService

  • Thread starter Thread starter ThatsIT.net.au
  • Start date Start date
T

ThatsIT.net.au

When I create a object I use a .net class unless I need to access it from
another web site, I just assumed that a class was a little more efficient
than a web service. But is this true?

What are the trade offs for using each?

--
Dim Alan as ThatsIT.net.au.Staffmember
Alan = New ThatsIT.net.au.Staffmember
Alan.signature = "Thank You"
Response.Write Alan.signature.toString()
__________________________________________
 
for the web service you need a connection to your IIS all the time. For a
class just reference the class then call the methods in that. You can still
share a class across web apps, create a class library and have your data,
business, etc classes in that then just reference the dll from your web app
or winForms apps. The difference I've noticed in using a web service is
performance due to you have to access the web service via the intranet or
internet and that can cause some issues, such as security, performance, etc.

personally I don't see a use for a web service for an internal application
unless your tranfsering data back and forth with an outside source.
 
Actually web services do not necessarily need to go through IIS and HTTP.
They can be configured to use local resources in a more direct manner.
Still, there is a tiny amount of overhead so your primary point is still
valid even though it has been significantly diminished.
Some people might consider this tiny amount of overhead to be worth it in
order to have a more reusable service-oriented architecture. But that
mostly comes down to opinion and how you envision your object model
potentially evolving over the long term.
 
Actually web services do not necessarily need to go through IIS and HTTP.
interesting. How would that work? Everything I've seen, read, and even
taught in class stated a web service has run via a web server. How can you
use or access a web service any other way?
 
Mike said:
Actually web services do not necessarily need to go through IIS and HTTP.
interesting. How would that work? Everything I've seen, read, and even
taught in class stated a web service has run via a web server. How can
you use or access a web service any other way?

I have read that they can be passed though many protocols but have never
done so.
I use web services because I always think that I may need to reuse them but
often don't and then think a class may of been the better choice.

I can consume web services in WSH excel asp pages and HTA's
can I do that with classes? If so how do I reference them?

I also remember trying to use optional parameters in a WS and they are not
allowed.

I also assume that you can not have abstract WS's
 
Back
Top