Need some guidance about projects makeup and design patterns RRS feed

  • Question

  • Hi guys,


    I am a java programmer whose next project is a .NET one. This app will have 2 different types of interfaces: Web or Windows. One client may use the Web one while another one may use the Windows one. I am planning to control it through an entry in app.config file.

    Code Snippet

        <add key="UserInterface" value="Web"/>



    My concern is

    (1) how to build projects for this app in Visual Studio 

    (2) how to use design patterns in .NET environment.


    After reading some info on internet it looks like I have to follow this pattern:

    User Interface --> Business Facade --> Business Logic -- > DAL.


    If this is the case then I have come up with these projects in Visual Studio:


    Web (User Interface Layer)

    Windows (User Interface Layer)

    BusinessFacade (Business Service Layer)

    BusinessLogic (Business Service Layer)

    BusinessObject (Business Service Layer)

    DAL (Data Access Layer)

    DALFactory (Data Access Layer)

    Config (System Frameworks Layer)


    Am i going to the right path?




    Monday, October 27, 2008 9:19 PM

All replies

  • You have mentioned your requirements only on UI. So it's hard to comment on other layers.


    Depending on the complexity of your UI, you can break it further down into more layers using standard patterns like MVC or MVP


    Hope this helps



    Tuesday, October 28, 2008 12:30 AM
  • I think you are heading towards the right direction.  I use JEE and .NET pretty much everyday, based on that I see where you are coming from and looks like you are correct.


    Your windows application will be like


    Windows UI -> Business facade -> Business Logic -> DAL


    Your web application will be


    Web UI -> Business facade -> Business Logic -> DAL


    As Pavan suggested in his response, you could use MVP for your windows UI and MVC for your Web UI - although your webpages are by default page controller pattern instead of front controller.  Creating a true front controller itself is a project of can use for front controller.  Caveat, there is limited support for


    Finally, I dont know the need for the config section you have mentioned above.  Both your Windows UI and Web UI as applications will have its own config files.  Unless you need to know the client type at the service layer (although there are better ways to manage that).


    You can use pretty much use all the design and architectural patterns that you may have used in JEE world.  In my experience I dont know if there is any that is specific to one of the platform.


    Hope this helps.


    { Gaja; }

    Tuesday, October 28, 2008 2:49 AM
  • Thanks for reply. Its good to know I am on the right path.


    The Config project will manage the application config file. I want only one config file for the whole application. So for example to manage a UserInterfaceType configuration, i put this entry in IRM.config file:

    Code Snippet



        <!-- Valid values: WEB, WINDOWS -->

        <add key="UserInterfaceType" value="WEB"/>





    Then I create an enum

    Code Snippet

    public enum UserInterfaceType








    Then I created a method in my config class to access this file:

    Code Snippet

    public static class IRMConfigManager


      public static UserInterfaceType GetUserInterfaceType()


        // read the value from IRM.config file, convert it to enum and return it






    Tuesday, October 28, 2008 4:22 PM