CMPS 415 (Enterprise Systems) Flashcards

1
Q

What is the purpose of layering?

A
  • separation of concerns
  • Allow the use of Single responsibility principle
  • Allows the use of Dependency injection principle
  • Makes Unit testing easier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the three main layers, and what are their purpose?

A
  • Data Acess Layer (DLL)
  • Domain/Business Logic Layer (BLL)

-Presitation Layer

DAL (Data Access Layer) The interface between your business logic (or domain logic) and the data storage (your persistent data storage, which could be your database, xml files).

BLL (Business Logic Layer) The portion of an enterprise system that determines how data is transformed or calculated, and how it is routed to people or software.

Presentation Layer The layer that actually displays your data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is TDD?

A

Test Driven Development is the process of writing the test first, and then writing the minimal amount of code for that test to pass.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is unit testing?

A

Trying to isolate the smallest amount of testable code to verify its behavior.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the singleton pattern?

A

Design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.

private static SqlServerDAO Instance {get; set;} //
private SqlServerDAO() { }
public static SqlServerDAO GetInstance() {
 //if very first call to get a query is null, it will create a new instance.
 if(Instance == null) {
 Instance = new SqlServerDAO();
 }
 return Instance;
}
public class Junk()
{
 public void Junk()
 {
 var sqlServerDAO = SqlServerDAO.GetInstance();
 }
 private void DoMoreJunk()
 {
 var sqlServerDAO = SqlServerDAO.GetInstance();
 }
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Every class should have a responsiblity over a single part of the functionality provided by the software, and that responsibility should be entirey encasuplated by the class

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Dependcy Inversion

A

High-level modeules should not depend on low-level modules.

Abstractions should not depend on details. Details should dependon upon abstractions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the Singleton Pattern

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Advantages of Unit Testing?

A

Finds problems early

Facilitates changes

Simplifies integration

Documentation

Aids in OOD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Disadvantages of Unit Testing

A

Time taken to write the program

Limited to test cases

Only tests the functionality of the units themselves

Can only show the presence or absence or particular errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Single Responsibility Principle

A

A class or module should have one, and only one, reason to change.

A class should do one thing

A class should have one responsibility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Dependancy Inversion Principle

A

Refers to specific form of decoupling software modules

The high level classes are not working directly with low level classes; they are using interfaces as an abstract layer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly