locked
Designing a layered architecture RRS feed

  • Question

  • User-1839033458 posted

    Hi people

    I'm designing the architecture for a new proyect (It would be my first design) and after read lots of articles i would like to show you the final design model to read your opinions.

    Architecture picture

    Solution Architecture


    VS 2010 implementation picture

    Solution implementation

    As you can see there is a web project, a business controller proyect, a data controller proyect, and a business entities (as DTOs), that are shared in all layers.

    I would like to know if you would use WCF in this schema, or another layer.

    I need advice.

    Thanks

    Jonathan

    Friday, April 30, 2010 11:26 AM

Answers

  • User-1171043462 posted

    No interface will be a layer between App and business. The interface layer will contain a interface for each business class

    Eg Person will have a corresponding interface IPerson

    public Person : IPerson

    Also you will have to create an intializer class  say Access.cs which will contain methods that return object of different business classes

    Eg

    public static IPerson CreatePerson()

    {

    return new Person();

    }

     

    And in the App layer you can create objects in following way

     

    IPerson iPerson = Access.CreatePerson()

    //Then call the methods in normal way

    iPerson.GetPersons();

     

    This way you hide the Business layer from the App layer and make use to Interface layer to act as a middle tier between App and Business

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 1, 2010 2:38 AM

All replies

  • User-1171043462 posted

    If you want to make it more re usable you can add additional layer of WCF and if not WCF a layer of Interfaces which will interact with the Presentation layer 

    Friday, April 30, 2010 2:20 PM
  • User-1839033458 posted

    If you want to make it more re usable you can add additional layer of WCF and if not WCF a layer of Interfaces which will interact with the Presentation layer 

     

    I see, the web server access directly to business layer and domain layer, since all layers are in the same tier, so in this case wont be necesary WCF, but what do you mean with interfaces layer? Can the interfaces be in the domain (shared) layer? and be implemented by the business controller and data layer controller?

    Friday, April 30, 2010 2:45 PM
  • User-1171043462 posted

    No interface will be a layer between App and business. The interface layer will contain a interface for each business class

    Eg Person will have a corresponding interface IPerson

    public Person : IPerson

    Also you will have to create an intializer class  say Access.cs which will contain methods that return object of different business classes

    Eg

    public static IPerson CreatePerson()

    {

    return new Person();

    }

     

    And in the App layer you can create objects in following way

     

    IPerson iPerson = Access.CreatePerson()

    //Then call the methods in normal way

    iPerson.GetPersons();

     

    This way you hide the Business layer from the App layer and make use to Interface layer to act as a middle tier between App and Business

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 1, 2010 2:38 AM