Is a Web Service my best choice?

rbb

Newcomer
Joined
Jul 19, 2004
Messages
21
I'm looking to create a central business object that will be used by most of our internal web applications. In doing my research, it seems that a web service will offer the most flexibility while still allowing a central location to host and maintain.

My question is; is this the best choice? I'm looking to consolidate common functionality such as employee details, database access, and logging.

If it is the best choice, how do I handle instances where I want to return a custom class from the web service? For example, lets say I want to return an employee object. I'm trying to avoid having to update each client application everytime we change something on the web service. Or should I just move everything into datasets or XML even though I lose Intellisense?

Thanks,

Rob
 
I'm not an expert on this, but I think a webservice would work for what you are describing.

A webservice can return an object, however, you may run into complications trying to return an ArrayList, or Collection (Inherited from CollectionBase) of these objects.

If you use interfaces for your design, you shouldn't have to update the client machines unless you make major changes to your design.
 
an asp .net webservice is based on the SOAP protocol and can only accept parameters and return data/value that are serializable into .xml format (automatically that is).

If the server throws an exception like "Object cannot be serialized", then you will have to do the serialization yourself in code.
For example, to upload or download files via a web service, you first need to read the file into a byte array and then send the array. The file itself is not recognized as a supported type by .net.

Updating can be a pain, which is why i would recommend that on that same server, allow your application to download updates from it. That way, just recompile and post your new versions just once each :)
 
Back
Top