You must Sign In to post a response.
  • Category: ASP.NET

    Which design Pattern used in your Application.

    Hi I am facing a lot of issue of a question Which design Pattern used in your Application.

    I am not using any design pattern : I am using 3-tier architecture in Asp .Net application and in
    MVC, mvc architecture are there.

    I know there are several design Pattern are there like singleton design pattern,Factory Method etc.
    but I am not using anyone.

    Could you please clarify whats will be the answer.
  • #764949
    it totally depends on your requirement.
    If you want your class to have a single object shared amongst whole application you can go for singleton. best e.g. is create logger for your system where you write log of each activity to a single physical file.
    If your subclasses needs to figure out what objects should be created then you can go for factory method. You can find good real time example for factory method here:
    Hope it helps.
    Shashikant Gurav

  • #764964
    Hi Jay.

    MVC architecture and 3-Tier architecture are considered as architectural pattern.
    These can be partially called as design patterns.
    Design pattern is nothing but a structure to follow while developing the code.
    It can also be said as a building block which is mainly used for reusability and for better maintenance.
    But if the question arises have you used design pattern you can say MVC design pattern we used and 3-tire architecture is the answer for your question.
    Hope you got some idea.

    Sridhar Thota.
    Editor: DNS Forum.

  • #764965
    If you are using MVC then, it represent 'architectural pattern' as well as 'design pattern' as follows
    - In MVC many UI widget libraries available out there where MVC is used as a design pattern to implement widgets
    here is the definition for Architectural and Design pattern
    Architectural pattern: Concerned with the subsystems of an application with their relationships and collaborations with each other.
    Design pattern: Concerned with the (further small) components of a subsystem with their relationships and collaborations with each other.
    basically Design patterns say how to write code effectively and Architectural patterns say how to utilize resources effectively.

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #765016
    First up all do not worry about any design patterns. The design patters are nothing but some of the proto types that somebody used for earlier projects. Somebody will write some code that will be easy to handle some situation. So we are following those coding style as design patterns.

    We have lot of design patterns. One project may have lot of design patterns. If you see your code deeply you may notice lot of design patterns already implemented without your knowledge :) .

    The above is your present condition. In reverse, Learn all the design patterns. Now once the requirement start coding according to the situation based on the design pattern which you know will get an idea. So you coding style will improve. And another case if anybody see your code can also then can easily understand the code.

    By Nathan
    Direction is important than speed

  • Sign In to post your comments