Follow @RoyOsherove on Twitter

Using SOA on existing N-tier applications

Udi Dahan writes very eloquently and shows a simple implementation example using Service Oriented Architecture.

While I agree with the main theme, I can't help but wonder, What happens when you need to introduce the SOA theme on an existing N-tier application?  Udi recommends:

"step 1 is to create a new layer, called Entities ( or something else if you prefer ) and copy all the classes of your BL that are part of the domain model to it. Next, remove all methods from those classes"

If I got this correctly this does not take into account a (probable) situation in which the application needs to add services to it's functionality while keeping the current behavior for existing clients. You can't just move half of your logic layer into a different one. Instead it seems to me that a services layer can be put on top of the existing logical layer as an optional way to communicate from the client. This way existing client applications that used the N-tier model successfully can keep using the logic layer directly, while the services layer allows remote clients access the logical functionality using a fixed set of one-entry point classes, much like Udi's description. Am I missing something here?

Learning from mistakes: the Don Quixote pattern

The RSA encryption algorithm - step by step