Which design pattern to use?

Last post 03-29-2008 7:16 AM by scott@elbandit.co.uk. 4 replies.

Sort Posts:

  • Which design pattern to use?

    03-25-2008, 10:02 AM
    • Member
      128 point Member
    • ppayal
    • Member since 03-03-2006, 9:02 AM
    • Posts 118

    Hi,

    My application requires to access a lot of data from database. This makes it little bit slow.

    Which design pattern will be suitable in this context? 

     

  • Re: Which design pattern to use?

    03-25-2008, 10:41 AM
    Answer
    • Contributor
      2,378 point Contributor
    • ParrotBoy
    • Member since 10-08-2003, 5:56 AM
    • England
    • Posts 484

    There are many other factors involved in the decision of an object design pattern, you should start by looking here: Gang Of Four Patterns

    If your application is running slowly I would look at the various types of caching available and make decisions on where this could be used in your app - it could be handled inside the Business Layer, or you could have your own layer ontop of the business layer. Alternatively it could be handled right away by the DAL layer.
     

    Please mark posts as the answer if I was helpful. Thanks!

    Visit my blog
  • Re: Which design pattern to use?

    03-27-2008, 4:22 AM
    Answer
    <ppayal> wrote in message news:2253728@forums.asp.net...

    Hi,

    My application requires to access a lot of data from database. This makes it little bit slow.

    Which design pattern will be suitable in this context? 

     



    http://forums.asp.net/p/1238180/2253728.aspx#2253728

    www.aristonsoft.com - .net 3.5 hosting provider in India.
  • Re: Which design pattern to use?

    03-27-2008, 8:00 AM
    Answer
    • Member
      464 point Member
    • brendan_rice
    • Member since 02-09-2005, 5:55 AM
    • N.Ireland
    • Posts 144

    If your application has been developed and is running slow, then design patterns wouldn't be my first point of call. I would look at the SQL queries as this has been the bottle neck for me a lot of times. 

    Also try to make the application grab chunks of data and implement caching as one of the other replies has already stated.

    As for design patterns, this is a very fluffy question that doesn't really have a correct answer.  If I were you I would look at the Enterprise Library and either the Smart Client Software Factory or the web equivanent depending on what platform you are targeting.

    Some patterns you may want to reseach are:

    Repository Pattern
    Data Transfer Objects
    Data Mapper Pattern

    You may also want to look at other example 3 tier applications and get a feel of what patterns they are using and whether these would work for you.  I would recommend the Timok exaple (google it).

    I hope this helps...

    B

  • Re: Which design pattern to use?

    03-29-2008, 7:16 AM

    To improve the performace of your application you may find these articles helpful, they have a lot of information on handling/displaying large amounts of data

    I hope you find them helpful.

    My Books:

    Professional Enterprise .NET
    Check out my book on learning all about enterprise programming, including TDD, Mocking, DDD, Dependecy Injection, Inversion of Control, Dependency Inversion, NHibernate, MVC & MVP. Check out the code on the projects codeplex site.

    NHibernate with ASP.net Problem-Design-Solution
    Learn all about NHibernate with ASP.net.
Page 1 of 1 (5 items)