Академический Документы
Профессиональный Документы
Культура Документы
Introduction:
These classes also must be able to translate the data retrieved back into the appropriate business objects. The access layers main responsibility is to provide a link between business or view objects and data storage. Three-layer architecture is similar to 3-tier architecture. The view layer corresponds to the client tier, the business layer to the application server tier.
y Unlike object oriented DBMS systems, the persistent object stores do not support query or interactive user interface facilities. y Controlling concurrent access by users, providing ad-hoc query capability and allowing independent control over the physical location of data are not possible with persistent objects. y The access layer (AL), which is a key part of every n-tier system, is mainly consist of a simple set of code that does basic interactions with the database or any other storage device. These functionalities are often referred to as CRUD (Create, Retrieve, Update, and Delete). y The data access layer need to be generic, simple, quick and efficient as much as possible. It should not include complex application/ business logics. y I have seen systems with lengthy, complex store procedures (SP), which run through several cases before doing a simple retrieval. They contain not only most part of the business logic, but application logic and user interface logic as well. If SP is getting longer and complicated, then it is a good indication that we are burring were business logic inside the data access layer. Layered design and the data access layer: Layered application designs are extremely popular because they increase application performance, scalability, flexibility, code reuse, and have a myriad of other benefits that I could rattle off if I had all of the architectural buzzwords memorized. In the classic three tier design, applications break down into three major areas of functionality: y The data layer manages the physical storage and retrieval of data. y The business layer maintains business rules and logic. y The presentation layer houses the user interface and related presentation code. Inside each of these tiers there may also exist a series of sub-layers that provide an even more granular break up the functional areas of the application.
In the presentation layer, the code-behind mechanism for ASP.NET pages and user controls is a prominent example of a layered design. The markup file defines the look and lowest of the web form and the code behind file contains the presentation logic. It's a clean separation because both the markup and the codebehind layers house specific sets of functionality that benefit from being apart. Designers don't have to worry about messing up code to make user interface changes, and developers don't have to worry about sifting through the userinterface to update code.
tier contains logic for retrieving persistent data from the data-tier and placing it into business objects and, conversely, logic that persists data from business objects into the data tier. This is called data access logic.
2MARKS
1. What is the idea behind creating an access layer? The main idea behind creating an access layer is to create a set of classes that know how to communicate with the place(s) where the data actually reside. Regardless of where the data reside, whether it be a file, relational database, mainframe, Internet, DCOM or via ORB, the access classes must be able to translate any data-related requests from the business layer into the appropriate protocol for data access. 2. What are the two major tasks that access layer performs? Translate the request: The access layer must be able to translate any data related requests from the business layer into the appropriate protocol for data access. Translate the results: The access layer also must be able to translate the data retrieved back into the appropriate business objects and pass those objects back into the business layer. 3. What is DBMS? A Date Base Management System (DBMS) is a set of programs that enables the creation and maintenance (access, manipulate, protect and manage) of a collection of related data. 4. What is the purpose of DBMS? y The purpose of DBMS is to provide reliable, persistent data storage and mechanisms for efficient, convenient data access and retrieval. y Persistence refers to the ability of some objects to outlive the programs that created them. y Object lifetimes can be short for local objects (called transient objects) or long for objects stored indefinitely in a database (called persistent objects). y Most object-oriented languages do not support serialization or object persistence, which is the process of writing or reading an object to and from a persistence storage medium, such as disk file.
They increase y application performance y scalability y flexibility y code reuse 6. What are the functionalities of layered application design? y The data layer manages the physical storage and retrieval of data. y The business layer maintains business rules and logic. y The presentation layer houses the user interface and related presentation code. 7. Define data access logic? Business tier contains logic for retrieving persistent data from the datatier and placing it into business objects and, conversely, logic that persists data from business objects into the data tier. This is called data access logic. 8. Describe business tier? Business Tier is the layer responsible for accessing the data tier to retrieve, modify and delete data to and from the data tier and send the results to the presentation tier. This layer is also responsible for processing the data retrieved and sent to the presentation layer. 9. What are the two sub layers of business tier? y Business Logic Layer (BLL) y Data Access Layers (DAL) 10. What are the benefits of data access layer? y The DAL resides in its own assembly and exposes database-independent method signatures. y We can easily create another DAL with the same assembly name and an identical set of method signatures that supports a different database.