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.
So the solution is to create Class Library projects to keep the
business layer?
Sorry, I am new to C# too.
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.
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.
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.
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?
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.
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.