Layered Architecture Quiz
10 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

A ______ is used to store data in a database.

Table

The command ______ is used to delete records from a database table.

DELETE

LocalDB acts as an embedded database for ______ applications.

small

Data Manipulation Language (DML) is a vocabulary used to retrieve and work with ______ in SQL Server.

<p>data</p> Signup and view all the answers

LocalDB requires no ______ to run and allows for quick access to a database engine.

<p>configuration</p> Signup and view all the answers

The ______ layer is responsible for handling all user interface and browser communication logic.

<p>Presentation</p> Signup and view all the answers

The ______ layer executes specific business rules associated with a request.

<p>Application logic</p> Signup and view all the answers

The ______ hosts the entire business logic that is not specific to one or more use-cases.

<p>Domain</p> Signup and view all the answers

The domain model often takes the form of an ______ model.

<p>entity-relationship</p> Signup and view all the answers

A domain service groups logically related behaviors that typically operate on multiple domain ______.

<p>entities</p> Signup and view all the answers

Study Notes

Layered Architecture

  • Presentation layer is responsible for user interface interactions and interpreting user commands.
  • Application logic layer coordinates application activity and manages application task progress. It does not contain business logic.
  • Domain layer contains information about the business domain and business rules. Domain objects represent business entities and encapsulate their state and behaviour.
  • Database/infrastructure layer is the actual DBMS access layer. It can be accessed through the business services layer or, occasionally, by the user services layer.

Various Layers in the Architecture

  • Presentation layer handles user interface and browser communication. It is exposed to the end user.
  • Application layer allows easier swapping of implementations for testing purposes. It utilizes fake implementations for test data and known responses, which simplifies and accelerates testing.
  • Application logic layer executes specific business rules related to requests. The layer separates interfacing elements like presentation and domain, enhancing design clarity. It orchestrates further business actions and implements use-cases.
  • The logic layer determines required information, requests it from the accessor layer, manipulates it, and returns formatted results to the presentation layer

Domain Layer

  • Hosts business logic that's not specific to use cases or services.
  • Consists of a domain model, possibly with related services. The model can be an entity-relationship model or function-based.
  • Entities in the model expose both data and behavior.
  • Domain services group related behaviors that work on multiple entities.
  • Domain services usually need access to the infrastructure layer for data operations.
  • The ultimate goal of the domain model is implementing the ubiquitous language and expressing business process actions. Exposing behavior over data is important.

Database/Infrastructure Layer

  • Includes anything related to using specific technologies.
  • Key component is the persistence layer or data access layer, which handles reading and writing data.

Implementing the Layered Architecture

  • Uses separation of concerns, encapsulation, and object-oriented programming (OOP) principles.
  • Presentation layer contains the Graphical User Interface (GUI) for various controls. Boundary classes handle user communication.
  • Application logic layer has control classes that coordinate application actions. This layer holds application task progress, but not business object states.
  • Domain layer possesses entity classes containing business domain and use case information, including business rules. Domain objects encapsulate entity details.
  • Database layer uses LocalDB for entities, which is already set up in the development environment.

ActiveX Data Objects (ADO)

  • A set of classes providing data access services to .NET programmers.
  • Provides a programming interface for database data access.
  • Data sources include Microsoft SQL Server, OLE DB, and XML.
  • Facilitates data sharing and distributed application creation through components.
  • Provides access to different data types, including relational data and XML.
  • Supports various development tasks, including creating front-end database clients and middle-tier business objects.

ADO.NET Components

  • Data providers (e.g., Connection): A set of components for connecting to and interacting with data sources.
    • Data sources can be populated with data from multiple sources.
    • ADO.NET components are disconnected from data sources.
  • DataSets: Represent in-memory databases, composed of multiple DataTable objects.
  • DataAdapters: Retrieve data from a data source and populate DataSet tables. Resolves any changes made back to the data source. Uses Connection objects to connect and Command objects to retrieve/resolve data.

Namespaces

  • A namespace groups related code elements, similar to folders in a file system, for better organization and avoiding naming conflicts.
  • System.Data namespace provides classes for ADO.NET components.
  • SqlConnection represents an open connection to a SQL Server database. Used with SqlDataAdapter and SqlCommand to improve performance with a SQL Server database.
  • SqlCommand is the core of the System.SqlClient namespace. It executes database operations (CRUD – Create, Read, Update, Delete).
    • CREATE (insert): Adds data.
    • READ (select): Retrieves data.
    • UPDATE: Edits data.
    • DELETE: Removes data.
  • System.Data.SqlClient provides the ADO.NET data provider for SQL Server connections with SQL Server 2000/2000 or higher.

Database and Structured Query Language (SQL)

  • Database is a collection of tables containing structured data.
  • Tables consist of rows (tuples) and columns (attributes). Columns store specific data types.
  • SQL (Structured Query Language) communicates with relational databases. Data Definition Language (DDL) defines schema, such as CREATE, DROP, and ALTER.
  • Data Manipulation Language (DML) manipulates data, including INSERT, UPDATE, and DELETE.
  • LocalDB is a developer-friendly embedded database that can be easily turned on/off for quick access and use with little configuration.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Databases Lecture Notes PDF

Description

Test your knowledge on the different layers of layered architecture including the presentation, application, domain, and database layers. Understand how these layers interact and their specific responsibilities within software architecture.

More Like This

Use Quizgecko on...
Browser
Browser