Additional Types of Partitioning - Quiz Explanation

The answers you selected are indicated below, along with text that explains the correct answers.
 
1. What is the fundamental difference between a two-tier and three-tier architecture?
Please select the best answer.
  A. Two-tier is always implemented on a central computer and dumb terminals, whereas three-tier uses servers and PCs.
  B. Two-tier assigns the application logic to the client, and the data base access to the central computer; whereas three-tier assigns the application logic to a middle layer.
  C. Two-tier divides the system responsibilities into two partitions, and three-tier divides them into three partitions.
  D. Two-tier doesn't require an interface layer because the terminals are directly connected to the mainframe.
  The correct answer is C. The fundamental difference is the number of partitions. How much and what kind of responsibility is assigned is common but not mandatory. A is incorrect because a two-tier architecture could use dumb terminals or fairly intelligent PC applications. Two-tier could also be implemented using servers instead of mainframes. B is incorrect because the architect, not the architecture, determines the assignment of responsibilities. D is incorrect because any time you partition an architecture you must provide an interface between the components, even if it is as simple as a protocol.

2. How does encapsulation impact the quality of your architecture?
Please select the best answer.
  A. Encapsulation ensures that each partition supports a single, well-defined purpose.
  B. Encapsulation ensures that the dependency between the partitions is minimized.
  C. Encapsulation ensures that each component can function properly without knowing the internal design of the other components.
  D. Encapsulation ensures that the responsibilities are assigned appropriately to each partition based on the domain partition requirements.
  The correct answer is C. Encapsulation ensures that each component can function properly without knowing the internal design of the other components. Only the interface and purpose are exposed. A is incorrect because it describes cohesion, not encapsulation. B is incorrect because it describes coupling, not encapsulation. D is incorrect because encapsulation does not influence the assignment of responsibilities.

3. What additional change is required when you partition the data access layer of your architecture?
Please select the best answer.
  A. You must also partition the middle transaction layer into corresponding segments.
  B. You must also provide a way for the different data partitions to talk to one another.
  C. You must provide a separate interface for each data partition.
  D. You must provide an interface between the middle tier and all of the data partitions.
  The correct answer is D. When you partition the data access layer you must also provide an interface between the middle tier and all of the data partitions. The middle layer should not have to know where the data resides. The interface provides the correct mapping. A is incorrect because the middle layer does not have to be partitioned. In fact, this would be counterproductive in most cases because, very often, the same logic will be applied to a variety of data sources. For example sales data for multiple regions should be interpreted in exactly the same way. B is incorrect because the data partitions usually don't talk directly to one another. The layer above the data usually does the interpretation and manipulation of the data. C is incorrect because this would require that the middle layer know where the data resides and which interface to use to get it. This violates encapsulation.

4. What is the purpose of an interface partition?
Please select the best answer.
  A. The interface formats the output from the server layer for the requesting client.
  B. The interface identifies the specific protocol that the tier above needs to use to access the tier below.
  C. The interface provides a message queue to handle the requests coming from the layer above.
  D. The interface provides data marshalling, mapping, and routing between tiers.
  The correct answer is D. The interface provides data marshalling, mapping, and routing between tiers. A is incorrect because the interface does much more than simply format output for the requesting tier. It validates that the request conforms to the right format, routes the request to the correct partition, and returns the response in the format dictated by the request. B is incorrect because there is more to an interface than just a protocol. C is incorrect because an interface does far more than simply queue requests.

5. What are the typical components of a four-tier architecture?
Please select the best answer.
  A. Client, interface, transaction, data
  B. Client, application, transaction, data access
  C. Client, application, interface, data access
  D. Client, transaction, data access, database
  The correct answer is B. Typically a four-tier architecture partitions the system into client, application, transaction, and data access. A is incorrect because interface partitions are not typically included in the number of tiers and because it is missing the application-specific layer. C is incorrect because it is missing the transaction layer and includes the interfaces in the tier count. D is incorrect because the data access and database layers are typically combined and because it is missing the application-specific layer.