locked
N-Tier Architecture plus SOA RRS feed

  • Question

  • User435002097 posted

    Can we have n-Tier Architecture with SOA implemented , for Web applications with WCF

    if Yes , How can we justify it OR in which scenario we can use this

    and in which tier we can have WCF Services/web Services.

    Sunday, January 18, 2015 2:49 AM

Answers

  • User-1990124160 posted

    Can we have n-Tier Architecture with SOA implemented , for Web applications with WCF

    if Yes , How can we justify it OR in which scenario we can use this

    and in which tier we can have WCF Services/web Services.

    It can look like this:

    MyApp.Web (ASP.NET MVC) -> MyApp.BLL (Business logic) -> MyApp.Services (Calls to remote services, db, etc.) -> MyApp.DAL (EF, UnitOfWork/Repositories etc)

    To summarise the flow, in response to a request from your web app you, maybe call a method in your business layer which then calls to its relevant service to get the data. Depending on whether the data to reply is on database or remote; the service will make a request to another API or use a repository to call in to the database and return the result back up the chain. 

    So your BLL does not have any dependency on things like Json.NET or HttpClient. Your Services layer is encapsulating that.
    Also your services layer does not have any dependency on database related assemblies like EF or System.Data. DAL is encapsulating that.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 18, 2015 3:06 AM
  • User-1990124160 posted

    how layers will get changed if we put data warehouse tool for which we push/pull data through services along with database in the same application.

    I did not understand your question clearly but anything to do with database should end up in DAL.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 18, 2015 12:23 PM

All replies

  • User-1990124160 posted

    Can we have n-Tier Architecture with SOA implemented , for Web applications with WCF

    if Yes , How can we justify it OR in which scenario we can use this

    and in which tier we can have WCF Services/web Services.

    It can look like this:

    MyApp.Web (ASP.NET MVC) -> MyApp.BLL (Business logic) -> MyApp.Services (Calls to remote services, db, etc.) -> MyApp.DAL (EF, UnitOfWork/Repositories etc)

    To summarise the flow, in response to a request from your web app you, maybe call a method in your business layer which then calls to its relevant service to get the data. Depending on whether the data to reply is on database or remote; the service will make a request to another API or use a repository to call in to the database and return the result back up the chain. 

    So your BLL does not have any dependency on things like Json.NET or HttpClient. Your Services layer is encapsulating that.
    Also your services layer does not have any dependency on database related assemblies like EF or System.Data. DAL is encapsulating that.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 18, 2015 3:06 AM
  • User435002097 posted

    Thanks IbrahimIslam ,

    how layers will get changed if we put data warehouse tool for which we push/pull data through services along with database in the same application.

    will that come under data layer or service layer?

    Sunday, January 18, 2015 7:57 AM
  • User-1990124160 posted

    how layers will get changed if we put data warehouse tool for which we push/pull data through services along with database in the same application.

    I did not understand your question clearly but anything to do with database should end up in DAL.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 18, 2015 12:23 PM
  • User-1067017023 posted

    in response to a request from your web app you, maybe call a method in your business layer which then calls to its relevant service to get the data. Depending on whether the data to reply is on database or remote; the service will make a request to another API or use a repository to call in to the database and return the result back up the chain

    Are you sure about that? Isn't the service supposed to sit between the web application and the BLL?

    Monday, February 2, 2015 10:55 AM