Reengineering .NET Flashcards

0
Q

what is a service contract

A

A service contract is a class that describes the properties and methods the service exposes.

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

Service-oriented architecture consists of two types of services:

A

1) Application agnostic services that know nothing about the application they are used in, and contain no business rules, such as logging, user management.
2) Application specific services that have domain knowledge, enforce business rules, or work with data specific to the application.

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

which permission modifiers can use on the properties and signatures of an interface?

A

It was a trick question: you can’t use any permissions modifiers because they’re all assumed to be public.

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

Can an interface contain any logic?

A

No, an interface cannot contain any logic.

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

what should you do if you’re implementing an interface inside a class and you decide that particular method does not need to be implemented by your class?

A

You should make the method throw a not implemented exception.

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

what is one major way that services simplify code?

A

Services can eliminate state by passing in data to be operated on.

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

What is one major way in which interfaces can help to increase loose coupling?

A

By reducing hard references to other objects.

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

What are the two qualities to strive for in your services?

A

The two qualities to strive for in your services are autonomy and composability.

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

why is program state undesirable?

A

Program state exponentially increases the combinations of program execution.

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

what are the three major architectural patterns?

A

model view controller
model view presenter
model view viewmodel

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

what classes make up the model?

A

The model includes all classes that represent data in the database. This includes queries, views and entity classes, and entity validation logic to ensure that the database is consistent.

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

how many models might you have an application?

A

An application typically uses one model, although it may be convenient to have two models if an application requires data from SQL Server and Oracle.

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

what is the purpose of the view?

A

The purpose of the view is to display data, not to change data. The view includes code to create the window and create controls.

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

what is the purpose of the controller or presenter or view model?

A

This is the code that orchestrates interactions between the model and the view. This is where the business logic lives.

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

how do we make applications that interact with the user easier to test?

A

By moving much of our logic out of the view and into other classes we can avoid instantiating the UI. This avoids problems with automated test runners.

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