Wednesday, April 27, 2005

Rocky's Take on SOA

Rocky has a good article on SOA, and he makes some interesting points about the issues concerning web service versioning, but he doesn't offer any solutions.

http://theserverside.net/articles/showarticle.tss?id=SOAVersioningCovenant

What I find most interesting is that he once said that "SOA was nothing but Cobol over the internet", it was obvious that his opinion on SOA at the time was not very flattering. My theory is that his previous books on "Business Objects" are probably not selling so well anymore and so he's decided to jump on the SOA bandwagon. Geez, I wonder if his next book will be called "Expert C# SOA" or "CSLA SOA"?

Friday, April 22, 2005

Cloning made easy

Cloning an object is simple if you use serialization.

[Serializable]
public class Sheep : ICloneable
{
private string _name;

public Sheep()
{
}

public string Name
{
get { return _name; }
set { _name = value; }
}

public object Clone()
{
BinaryFormatter formatter = new BinaryFormatter();
MemoryStream ms = new MemoryStream();
formatter.Serialize(ms, this);
ms.Position = 0;
return formatter.Deserialize(ms);
}
}