is PetShop 2.0 Anti pattern?

Discussion in 'ASP .Net' started by pratham, Aug 31, 2006.

  1. pratham

    pratham Guest

    Hi,

    I was seeing code of PetShop 2.0 and find is quite .. differnet design
    and architecture ..

    too much of clutter in classes .. order class using and Iorder and
    Iorder using an orderInfo and same for product, is this good design
    ...is it MS design principles?

    I just learning the nacks of application designing and architecture and
    i dont know how should be my thinking process ..should i think in
    Classes/object or what way.. ?

    by the way i have joined these formums just few days back ..and i say
    its simply superb you all experts out there trying to help people like
    us.. SALUTES.


    Comments Please
    pratham, Aug 31, 2006
    #1
    1. Advertising

  2. a large group of developers (especially the test first design) believe in
    interface design, and that only interfaces should be used. Interfaces define
    contracts, and classes implement contracts in this design model.

    -- bruce (sqlwork.com)


    "pratham" <> wrote in message
    news:...
    > Hi,
    >
    > I was seeing code of PetShop 2.0 and find is quite .. differnet design
    > and architecture ..
    >
    > too much of clutter in classes .. order class using and Iorder and
    > Iorder using an orderInfo and same for product, is this good design
    > ..is it MS design principles?
    >
    > I just learning the nacks of application designing and architecture and
    > i dont know how should be my thinking process ..should i think in
    > Classes/object or what way.. ?
    >
    > by the way i have joined these formums just few days back ..and i say
    > its simply superb you all experts out there trying to help people like
    > us.. SALUTES.
    >
    >
    > Comments Please
    >
    bruce barker \(sqlwork.com\), Aug 31, 2006
    #2
    1. Advertising

  3. pratham

    pratham Guest

    Interfaces define Contracts? what does it mean exaclty..?

    I have read this line many times " Interface define Contracts" what
    does this mean technically, can please explain me with an example, also
    i want to know whether having interfaces for all your classes is good
    idea?

    Thanks in advance
    bruce barker (sqlwork.com) wrote:
    > a large group of developers (especially the test first design) believe in
    > interface design, and that only interfaces should be used. Interfaces define
    > contracts, and classes implement contracts in this design model.
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "pratham" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I was seeing code of PetShop 2.0 and find is quite .. differnet design
    > > and architecture ..
    > >
    > > too much of clutter in classes .. order class using and Iorder and
    > > Iorder using an orderInfo and same for product, is this good design
    > > ..is it MS design principles?
    > >
    > > I just learning the nacks of application designing and architecture and
    > > i dont know how should be my thinking process ..should i think in
    > > Classes/object or what way.. ?
    > >
    > > by the way i have joined these formums just few days back ..and i say
    > > its simply superb you all experts out there trying to help people like
    > > us.. SALUTES.
    > >
    > >
    > > Comments Please
    > >
    pratham, Sep 3, 2006
    #3
  4. Re: Interfaces define Contracts? what does it mean exaclty..?

    Interfaces define contracts of service.
    Interfaces do not define implementation details.

    The specification of the contract of a component includes the
    input/output behavior, invariance and dependencies to other components.

    Architecturally, interfaces encapsulate nodes and provide clear access points.
    A component or a service is visible exclusively through its interface.

    If your class doesn't include a component or a service,
    i.e., if its properties and/or methods can be called directly, it doesn't need an interface.

    See :
    http://discuss.develop.com/archives/wa.exe?A2=ind0203d&L=dotnet&D=1&T=0&F=&S=&P=93506
    and :
    http://scholar.lib.vt.edu/theses/av...d2.pdf#search=""interfaces define contracts""



    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    "pratham" <> wrote in message
    news:...
    >I have read this line many times " Interface define Contracts" what
    > does this mean technically, can please explain me with an example, also
    > i want to know whether having interfaces for all your classes is good
    > idea?
    >
    > Thanks in advance
    > bruce barker (sqlwork.com) wrote:
    >> a large group of developers (especially the test first design) believe in
    >> interface design, and that only interfaces should be used. Interfaces define
    >> contracts, and classes implement contracts in this design model.
    >>
    >> -- bruce (sqlwork.com)
    >>
    >>
    >> "pratham" <> wrote in message
    >> news:...
    >> > Hi,
    >> >
    >> > I was seeing code of PetShop 2.0 and find is quite .. differnet design
    >> > and architecture ..
    >> >
    >> > too much of clutter in classes .. order class using and Iorder and
    >> > Iorder using an orderInfo and same for product, is this good design
    >> > ..is it MS design principles?
    >> >
    >> > I just learning the nacks of application designing and architecture and
    >> > i dont know how should be my thinking process ..should i think in
    >> > Classes/object or what way.. ?
    >> >
    >> > by the way i have joined these formums just few days back ..and i say
    >> > its simply superb you all experts out there trying to help people like
    >> > us.. SALUTES.
    >> >
    >> >
    >> > Comments Please
    >> >

    >
    Juan T. Llibre, Sep 3, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Rae
    Replies:
    0
    Views:
    608
    Mark Rae
    Mar 7, 2006
  2. Antti S. Brax

    Name that anti-pattern

    Antti S. Brax, Sep 29, 2005, in forum: Java
    Replies:
    15
    Views:
    847
    Chris Smith
    Sep 30, 2005
  3. Ross McKay

    Function Declaration as anti-pattern?

    Ross McKay, Jan 27, 2012, in forum: Javascript
    Replies:
    8
    Views:
    719
    Matt McDonald
    Feb 2, 2012
  4. Demian Brecht

    Are ABCs an anti-pattern?

    Demian Brecht, Oct 2, 2012, in forum: Python
    Replies:
    0
    Views:
    165
    Demian Brecht
    Oct 2, 2012
  5. Terry Reedy

    Re: Are ABCs an anti-pattern?

    Terry Reedy, Oct 2, 2012, in forum: Python
    Replies:
    0
    Views:
    172
    Terry Reedy
    Oct 2, 2012
Loading...

Share This Page