The other day I
posted some questions I had regarding webservices architectures. I have recieved the answers I was looking for, thanks to all who weighed in. As a follow-up though, I wanted to mention
this post and
this post Sahil Malik wrote regarding these issues.
The company I'm working for is moving toward a WebServices Architecture and the project I'm doing has been tapped as the first to implement our new strategy. I have done webservices in the past, but only from a very limited perspective and never using an object oriented model. Now that I've jumped the fence to OOP, I'm not going back. The issue I see in reading up on webservices (and the material may be out of date) is that you can only return primative types or user defined types (as long as they only implement primitive types). What that boils down to is you can return a class from your webservice if it's built something like this:
Public Class MyPerson
Public ID as Integer
Public Name as String
Public Address as String
End Class
You cannot, however, return a class that uses get/set properties and private internal variables such as:
Public Class MyPerson
private _id as Integer
Public Property ID() As Integer
Get
Return _id
End Get
Set(ByVal Value As Integer)
_id = Value
End Set
End Property
End Class
This is a departure from the development style that I've grown accustom to. I am hoping someone can offer some advice in effectively architecting a webservices solution utilizing OOP. Give me your experiences and pitfalls to avoid.