Are objects with behavior bad for SOA?

In most of the discussions I've read regarding SOA the author makes a point of saying that any object being used in a SOA should only contain data and not behavior.  My question is why?  Your object's behavior isn't going to be exposed to the client if they access your objects via your services anyway.  Well that's assuming your services are web services.  Let's for a second forget about the fact that you can have SOA without web services. :-)

In a SOA with web services the request and response for your web services will be defined using WSDL and schemas.  The schemas for your business object will not contain information about the behavior of your objects, so to the clients using your web service it looks like your objects only contain data.  However, in the code for your web service you can use your objects, and their glorious behavior.  Behind your web service you know your going to need to perform basic CRUD operations on your objects so why not make them available on your object rather then through a manager class.  WHOA, but doesn't that create a coupling between your object and the data store?  Absolutely not.  That's what the provider model is for.  If your objects are coded to use a provider to service the CRUD operations you can completely decouple the object from the actual implementation details of how the CRUD operations are performed for your object. 

Do the objects behind your web services have behavior?  Why not?

# re: Are objects with behavior bad for SOA?

Thursday, February 26, 2004 11:54 PM by Dave    
I just implemented a service that works sort of like what you're talking about for a web app:

myObject.DoSomething(context1, context2, etc);

instead of,

SomeService.DoSomething(myObject, context1, context2, etc);

Now, under the covers, myObject.DoSomething calls SomeService.DoSomething.

But personally, I'm not proud of the smoke-and-mirrors act. Hmmm, I wonder if the object.DoSomething call will be inlined....

# re: Are objects with behavior bad for SOA?

Saturday, February 28, 2004 1:38 AM by Udi Dahan - The Software Simplist    
"The author" == Me ?

I don't suggest that ALL objects be without behaviour. Objects that are internal to a service can and probably should have behaviour. I mean, implementing services in an OO way is just fine.

The problem I have is how "stuff" is passed between services. Everybody is always talking about passing DATA between tiers, and then they go passing objects with behaviour instead. Finally, the methods are (obviously) invoked on those same objects, because they're there. This isn't exactly passing data between tiers.

IMO, if you want to pass around data, do JUST that. If somebody needs functionality, let them go to the appropriate place and use it.

Although I don't agree with a lot of things in the Pet Shop v3, there you can see an example of a layered architecture. Even there, you see that Data Transfer Objects are used to pass data between tiers, NOT behaviourly rich objects.

# re: Are objects with behavior bad for SOA?

Sunday, February 29, 2004 6:05 PM by Sebastien Lambla    
See my response
<a target="_new" href="http://blog.thetechnologist.net/PermaLink,guid,35b9d67f-2368-431d-ab70-7ca90596239f.aspx">http://blog.thetechnologist.net/PermaLink,guid,35b9d67f-2368-431d-ab70-7ca90596239f.aspx</a>

# re: Are objects with behavior bad for SOA?

Monday, March 01, 2004 12:27 AM by Steve    
Udi, As you know you are one of the &quot;authors&quot; I talk about above. You are most certainly not alone. Almost everything I've read has taken that stance.

I agree that we shouldn't say we're just passing data and then also pass objects with behavior. I also agree that objects used within SOA should not have behavior (that the client knows about). What I'm still trying to form is my thoughts on the best way to design the underlying objects that are used within a SOA. This post was just one step in that process. I think we can have a rich object model behind our service (meaning objects with behavior), and then hide this to clients of our services by only exposing the data through the WSDL and schemas for our services. What this doesn't account for is the non-web service service, such as remoting. In that scenario its a little harder to hide the behavior.

Thoughts?

# re: Are objects with behavior bad for SOA?

Monday, March 01, 2004 2:47 AM by Edneeis    
Maybe in the remoting case you would have a provider for the service that handles that specific issue. It could also just translate the remote data object to just strict data to be passed into the regular service that everything else talks to. Thats a bit of a hack though.

Or am I wrong in the idea that the services will be generic and then more specific implementations would be written as providers that interop with said services for certain access paths?

# re: Are objects with behavior bad for SOA?

Monday, March 01, 2004 2:48 AM by Sebastien Lambla    
Steve,

the reasonning about remoting is not right. Remoting is a distributed objects architecture, and doesn't respond to any of the pillars that supports the SOA architecture.

# re: Are objects with behavior bad for SOA?

Monday, March 01, 2004 3:16 AM by Udi Dahan - The Software Simplist    
Isn't it reasonable to assume that client code would want/need to have access to the object model ?

Assuming that the client code has access to the Orders collection ( property ) of the Customer object, how would it add a new Order to the customer ?

I know that this is a work in progress, so I'm not trying to shoot it down, but rather raise some issues with it in order to increase its quality.

# re: Are objects with behavior bad for SOA?

Monday, March 01, 2004 3:59 AM by Steve    
The client code would have access to the object model, it would just have access to it through a schema. If the client is .NET the client would get the parts of the object model that we wanted them to have when they added the service as a Web Reference.

Regarding adding a order to the customer object, wouldn't we want to do that through a service rather then on our object? The Order collection on the client may have an array of orders on the Customer if the service returned the Customer with that data, but the client would not be able to add an order there via Orders.Add(new Order()); but instead would do that through the service. Agree?

Now when we actually write the code for the service, we can just do customer.Orders.Add(order); since behind our service we have our rich object model.

# More on objects in SOA...

Monday, March 01, 2004 4:14 AM by Steve Eichert    
More on objects in SOA...

# re: Are objects with behavior bad for SOA?

Monday, March 01, 2004 4:26 AM by Steve    
Sebastien, Have you checked out Shadowfax? It's Microsoft's SOA reference architecture. One of the channels it makes services available through is Remoting. Although Remoting might not be the recommended or preferred way to expose services it is an option in .NET only environments.

# re: Are objects with behavior bad for SOA?

Monday, March 01, 2004 7:17 AM by Udi Dahan - The Software Simplist    
Just playing the devil's advocate here :-)

What's to stop client code from calling:
myCustomer.Orders.Add(myOrder);
and assume that everythings been done ?

Why should client code call the &quot;more cumbersome&quot; service:
Service.AddOrderToCustomer(myOrder, myCustomer);

Once we expose the Orders collection, how do we communicate that the proper API to use is sometimes the object model, like the Orders property, and sometimes the &quot;service model&quot;, like the AddOrderToCustomer call ?

Maybe it makes more sense to settle on one direction and follow it ?

# re: Are objects with behavior bad for SOA?

Monday, March 01, 2004 11:46 AM by Steve    
The Orders property of the customer object would be an array of order objects:

public class Customer {
public Order[] Orders {
get {...}
}
}

Since the array doesn't have a .Add() method the client wouldn't be tempted into calling it :) Would you argue that the Customer class shouldn't even have the Orders collection? I'm ok with not exposing the orders collection to clients by not putting that in the schema that is exposed to clients. As you know I'd likely have the collection on my rich object model which lives behind my service. Just to be clear what one direction do you recommend following? Thanks for the continued pressure to think this thing through ;-)

# re: Are objects with behavior bad for SOA?

Monday, November 23, 2009 3:34 AM by yoyo    

# ugg classic tall boots

Wednesday, December 09, 2009 6:08 AM by ugg classic tall boots    

# discount rolex

Friday, December 11, 2009 2:08 PM by discount rolex    
designer tiffany jewelry
cheap jewelry

tiffany jewelry
silver bracelets
designer replica handbags
cheap nfl jerseys

NFL jerseys
footwear
gucci shoes
ugg store
ugg discount

ugg shoes
boots shoes
ugg discount
cheap ugg classic

fashion ugg
cheap ugg shoes
luxury ugg boots

fake ugg
timberland shoes online
buy timberland boots
cheap timberland
nike air max
discount air nike
nike af1 shoes

af1 shoes
replica rolex watches
rolex watches
ugg classic cardy
buy ugg boots
ugg discount
buy ugg boots

ugg classic
wholesale handbags
nfl football jerseys
nfl jerseys replica
NHL Jerseys

nfl football jerseys
bape shoes
boots shoes
buy ugg boots
ugg classic

ugg boots
Black Ultra Tall Ugg Boots
ugg boots
ugg boots

ugg discount
ugg shoes
discount ugg boots
cheap handbags
cheap nfl jerseys

fashion tiffany jewelry
buy cheap jewelry

tiffany bangles
buy tiffany jewelery
timberland boots
classic timberland

discount rolex
nike jordan
nike shox

Wholsale Footwear for sale
Wholsale Prada Shoes for sale
Wholsale Supra Shoes for sale
Wholsale UGG Boots for sale
Wholsale UGG Classic for sale
Wholsale UGG Ultra for sale

Wholsale Nike Air Max Shoes for sale
Wholsale Nike Shox Shoes for sale
Wholsale New Balance Shoes for sale
Wholsale Nike Basketball Shoes for sale
Wholsale Christian Louboutin Shoes for sale
Wholsale Timberland Boots for sale

Wholsale Nike Air Jordan Shoes for sale
Wholsale AF1-shoes for sale
Wholsale Nike Dunk SB Shoes for sale
Wholsale Gucci Shoes for sale
Wholsale Puma Shoes for sale
Wholsale UGG Bailey Button for sale

Wholsale UGG Classic Cardy for sale
Wholsale UGG Classic Short for sale
Wholsale Timberland Men's 6 Inch Boots for sale
Wholsale Classic Timberland for sale
Wholsale Kid's Timberland Boots for sale
Discount Kid's Timberland Boots

Discount Classic Timberland Short
Discount Timberland Men's 6 Inch Boots
Discount UGG Classic Short
Discount UGG Classic Cardy
Discount UGG Bailey Button
Discount Christian Louboutin Shoes

Discount Timberland Boots
Discount Nike Air Jordan Shoes
Discount AF1-shoes
Discount Nike Dunk SB Shoes
Discount Gucci Shoes
Discount Puma Shoes

Buy Footwear online
Buy Prada Shoes online
Buy Supra Shoes online
Buy UGG Boots online
Buy UGG Classic online
Buy UGG Ultra online

Buy Nike Air Max Shoes online
Buy Nike Shox Shoes online
Buy New Balance Shoes online
Buy Nike Basketball Shoes online
Buy Christian Louboutin Shoes online
Buy Timberland Boots online

Buy Nike Air Jordan Shoes online
Buy AF1-shoes online
Buy Nike Dunk SB Shoes online
Buy Gucci Shoes online
Buy Puma Shoes online
Buy UGG Bailey Button online

Buy UGG Classic Cardy online
Buy UGG Classic Short online
Buy Timberland Men's 6 Inch Boots online
Buy Classic Timberland online
Buy Kid's Timberland Boots online

[url=http://www.lookshoes.net/]nike shox[/url]







# discount ugg boots

Sunday, December 20, 2009 9:47 PM by discount ugg boots    
Cheap uggs on sale now!All are genuine from factory.You will enjoy more then 40% discount.You will find Classic Ugg Tall, Bailey Ugg Boots,Ugg Classic Cardy,Classic Ugg Short, Ugg Nightfall and so on are very cheap.7 days to your door.Shop with Kicksboots.com.

# re: My New Blog

Thursday, January 07, 2010 7:22 PM by warm uggs    
Recently,we are hot sale the Ugg Cardy,Ugg Outlet,Uggs On Sale,Ugg Boots Online,and we are also the best sale of the designer bags,such as the Mulberry Bag,Miu Miu Handbags,Jimmy Choo Handbags, Mulberry handbags,the fact that the Timberland Boots,Cheap Timberland Boots are top,Tiffany & Co, Tiffany Jewellerys are very nice.Come here to choose the product which you would like ,and we can offer you the best price.

# asics onitsuka tiger mexico

Friday, January 08, 2010 2:23 AM by asics onitsuka tiger mexico    
asics shoes are sheepskin boots.Our feet play an extremely important role in our health, and these asics onitsuka tiger mexico 66 shoes keep the feet utmost comfortable.Like mens onitsuka tiger shoes , it is comfortable and can be styled up and buttoned,slouched and slightly unbuttoned,or completely cuffed.

# mens-lacoste-carnaby-shoes

Friday, January 08, 2010 2:26 AM by mens-lacoste-carnaby-shoes    
Are you planning to find cheap lacoste online?UGG has created a new series of Sell well Lacoste Radiate Croc Shoes> which are approximate to the mid-calf.These boots are made of the first-hand sheepskin which touches comfortable but also feels warm.Fashionable Lacoste Swerve Shoes collection is available in limited colors,such as metallic gold and metallic pewter.

# shoes

Thursday, January 21, 2010 1:03 AM by s    
Christian Louboutin|Louboutin shoes|Louis Vuitton
-----------------------------------------------
http://www.ourshoesbox.com/|http://www.new-fashion.org|http://www.oursbag.com
-----------------------------------------------
Christian Louboutin|Christian Louboutin Shoes|Womens Boots|Christian|Christian boots|Christian heels|Christian high heels|Christian Louboutin boots|Christian Louboutin heels|Christian Louboutin high heels|Christian louboutin shoes|Christian shoes|Louboutin|Louboutin boots|Louboutin heels|Louboutin high heels|louboutin shoes|christian louboutin discount|christian louboutin wedding shoes|christian louboutin sale|louis vuitton handbags|chanel handbags|chanel|louis vuitton|leather bag|tote bag|designer handbags|leather bags|tote bags|canvas tote bag|designer handbag|leather messenger bag|black leather bag|totes bags|brown leather bag|leather tote bag|pink tote bag|large tote bag|designer replica handbags|leather hobo bag|wholesale designer handbags|designer inspired handbags|cheap designer handbags|discount designer handbags|ankle boots|black leather bag|brown boots|brown leather bag|brown shoes|canvas tote bag|chanel|chanel handbags|cheap louis vuitton handbags|designer handbag|designer handbags|discount louis vuitton handbags|discounted handbags|fendi leather bag|handbags for sale|handbags online|handmade bags|handmade handbags|high heel|hobo leather bag|large leather bag|leather bag|leather bag purse|leather bags|leather hand bag|leather hand bags|leather hobo bag|leather messenger bag|leather shoes|leather suede bag|leather tote bag|louis vuitton|louis vuitton handbags|miu miu handbags|patent leather bag|pink leather bag|satchel leather bag|straw handbags|suede handbags|suede shoes|tall boots|tote bag|tote bags|totes bags |handbags wholesale|Louboutin shoes|fashion shoes|sexy boots|high shoes|sexy shoes|stilettos|boots|women shoes|comfortable shoes|bridal shoes|women's shoes|shoes online|shoes on sale|cheap shoes|shoes for sale|new shoes|new balance shoes|fashion shoes|fashion|Handbags|Bags|tote bag|leather bag|designer handbags|high boots|high heels|knee boots|womens boots|boots|Shoe|Womens Shoes

# wedding dress

Monday, January 25, 2010 2:43 AM by wedding dress    

# re: Is the WinForms Designer Evil?

Monday, January 25, 2010 2:56 AM by esdf    
During so many stylish beautiful accessories.Designer Handbags such as the Goyard Handbags,shoes such as the UGG Classic Dakota and the Tiffany & Co Earrings are the most popular among the women all over the world.Here i would like to introduce the best stylish accessories to you.As for me,i like the Miu Miu Handbags.Miu Miu Handbags are one of the famous brand in the world.I like its classic and simple designe.Of course ,different people love different best stylish handbags.For example ,my sister love the Cheap Thomas Wylde Handbags.

# re: Are objects with behavior bad for SOA?

Wednesday, March 10, 2010 12:30 AM by cheap polo shirts    

# re: Are objects with behavior bad for SOA?

Wednesday, March 10, 2010 1:08 AM by ralph lauren polo shirts    

# re: Are objects with behavior bad for SOA?

Wednesday, March 10, 2010 1:50 AM by cheap tennis racquets    
nice post!! There is obviously a lot to know about this. I think you made some good points in Features also.
We have
tennis rackets
babolat tennis rackets
wilson tennis racquets
tennis racquets
wilson tennis racket
cheap babolat tennis racquets
cheap tennis racquets
with excellent quality!!Welcome to our store.

# re: Are objects with behavior bad for SOA?

Wednesday, March 10, 2010 3:11 AM by chaussures pas cher nike    
nice post!! There is obviously a lot to know about this. I think you made some good points in Features also.
We have
nike femmes chaussures
nike chaussures basket
nike chaussures hommes
chaussures pas cher nike
nike chaussures air max
nike chaussures shox
nike chaussures air jordan
with excellent quality!!Welcome to our store.

Post a Comment

 
 
Prove you're not a spammer: 
4 + 4 =