Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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.

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Posted

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 :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...