3-tier layers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dan Aldean

    3-tier layers

    Hello,

    I try to understand how the business and presentation layers would
    practically
    translate into programming reality.
    I read lots of articles about 3-tier, but none of them gave a practical
    example
    and I managed to understand the data layer only.
    Is for example web services and their consumption an instance of n-tier,
    covering the business and presentation layers?
    If it is not necessary a WEB development how would the presentation and
    business
    layer come to life, through what? Is ASP the presentation layer and C# the
    business layer?

    Thanks a lot.


  • Kevin Spencer

    #2
    Re: 3-tier layers

    The 3-tier model is based upon separation of general functionality. You have
    3 tiers:

    Interface
    Business
    Data

    Each tier is more specific than the one below.

    The Data Tier is only for working with underlying data stores. It knows
    nothing of specific business rules about how to handle the data. It only
    knows how to fetch it, change it, delete it, that sort of thing. It is a
    programming interface to the data that any application stores. As such, it
    is agnostic of any rules concerning what the data is, or how it is to be
    treated. It is the "supply clerk" of the organization. This way it can be
    used by many applications.

    The Business Tier is for manipulating the data. It contains the Business
    logic and Business rules that comprise the "engine" of an application. It
    knows everything about the Data Tier, while the Data Tier knows nothing
    about the Business Tier. The Business Tier works with Data, but does nothing
    to expose it to a user. It does expose what is necessary for any other
    component or application to be able to work with the data, and is in charge
    of making sure that everything is handled according to the Business rules.
    It has a programming interface, but no user interface. This way, the
    functionality of the Business tier can be used in many different types of
    interfaces.

    The User Interface is the most specific. It knows nothing about the Data
    Tier; that is the Business Tier's job. It knows everything about the exposed
    API of the Business tier, and its job is to present the data to the user,
    and to take input from the User and relay it to the Business Tier. It is a
    "universal translator" for the application, which speaks human at one end,
    and business API at the other.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Professional Numbskull

    Hard work is a medication for which
    there is no placebo.

    "Dan Aldean" <danaldean@yaho o.com> wrote in message
    news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...[color=blue]
    > Hello,
    >
    > I try to understand how the business and presentation layers would
    > practically
    > translate into programming reality.
    > I read lots of articles about 3-tier, but none of them gave a practical
    > example
    > and I managed to understand the data layer only.
    > Is for example web services and their consumption an instance of n-tier,
    > covering the business and presentation layers?
    > If it is not necessary a WEB development how would the presentation and
    > business
    > layer come to life, through what? Is ASP the presentation layer and C#
    > the business layer?
    >
    > Thanks a lot.
    >[/color]


    Comment

    • Andy

      #3
      Re: 3-tier layers

      I'd add that each tier should be allowed to be physically seperated as
      well. All the tiers can operate on seperate servers / workstations.

      Comment

      • Dan Aldean

        #4
        Re: 3-tier layers

        Thanks for replying,
        I was looking more for a description of how the business layer can be
        expressed: a DLL,
        a COM object, a WEB service?
        Theoretically I understand the concept, but the practical side is difficult
        for me to grab.
        As I see it WEB services would solve the business layer, but what's used
        when the application is Windows based?

        "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
        news:OV3KCwJaGH A.1200@TK2MSFTN GP03.phx.gbl...[color=blue]
        > The 3-tier model is based upon separation of general functionality. You
        > have 3 tiers:
        >
        > Interface
        > Business
        > Data
        >
        > Each tier is more specific than the one below.
        >
        > The Data Tier is only for working with underlying data stores. It knows
        > nothing of specific business rules about how to handle the data. It only
        > knows how to fetch it, change it, delete it, that sort of thing. It is a
        > programming interface to the data that any application stores. As such, it
        > is agnostic of any rules concerning what the data is, or how it is to be
        > treated. It is the "supply clerk" of the organization. This way it can be
        > used by many applications.
        >
        > The Business Tier is for manipulating the data. It contains the Business
        > logic and Business rules that comprise the "engine" of an application. It
        > knows everything about the Data Tier, while the Data Tier knows nothing
        > about the Business Tier. The Business Tier works with Data, but does
        > nothing to expose it to a user. It does expose what is necessary for any
        > other component or application to be able to work with the data, and is in
        > charge of making sure that everything is handled according to the Business
        > rules. It has a programming interface, but no user interface. This way,
        > the functionality of the Business tier can be used in many different types
        > of interfaces.
        >
        > The User Interface is the most specific. It knows nothing about the Data
        > Tier; that is the Business Tier's job. It knows everything about the
        > exposed API of the Business tier, and its job is to present the data to
        > the user, and to take input from the User and relay it to the Business
        > Tier. It is a "universal translator" for the application, which speaks
        > human at one end, and business API at the other.
        >
        > --
        > HTH,
        >
        > Kevin Spencer
        > Microsoft MVP
        > Professional Numbskull
        >
        > Hard work is a medication for which
        > there is no placebo.
        >
        > "Dan Aldean" <danaldean@yaho o.com> wrote in message
        > news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...[color=green]
        >> Hello,
        >>
        >> I try to understand how the business and presentation layers would
        >> practically
        >> translate into programming reality.
        >> I read lots of articles about 3-tier, but none of them gave a practical
        >> example
        >> and I managed to understand the data layer only.
        >> Is for example web services and their consumption an instance of n-tier,
        >> covering the business and presentation layers?
        >> If it is not necessary a WEB development how would the presentation and
        >> business
        >> layer come to life, through what? Is ASP the presentation layer and C#
        >> the business layer?
        >>
        >> Thanks a lot.
        >>[/color]
        >
        >[/color]


        Comment

        • Robbe Morris [C# MVP]

          #5
          .NET 2.0 Generics and application layers

          If you are working in .NET 2.0, you'll want to become familiar
          with Generics. There are ways to make the different layers
          see only portions of your classes so as not to violate
          certain design principles.



          --
          Robbe Morris - 2004-2006 Microsoft MVP C#
          Earn money answering .NET questions






          "Dan Aldean" <danaldean@yaho o.com> wrote in message
          news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...[color=blue]
          > Hello,
          >
          > I try to understand how the business and presentation layers would
          > practically
          > translate into programming reality.
          > I read lots of articles about 3-tier, but none of them gave a practical
          > example
          > and I managed to understand the data layer only.
          > Is for example web services and their consumption an instance of n-tier,
          > covering the business and presentation layers?
          > If it is not necessary a WEB development how would the presentation and
          > business
          > layer come to life, through what? Is ASP the presentation layer and C#
          > the business layer?
          >
          > Thanks a lot.
          >[/color]


          Comment

          • Kevin Spencer

            #6
            Re: 3-tier layers

            A Web Service is an interface. It is a form of presentation tier. It exposes
            the API of a set of business classes. A Business tier is a set of classes. A
            DLL is a container for code. A COM object isn't even .Net. A Data Tier is
            also a set of classes. The classes can reside in one or more assemblies. An
            assembly is stored in one or more DLLs.

            --
            HTH,

            Kevin Spencer
            Microsoft MVP
            Professional Numbskull

            Hard work is a medication for which
            there is no placebo.

            "Dan Aldean" <danaldean@yaho o.com> wrote in message
            news:OyAYYDKaGH A.3532@TK2MSFTN GP05.phx.gbl...[color=blue]
            > Thanks for replying,
            > I was looking more for a description of how the business layer can be
            > expressed: a DLL,
            > a COM object, a WEB service?
            > Theoretically I understand the concept, but the practical side is
            > difficult for me to grab.
            > As I see it WEB services would solve the business layer, but what's used
            > when the application is Windows based?
            >
            > "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
            > news:OV3KCwJaGH A.1200@TK2MSFTN GP03.phx.gbl...[color=green]
            >> The 3-tier model is based upon separation of general functionality. You
            >> have 3 tiers:
            >>
            >> Interface
            >> Business
            >> Data
            >>
            >> Each tier is more specific than the one below.
            >>
            >> The Data Tier is only for working with underlying data stores. It knows
            >> nothing of specific business rules about how to handle the data. It only
            >> knows how to fetch it, change it, delete it, that sort of thing. It is a
            >> programming interface to the data that any application stores. As such,
            >> it is agnostic of any rules concerning what the data is, or how it is to
            >> be treated. It is the "supply clerk" of the organization. This way it can
            >> be used by many applications.
            >>
            >> The Business Tier is for manipulating the data. It contains the Business
            >> logic and Business rules that comprise the "engine" of an application. It
            >> knows everything about the Data Tier, while the Data Tier knows nothing
            >> about the Business Tier. The Business Tier works with Data, but does
            >> nothing to expose it to a user. It does expose what is necessary for any
            >> other component or application to be able to work with the data, and is
            >> in charge of making sure that everything is handled according to the
            >> Business rules. It has a programming interface, but no user interface.
            >> This way, the functionality of the Business tier can be used in many
            >> different types of interfaces.
            >>
            >> The User Interface is the most specific. It knows nothing about the Data
            >> Tier; that is the Business Tier's job. It knows everything about the
            >> exposed API of the Business tier, and its job is to present the data to
            >> the user, and to take input from the User and relay it to the Business
            >> Tier. It is a "universal translator" for the application, which speaks
            >> human at one end, and business API at the other.
            >>
            >> --
            >> HTH,
            >>
            >> Kevin Spencer
            >> Microsoft MVP
            >> Professional Numbskull
            >>
            >> Hard work is a medication for which
            >> there is no placebo.
            >>
            >> "Dan Aldean" <danaldean@yaho o.com> wrote in message
            >> news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...[color=darkred]
            >>> Hello,
            >>>
            >>> I try to understand how the business and presentation layers would
            >>> practically
            >>> translate into programming reality.
            >>> I read lots of articles about 3-tier, but none of them gave a practical
            >>> example
            >>> and I managed to understand the data layer only.
            >>> Is for example web services and their consumption an instance of n-tier,
            >>> covering the business and presentation layers?
            >>> If it is not necessary a WEB development how would the presentation and
            >>> business
            >>> layer come to life, through what? Is ASP the presentation layer and C#
            >>> the business layer?
            >>>
            >>> Thanks a lot.
            >>>[/color]
            >>
            >>[/color]
            >
            >[/color]


            Comment

            • William Stacey [MVP]

              #7
              Re: 3-tier layers

              Nicely put Kevin.

              --
              William Stacey [MVP]

              ....


              Comment

              • Dan Aldean

                #8
                Re: 3-tier layers

                Thanks Kevin,
                Couldn't be a WEB service considered a business layer as long as it is a
                class with different methods and the application that makes a reference
                becomes a presentation layer?
                I can create a service on a separate server for example, where I can put all
                the business logic in it, but it does not have a presentation until I create
                an application on another server (that makes a reference to the service)
                which uses controls for the user input.


                "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                news:OxUJHKNaGH A.4752@TK2MSFTN GP02.phx.gbl...[color=blue]
                >A Web Service is an interface. It is a form of presentation tier. It
                >exposes the API of a set of business classes. A Business tier is a set of
                >classes. A DLL is a container for code. A COM object isn't even .Net. A
                >Data Tier is also a set of classes. The classes can reside in one or more
                >assemblies. An assembly is stored in one or more DLLs.
                >
                > --
                > HTH,
                >
                > Kevin Spencer
                > Microsoft MVP
                > Professional Numbskull
                >
                > Hard work is a medication for which
                > there is no placebo.
                >
                > "Dan Aldean" <danaldean@yaho o.com> wrote in message
                > news:OyAYYDKaGH A.3532@TK2MSFTN GP05.phx.gbl...[color=green]
                >> Thanks for replying,
                >> I was looking more for a description of how the business layer can be
                >> expressed: a DLL,
                >> a COM object, a WEB service?
                >> Theoretically I understand the concept, but the practical side is
                >> difficult for me to grab.
                >> As I see it WEB services would solve the business layer, but what's used
                >> when the application is Windows based?
                >>
                >> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                >> news:OV3KCwJaGH A.1200@TK2MSFTN GP03.phx.gbl...[color=darkred]
                >>> The 3-tier model is based upon separation of general functionality. You
                >>> have 3 tiers:
                >>>
                >>> Interface
                >>> Business
                >>> Data
                >>>
                >>> Each tier is more specific than the one below.
                >>>
                >>> The Data Tier is only for working with underlying data stores. It knows
                >>> nothing of specific business rules about how to handle the data. It only
                >>> knows how to fetch it, change it, delete it, that sort of thing. It is a
                >>> programming interface to the data that any application stores. As such,
                >>> it is agnostic of any rules concerning what the data is, or how it is to
                >>> be treated. It is the "supply clerk" of the organization. This way it
                >>> can be used by many applications.
                >>>
                >>> The Business Tier is for manipulating the data. It contains the Business
                >>> logic and Business rules that comprise the "engine" of an application.
                >>> It knows everything about the Data Tier, while the Data Tier knows
                >>> nothing about the Business Tier. The Business Tier works with Data, but
                >>> does nothing to expose it to a user. It does expose what is necessary
                >>> for any other component or application to be able to work with the data,
                >>> and is in charge of making sure that everything is handled according to
                >>> the Business rules. It has a programming interface, but no user
                >>> interface. This way, the functionality of the Business tier can be used
                >>> in many different types of interfaces.
                >>>
                >>> The User Interface is the most specific. It knows nothing about the Data
                >>> Tier; that is the Business Tier's job. It knows everything about the
                >>> exposed API of the Business tier, and its job is to present the data to
                >>> the user, and to take input from the User and relay it to the Business
                >>> Tier. It is a "universal translator" for the application, which speaks
                >>> human at one end, and business API at the other.
                >>>
                >>> --
                >>> HTH,
                >>>
                >>> Kevin Spencer
                >>> Microsoft MVP
                >>> Professional Numbskull
                >>>
                >>> Hard work is a medication for which
                >>> there is no placebo.
                >>>
                >>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                >>> news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...
                >>>> Hello,
                >>>>
                >>>> I try to understand how the business and presentation layers would
                >>>> practically
                >>>> translate into programming reality.
                >>>> I read lots of articles about 3-tier, but none of them gave a practical
                >>>> example
                >>>> and I managed to understand the data layer only.
                >>>> Is for example web services and their consumption an instance of
                >>>> n-tier,
                >>>> covering the business and presentation layers?
                >>>> If it is not necessary a WEB development how would the presentation and
                >>>> business
                >>>> layer come to life, through what? Is ASP the presentation layer and C#
                >>>> the business layer?
                >>>>
                >>>> Thanks a lot.
                >>>>
                >>>
                >>>[/color]
                >>
                >>[/color]
                >
                >[/color]


                Comment

                • Andy

                  #9
                  Re: 3-tier layers

                  The business layer is usually just an assembly dll used directly. If
                  you have functionality of the business layer you need to expose to
                  untrusted sources (such as partner companies, etc), you usually build a
                  facade layer to communicate with the business layer. The facade layer
                  could be a web service.

                  A web service should not be the business layer though; the web service
                  should be just another 'UI' to the business layer. that way you could
                  use the business layer in a windows forms application (and wouldn't
                  need to go throuh a web service).

                  Comment

                  • Kevin Spencer

                    #10
                    Re: 3-tier layers

                    If you put your business logic into a Web Service, you have bound the API
                    for that business logic to a Web Service interface. The Web Service itself
                    is an interface, but not a programming interface, strictly. Not a good idea,
                    since there is latency involved, and severe restrictions on the interface
                    itself. Everything passed through it must be serialized as XML.

                    --
                    HTH,

                    Kevin Spencer
                    Microsoft MVP
                    Professional Numbskull

                    Hard work is a medication for which
                    there is no placebo.

                    "Dan Aldean" <danaldean@yaho o.com> wrote in message
                    news:%23s0rMpSa GHA.1200@TK2MSF TNGP03.phx.gbl. ..[color=blue]
                    > Thanks Kevin,
                    > Couldn't be a WEB service considered a business layer as long as it is a
                    > class with different methods and the application that makes a reference
                    > becomes a presentation layer?
                    > I can create a service on a separate server for example, where I can put
                    > all the business logic in it, but it does not have a presentation until I
                    > create an application on another server (that makes a reference to the
                    > service) which uses controls for the user input.
                    >
                    >
                    > "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                    > news:OxUJHKNaGH A.4752@TK2MSFTN GP02.phx.gbl...[color=green]
                    >>A Web Service is an interface. It is a form of presentation tier. It
                    >>exposes the API of a set of business classes. A Business tier is a set of
                    >>classes. A DLL is a container for code. A COM object isn't even .Net. A
                    >>Data Tier is also a set of classes. The classes can reside in one or more
                    >>assemblies. An assembly is stored in one or more DLLs.
                    >>
                    >> --
                    >> HTH,
                    >>
                    >> Kevin Spencer
                    >> Microsoft MVP
                    >> Professional Numbskull
                    >>
                    >> Hard work is a medication for which
                    >> there is no placebo.
                    >>
                    >> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                    >> news:OyAYYDKaGH A.3532@TK2MSFTN GP05.phx.gbl...[color=darkred]
                    >>> Thanks for replying,
                    >>> I was looking more for a description of how the business layer can be
                    >>> expressed: a DLL,
                    >>> a COM object, a WEB service?
                    >>> Theoretically I understand the concept, but the practical side is
                    >>> difficult for me to grab.
                    >>> As I see it WEB services would solve the business layer, but what's used
                    >>> when the application is Windows based?
                    >>>
                    >>> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                    >>> news:OV3KCwJaGH A.1200@TK2MSFTN GP03.phx.gbl...
                    >>>> The 3-tier model is based upon separation of general functionality. You
                    >>>> have 3 tiers:
                    >>>>
                    >>>> Interface
                    >>>> Business
                    >>>> Data
                    >>>>
                    >>>> Each tier is more specific than the one below.
                    >>>>
                    >>>> The Data Tier is only for working with underlying data stores. It knows
                    >>>> nothing of specific business rules about how to handle the data. It
                    >>>> only knows how to fetch it, change it, delete it, that sort of thing.
                    >>>> It is a programming interface to the data that any application stores.
                    >>>> As such, it is agnostic of any rules concerning what the data is, or
                    >>>> how it is to be treated. It is the "supply clerk" of the organization.
                    >>>> This way it can be used by many applications.
                    >>>>
                    >>>> The Business Tier is for manipulating the data. It contains the
                    >>>> Business logic and Business rules that comprise the "engine" of an
                    >>>> application. It knows everything about the Data Tier, while the Data
                    >>>> Tier knows nothing about the Business Tier. The Business Tier works
                    >>>> with Data, but does nothing to expose it to a user. It does expose what
                    >>>> is necessary for any other component or application to be able to work
                    >>>> with the data, and is in charge of making sure that everything is
                    >>>> handled according to the Business rules. It has a programming
                    >>>> interface, but no user interface. This way, the functionality of the
                    >>>> Business tier can be used in many different types of interfaces.
                    >>>>
                    >>>> The User Interface is the most specific. It knows nothing about the
                    >>>> Data Tier; that is the Business Tier's job. It knows everything about
                    >>>> the exposed API of the Business tier, and its job is to present the
                    >>>> data to the user, and to take input from the User and relay it to the
                    >>>> Business Tier. It is a "universal translator" for the application,
                    >>>> which speaks human at one end, and business API at the other.
                    >>>>
                    >>>> --
                    >>>> HTH,
                    >>>>
                    >>>> Kevin Spencer
                    >>>> Microsoft MVP
                    >>>> Professional Numbskull
                    >>>>
                    >>>> Hard work is a medication for which
                    >>>> there is no placebo.
                    >>>>
                    >>>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                    >>>> news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...
                    >>>>> Hello,
                    >>>>>
                    >>>>> I try to understand how the business and presentation layers would
                    >>>>> practically
                    >>>>> translate into programming reality.
                    >>>>> I read lots of articles about 3-tier, but none of them gave a
                    >>>>> practical example
                    >>>>> and I managed to understand the data layer only.
                    >>>>> Is for example web services and their consumption an instance of
                    >>>>> n-tier,
                    >>>>> covering the business and presentation layers?
                    >>>>> If it is not necessary a WEB development how would the presentation
                    >>>>> and business
                    >>>>> layer come to life, through what? Is ASP the presentation layer and
                    >>>>> C# the business layer?
                    >>>>>
                    >>>>> Thanks a lot.
                    >>>>>
                    >>>>
                    >>>>
                    >>>
                    >>>[/color]
                    >>
                    >>[/color]
                    >
                    >[/color]


                    Comment

                    • Andy

                      #11
                      Re: 3-tier layers

                      A web service is more of a service and the contract shouldn't change
                      much.

                      If you build a business layer as a web service and then need to change
                      the business object model, you'll force everyone that consumes your web
                      service to update thier code. The web service should just be an
                      interface to the business objects. That way your web services don't
                      necessarly need to change if you change the business logic.

                      Comment

                      • Dan Aldean

                        #12
                        Re: 3-tier layers

                        So the solution is to create Class Library projects to keep the business
                        layer?
                        Sorry, I am new to C# too.

                        "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                        news:OBL164SaGH A.1192@TK2MSFTN GP04.phx.gbl...[color=blue]
                        > If you put your business logic into a Web Service, you have bound the API
                        > for that business logic to a Web Service interface. The Web Service itself
                        > is an interface, but not a programming interface, strictly. Not a good
                        > idea, since there is latency involved, and severe restrictions on the
                        > interface itself. Everything passed through it must be serialized as XML.
                        >
                        > --
                        > HTH,
                        >
                        > Kevin Spencer
                        > Microsoft MVP
                        > Professional Numbskull
                        >
                        > Hard work is a medication for which
                        > there is no placebo.
                        >
                        > "Dan Aldean" <danaldean@yaho o.com> wrote in message
                        > news:%23s0rMpSa GHA.1200@TK2MSF TNGP03.phx.gbl. ..[color=green]
                        >> Thanks Kevin,
                        >> Couldn't be a WEB service considered a business layer as long as it is a
                        >> class with different methods and the application that makes a reference
                        >> becomes a presentation layer?
                        >> I can create a service on a separate server for example, where I can put
                        >> all the business logic in it, but it does not have a presentation until I
                        >> create an application on another server (that makes a reference to the
                        >> service) which uses controls for the user input.
                        >>
                        >>
                        >> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                        >> news:OxUJHKNaGH A.4752@TK2MSFTN GP02.phx.gbl...[color=darkred]
                        >>>A Web Service is an interface. It is a form of presentation tier. It
                        >>>exposes the API of a set of business classes. A Business tier is a set of
                        >>>classes. A DLL is a container for code. A COM object isn't even .Net. A
                        >>>Data Tier is also a set of classes. The classes can reside in one or more
                        >>>assemblies . An assembly is stored in one or more DLLs.
                        >>>
                        >>> --
                        >>> HTH,
                        >>>
                        >>> Kevin Spencer
                        >>> Microsoft MVP
                        >>> Professional Numbskull
                        >>>
                        >>> Hard work is a medication for which
                        >>> there is no placebo.
                        >>>
                        >>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                        >>> news:OyAYYDKaGH A.3532@TK2MSFTN GP05.phx.gbl...
                        >>>> Thanks for replying,
                        >>>> I was looking more for a description of how the business layer can be
                        >>>> expressed: a DLL,
                        >>>> a COM object, a WEB service?
                        >>>> Theoretically I understand the concept, but the practical side is
                        >>>> difficult for me to grab.
                        >>>> As I see it WEB services would solve the business layer, but what's
                        >>>> used when the application is Windows based?
                        >>>>
                        >>>> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                        >>>> news:OV3KCwJaGH A.1200@TK2MSFTN GP03.phx.gbl...
                        >>>>> The 3-tier model is based upon separation of general functionality.
                        >>>>> You have 3 tiers:
                        >>>>>
                        >>>>> Interface
                        >>>>> Business
                        >>>>> Data
                        >>>>>
                        >>>>> Each tier is more specific than the one below.
                        >>>>>
                        >>>>> The Data Tier is only for working with underlying data stores. It
                        >>>>> knows nothing of specific business rules about how to handle the data.
                        >>>>> It only knows how to fetch it, change it, delete it, that sort of
                        >>>>> thing. It is a programming interface to the data that any application
                        >>>>> stores. As such, it is agnostic of any rules concerning what the data
                        >>>>> is, or how it is to be treated. It is the "supply clerk" of the
                        >>>>> organization. This way it can be used by many applications.
                        >>>>>
                        >>>>> The Business Tier is for manipulating the data. It contains the
                        >>>>> Business logic and Business rules that comprise the "engine" of an
                        >>>>> application. It knows everything about the Data Tier, while the Data
                        >>>>> Tier knows nothing about the Business Tier. The Business Tier works
                        >>>>> with Data, but does nothing to expose it to a user. It does expose
                        >>>>> what is necessary for any other component or application to be able to
                        >>>>> work with the data, and is in charge of making sure that everything is
                        >>>>> handled according to the Business rules. It has a programming
                        >>>>> interface, but no user interface. This way, the functionality of the
                        >>>>> Business tier can be used in many different types of interfaces.
                        >>>>>
                        >>>>> The User Interface is the most specific. It knows nothing about the
                        >>>>> Data Tier; that is the Business Tier's job. It knows everything about
                        >>>>> the exposed API of the Business tier, and its job is to present the
                        >>>>> data to the user, and to take input from the User and relay it to the
                        >>>>> Business Tier. It is a "universal translator" for the application,
                        >>>>> which speaks human at one end, and business API at the other.
                        >>>>>
                        >>>>> --
                        >>>>> HTH,
                        >>>>>
                        >>>>> Kevin Spencer
                        >>>>> Microsoft MVP
                        >>>>> Professional Numbskull
                        >>>>>
                        >>>>> Hard work is a medication for which
                        >>>>> there is no placebo.
                        >>>>>
                        >>>>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                        >>>>> news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...
                        >>>>>> Hello,
                        >>>>>>
                        >>>>>> I try to understand how the business and presentation layers would
                        >>>>>> practically
                        >>>>>> translate into programming reality.
                        >>>>>> I read lots of articles about 3-tier, but none of them gave a
                        >>>>>> practical example
                        >>>>>> and I managed to understand the data layer only.
                        >>>>>> Is for example web services and their consumption an instance of
                        >>>>>> n-tier,
                        >>>>>> covering the business and presentation layers?
                        >>>>>> If it is not necessary a WEB development how would the presentation
                        >>>>>> and business
                        >>>>>> layer come to life, through what? Is ASP the presentation layer and
                        >>>>>> C# the business layer?
                        >>>>>>
                        >>>>>> Thanks a lot.
                        >>>>>>
                        >>>>>
                        >>>>>
                        >>>>
                        >>>>
                        >>>
                        >>>[/color]
                        >>
                        >>[/color]
                        >
                        >[/color]


                        Comment

                        • Kevin Spencer

                          #13
                          Re: 3-tier layers

                          Yes, business classes would be in class libraries.

                          --
                          HTH,

                          Kevin Spencer
                          Microsoft MVP
                          Professional Numbskull

                          Hard work is a medication for which
                          there is no placebo.

                          "Dan Aldean" <danaldean@yaho o.com> wrote in message
                          news:e2DSN9SaGH A.4036@TK2MSFTN GP04.phx.gbl...[color=blue]
                          > So the solution is to create Class Library projects to keep the business
                          > layer?
                          > Sorry, I am new to C# too.
                          >
                          > "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                          > news:OBL164SaGH A.1192@TK2MSFTN GP04.phx.gbl...[color=green]
                          >> If you put your business logic into a Web Service, you have bound the API
                          >> for that business logic to a Web Service interface. The Web Service
                          >> itself is an interface, but not a programming interface, strictly. Not a
                          >> good idea, since there is latency involved, and severe restrictions on
                          >> the interface itself. Everything passed through it must be serialized as
                          >> XML.
                          >>
                          >> --
                          >> HTH,
                          >>
                          >> Kevin Spencer
                          >> Microsoft MVP
                          >> Professional Numbskull
                          >>
                          >> Hard work is a medication for which
                          >> there is no placebo.
                          >>
                          >> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                          >> news:%23s0rMpSa GHA.1200@TK2MSF TNGP03.phx.gbl. ..[color=darkred]
                          >>> Thanks Kevin,
                          >>> Couldn't be a WEB service considered a business layer as long as it is a
                          >>> class with different methods and the application that makes a reference
                          >>> becomes a presentation layer?
                          >>> I can create a service on a separate server for example, where I can put
                          >>> all the business logic in it, but it does not have a presentation until
                          >>> I create an application on another server (that makes a reference to the
                          >>> service) which uses controls for the user input.
                          >>>
                          >>>
                          >>> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                          >>> news:OxUJHKNaGH A.4752@TK2MSFTN GP02.phx.gbl...
                          >>>>A Web Service is an interface. It is a form of presentation tier. It
                          >>>>exposes the API of a set of business classes. A Business tier is a set
                          >>>>of classes. A DLL is a container for code. A COM object isn't even .Net.
                          >>>>A Data Tier is also a set of classes. The classes can reside in one or
                          >>>>more assemblies. An assembly is stored in one or more DLLs.
                          >>>>
                          >>>> --
                          >>>> HTH,
                          >>>>
                          >>>> Kevin Spencer
                          >>>> Microsoft MVP
                          >>>> Professional Numbskull
                          >>>>
                          >>>> Hard work is a medication for which
                          >>>> there is no placebo.
                          >>>>
                          >>>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                          >>>> news:OyAYYDKaGH A.3532@TK2MSFTN GP05.phx.gbl...
                          >>>>> Thanks for replying,
                          >>>>> I was looking more for a description of how the business layer can be
                          >>>>> expressed: a DLL,
                          >>>>> a COM object, a WEB service?
                          >>>>> Theoretically I understand the concept, but the practical side is
                          >>>>> difficult for me to grab.
                          >>>>> As I see it WEB services would solve the business layer, but what's
                          >>>>> used when the application is Windows based?
                          >>>>>
                          >>>>> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                          >>>>> news:OV3KCwJaGH A.1200@TK2MSFTN GP03.phx.gbl...
                          >>>>>> The 3-tier model is based upon separation of general functionality.
                          >>>>>> You have 3 tiers:
                          >>>>>>
                          >>>>>> Interface
                          >>>>>> Business
                          >>>>>> Data
                          >>>>>>
                          >>>>>> Each tier is more specific than the one below.
                          >>>>>>
                          >>>>>> The Data Tier is only for working with underlying data stores. It
                          >>>>>> knows nothing of specific business rules about how to handle the
                          >>>>>> data. It only knows how to fetch it, change it, delete it, that sort
                          >>>>>> of thing. It is a programming interface to the data that any
                          >>>>>> application stores. As such, it is agnostic of any rules concerning
                          >>>>>> what the data is, or how it is to be treated. It is the "supply
                          >>>>>> clerk" of the organization. This way it can be used by many
                          >>>>>> applications.
                          >>>>>>
                          >>>>>> The Business Tier is for manipulating the data. It contains the
                          >>>>>> Business logic and Business rules that comprise the "engine" of an
                          >>>>>> application. It knows everything about the Data Tier, while the Data
                          >>>>>> Tier knows nothing about the Business Tier. The Business Tier works
                          >>>>>> with Data, but does nothing to expose it to a user. It does expose
                          >>>>>> what is necessary for any other component or application to be able
                          >>>>>> to work with the data, and is in charge of making sure that
                          >>>>>> everything is handled according to the Business rules. It has a
                          >>>>>> programming interface, but no user interface. This way, the
                          >>>>>> functionality of the Business tier can be used in many different
                          >>>>>> types of interfaces.
                          >>>>>>
                          >>>>>> The User Interface is the most specific. It knows nothing about the
                          >>>>>> Data Tier; that is the Business Tier's job. It knows everything about
                          >>>>>> the exposed API of the Business tier, and its job is to present the
                          >>>>>> data to the user, and to take input from the User and relay it to the
                          >>>>>> Business Tier. It is a "universal translator" for the application,
                          >>>>>> which speaks human at one end, and business API at the other.
                          >>>>>>
                          >>>>>> --
                          >>>>>> HTH,
                          >>>>>>
                          >>>>>> Kevin Spencer
                          >>>>>> Microsoft MVP
                          >>>>>> Professional Numbskull
                          >>>>>>
                          >>>>>> Hard work is a medication for which
                          >>>>>> there is no placebo.
                          >>>>>>
                          >>>>>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                          >>>>>> news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...
                          >>>>>>> Hello,
                          >>>>>>>
                          >>>>>>> I try to understand how the business and presentation layers would
                          >>>>>>> practically
                          >>>>>>> translate into programming reality.
                          >>>>>>> I read lots of articles about 3-tier, but none of them gave a
                          >>>>>>> practical example
                          >>>>>>> and I managed to understand the data layer only.
                          >>>>>>> Is for example web services and their consumption an instance of
                          >>>>>>> n-tier,
                          >>>>>>> covering the business and presentation layers?
                          >>>>>>> If it is not necessary a WEB development how would the presentation
                          >>>>>>> and business
                          >>>>>>> layer come to life, through what? Is ASP the presentation layer and
                          >>>>>>> C# the business layer?
                          >>>>>>>
                          >>>>>>> Thanks a lot.
                          >>>>>>>
                          >>>>>>
                          >>>>>>
                          >>>>>
                          >>>>>
                          >>>>
                          >>>>
                          >>>
                          >>>[/color]
                          >>
                          >>[/color]
                          >
                          >[/color]


                          Comment

                          • Andy

                            #14
                            Re: 3-tier layers

                            Yup.

                            There's a great book which builds a framework for business objects to
                            help promote proper seperation of tiers.

                            Pick up a copy of Expert C# 2005 Business Objects by Rockford Lhotka,
                            published by APress.

                            HTH
                            Andy

                            Comment

                            • Dan Aldean

                              #15
                              Re: 3-tier layers

                              Thanks.
                              I just created a shared assembly in a Class Library.
                              I used the sn -k obj\release\MyS hared.snk to create a signature.
                              Then I used the MyShared.snk in the AssemblyInfo.cs file, in the
                              [assembly: AssemblyKeyFile ("MyShared.s nk ")]

                              section. Then I Rebuilt the solution. Next step was to install the assembly
                              using

                              gacutil /i MyShared.dll.



                              What would be next? I tried to create another project and then use the
                              reference to

                              find the MyShared.dll in there but it isn't. What did I do wrong?



                              "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                              news:ucSzboTaGH A.428@TK2MSFTNG P02.phx.gbl...[color=blue]
                              > Yes, business classes would be in class libraries.
                              >
                              > --
                              > HTH,
                              >
                              > Kevin Spencer
                              > Microsoft MVP
                              > Professional Numbskull
                              >
                              > Hard work is a medication for which
                              > there is no placebo.
                              >
                              > "Dan Aldean" <danaldean@yaho o.com> wrote in message
                              > news:e2DSN9SaGH A.4036@TK2MSFTN GP04.phx.gbl...[color=green]
                              >> So the solution is to create Class Library projects to keep the business
                              >> layer?
                              >> Sorry, I am new to C# too.
                              >>
                              >> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                              >> news:OBL164SaGH A.1192@TK2MSFTN GP04.phx.gbl...[color=darkred]
                              >>> If you put your business logic into a Web Service, you have bound the
                              >>> API for that business logic to a Web Service interface. The Web Service
                              >>> itself is an interface, but not a programming interface, strictly. Not a
                              >>> good idea, since there is latency involved, and severe restrictions on
                              >>> the interface itself. Everything passed through it must be serialized as
                              >>> XML.
                              >>>
                              >>> --
                              >>> HTH,
                              >>>
                              >>> Kevin Spencer
                              >>> Microsoft MVP
                              >>> Professional Numbskull
                              >>>
                              >>> Hard work is a medication for which
                              >>> there is no placebo.
                              >>>
                              >>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                              >>> news:%23s0rMpSa GHA.1200@TK2MSF TNGP03.phx.gbl. ..
                              >>>> Thanks Kevin,
                              >>>> Couldn't be a WEB service considered a business layer as long as it is
                              >>>> a class with different methods and the application that makes a
                              >>>> reference becomes a presentation layer?
                              >>>> I can create a service on a separate server for example, where I can
                              >>>> put all the business logic in it, but it does not have a presentation
                              >>>> until I create an application on another server (that makes a reference
                              >>>> to the service) which uses controls for the user input.
                              >>>>
                              >>>>
                              >>>> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                              >>>> news:OxUJHKNaGH A.4752@TK2MSFTN GP02.phx.gbl...
                              >>>>>A Web Service is an interface. It is a form of presentation tier. It
                              >>>>>exposes the API of a set of business classes. A Business tier is a set
                              >>>>>of classes. A DLL is a container for code. A COM object isn't even
                              >>>>>.Net. A Data Tier is also a set of classes. The classes can reside in
                              >>>>>one or more assemblies. An assembly is stored in one or more DLLs.
                              >>>>>
                              >>>>> --
                              >>>>> HTH,
                              >>>>>
                              >>>>> Kevin Spencer
                              >>>>> Microsoft MVP
                              >>>>> Professional Numbskull
                              >>>>>
                              >>>>> Hard work is a medication for which
                              >>>>> there is no placebo.
                              >>>>>
                              >>>>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                              >>>>> news:OyAYYDKaGH A.3532@TK2MSFTN GP05.phx.gbl...
                              >>>>>> Thanks for replying,
                              >>>>>> I was looking more for a description of how the business layer can be
                              >>>>>> expressed: a DLL,
                              >>>>>> a COM object, a WEB service?
                              >>>>>> Theoretically I understand the concept, but the practical side is
                              >>>>>> difficult for me to grab.
                              >>>>>> As I see it WEB services would solve the business layer, but what's
                              >>>>>> used when the application is Windows based?
                              >>>>>>
                              >>>>>> "Kevin Spencer" <kevin@DIESPAMM ERSDIEtakempis. com> wrote in message
                              >>>>>> news:OV3KCwJaGH A.1200@TK2MSFTN GP03.phx.gbl...
                              >>>>>>> The 3-tier model is based upon separation of general functionality.
                              >>>>>>> You have 3 tiers:
                              >>>>>>>
                              >>>>>>> Interface
                              >>>>>>> Business
                              >>>>>>> Data
                              >>>>>>>
                              >>>>>>> Each tier is more specific than the one below.
                              >>>>>>>
                              >>>>>>> The Data Tier is only for working with underlying data stores. It
                              >>>>>>> knows nothing of specific business rules about how to handle the
                              >>>>>>> data. It only knows how to fetch it, change it, delete it, that sort
                              >>>>>>> of thing. It is a programming interface to the data that any
                              >>>>>>> application stores. As such, it is agnostic of any rules concerning
                              >>>>>>> what the data is, or how it is to be treated. It is the "supply
                              >>>>>>> clerk" of the organization. This way it can be used by many
                              >>>>>>> applications.
                              >>>>>>>
                              >>>>>>> The Business Tier is for manipulating the data. It contains the
                              >>>>>>> Business logic and Business rules that comprise the "engine" of an
                              >>>>>>> application. It knows everything about the Data Tier, while the Data
                              >>>>>>> Tier knows nothing about the Business Tier. The Business Tier works
                              >>>>>>> with Data, but does nothing to expose it to a user. It does expose
                              >>>>>>> what is necessary for any other component or application to be able
                              >>>>>>> to work with the data, and is in charge of making sure that
                              >>>>>>> everything is handled according to the Business rules. It has a
                              >>>>>>> programming interface, but no user interface. This way, the
                              >>>>>>> functionality of the Business tier can be used in many different
                              >>>>>>> types of interfaces.
                              >>>>>>>
                              >>>>>>> The User Interface is the most specific. It knows nothing about the
                              >>>>>>> Data Tier; that is the Business Tier's job. It knows everything
                              >>>>>>> about the exposed API of the Business tier, and its job is to
                              >>>>>>> present the data to the user, and to take input from the User and
                              >>>>>>> relay it to the Business Tier. It is a "universal translator" for
                              >>>>>>> the application, which speaks human at one end, and business API at
                              >>>>>>> the other.
                              >>>>>>>
                              >>>>>>> --
                              >>>>>>> HTH,
                              >>>>>>>
                              >>>>>>> Kevin Spencer
                              >>>>>>> Microsoft MVP
                              >>>>>>> Professional Numbskull
                              >>>>>>>
                              >>>>>>> Hard work is a medication for which
                              >>>>>>> there is no placebo.
                              >>>>>>>
                              >>>>>>> "Dan Aldean" <danaldean@yaho o.com> wrote in message
                              >>>>>>> news:ua$kfdHaGH A.4620@TK2MSFTN GP04.phx.gbl...
                              >>>>>>>> Hello,
                              >>>>>>>>
                              >>>>>>>> I try to understand how the business and presentation layers would
                              >>>>>>>> practically
                              >>>>>>>> translate into programming reality.
                              >>>>>>>> I read lots of articles about 3-tier, but none of them gave a
                              >>>>>>>> practical example
                              >>>>>>>> and I managed to understand the data layer only.
                              >>>>>>>> Is for example web services and their consumption an instance of
                              >>>>>>>> n-tier,
                              >>>>>>>> covering the business and presentation layers?
                              >>>>>>>> If it is not necessary a WEB development how would the presentation
                              >>>>>>>> and business
                              >>>>>>>> layer come to life, through what? Is ASP the presentation layer
                              >>>>>>>> and C# the business layer?
                              >>>>>>>>
                              >>>>>>>> Thanks a lot.
                              >>>>>>>>
                              >>>>>>>
                              >>>>>>>
                              >>>>>>
                              >>>>>>
                              >>>>>
                              >>>>>
                              >>>>
                              >>>>
                              >>>
                              >>>[/color]
                              >>
                              >>[/color]
                              >
                              >[/color]


                              Comment

                              Working...