What is the difference between N-Tier and SOA architecture

24,667

Solution 1

Those two cannot be compared because each describes a different thing. Also, be aware that Tier is not the same as Layer.

Tier - process boundary. When you build 3-tier applications you know that UI, BL, and DB will be in 3 different processes which can be on three different machines.

Layer - logical boundary. A single tier can contain multiple layers. It is just the way you build your application to follow OO principles.

SOA - SOA application can be multi-tier and multi-layer but generally it doesn't have to. SOA is an approach to architect the application in the meaning of reusable autonomous interoperable remotely called components. SOA services have to follow four tenets.

To show a simple difference between N-Tier and SOA, let's assume that you are building a service layer on the top of business logic which uses some database. It looks like you are building an N-Tier SOA application, doesn't it? Unfortunately, not every application exposing services follows those tenets. Probably the most critical in this case are "Explicit service boundary" and "Services are autonomous". If your services share some business logic functionality or data in a database, they don't have an explicit boundary and they are not autonomous => the application is not designed as SOA.

There is also a difference between small SOA and large SOA. Mentioned application is a small SOA - each service has to follow tenets. Large SOA is for enterprise integration where you count applications with all its services as a single unit which has to follow tenets.

Solution 2

Ladislav is spot on the money, and you are correct in your assumption that by using WCF alone you are not guaranteed of building a SOA.

Here are some practical examples of how to build a SOA using WCF.

I would suggest you read articles by Thomas Erl and Roger Sessions, this will give you a firm handle on what SOA is all about.

SOA Design Pattern

Achieving integrity in a SOA

Why your SOA should be like a VW Beetle

SOA explained for your boss

Share:
24,667
Venkat
Author by

Venkat

Updated on July 22, 2021

Comments

  • Venkat
    Venkat almost 3 years

    As per my understanding regarding N-Tier and SOA architecture.

    N-Tier

    N-Tier means dividing application into layers, Example I am developing application in asp.net and I pushed total DB Layer to WCF then it is called N-tier.[Tightly coupled]

    SOA[Loosely coupled]

    As per my understanding regarding SOA its very generic term and how well we going to loosely couple our architecture then its called SOA. Best example for SOA services - Stock feeds/ weather feeds.

    My conclusion:

    Even though if we develop application using WCF it does not mean its SOA if it is tightly couple with single client/ or .net applications only can understand about services.

    Can you help me in understanding of SOA VS N-Tier.