Domain Layer Organization Flashcards
(15 cards)
What is a transaction script, and how does it work?
The simplest domain logic pattern
1- It receives the input parameters
2- Processes them
3- Stores/retrieves info from the database
4- Invokes operations on other systems
5- Responds with data to the presentation layer
What is the disadvantage of a transaction script?
Too simple for complex domain logic
What are the advantages of a transaction script?
1- Simple procedural model
2- Works well with simple data
3- Transaction limits are obvious
What is a domain model?
A pattern that is based on the use of objects
What is the advantage of a domain model?
Suitable for complex domains
What is the disadvantage of a domain model?
The more complex the domain, the more difficult it is to map it to a relational database
What is a table model?
It manages data operations on a database using modules. Each table module handles business logic for a single table. It works with record sets (results of a DB query)
What is a table model used for?
Moderate complexity (especially with relational DBs)
Pros of a table model
1- More structured than a transaction script
2- Easier to maintain
Cons of a table model
1- No inheritance or OO features (less flexible than a domain model)
2- Not ideal for very complex logic
What are the main kinds of remote interfaces?
1- HTTP interface
2- OO interface
Advantages of HTTP interface
1- Almost universal
2- Easier deployment
Disadvantage of HTTP interface
1- Less explicit specification (harder to define the interface without additional tools)
Advantage of OO interface
Explicit interface specification (well defined interface)
Disadvantage of OO interface
Complex deployment