Software Architecture Patterns
- 66Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the defining organizational idea of layered architecture?
What is the defining organizational idea of layered architecture?
66 questions
- 1
What is the defining organizational idea of layered architecture?
- A
Divide the application into independent services for separate teams
- B
Route all application requests through a central broker
- C
Process all application data through a sequence of filters
- D
Divide the application into distinct layers with specific responsibilities
Correct answer
DDivide the application into distinct layers with specific responsibilities
Explanation
Layered architecture organizes an application into distinct layers, each with a specific job.
- A
- 2
In the kitchen analogy for layered architecture, which layer stores raw ingredients?
- A
The data layer
- B
The presentation layer
- C
The application layer
- D
The business layer
Correct answer
AThe data layer
Explanation
The data layer is compared to a pantry: it holds the raw data used by the application.
- A
- 3
Which responsibility belongs primarily to the business layer in the kitchen analogy?
- A
Handling the application's core logic
- B
Storing raw data for later use
- C
Displaying information to the user
- D
Providing access to remote clients
Correct answer
AHandling the application's core logic
Explanation
The business layer corresponds to the food preparation area and handles the application's core logic.
- A
- 4
In layered architecture, what does the presentation layer primarily provide?
- A
The mechanisms that distribute work across nodes
- B
The central storage for all application data
- C
The user interface that people interact with
- D
The core rules that govern business operations
Correct answer
CThe user interface that people interact with
Explanation
The presentation layer is the user interface: the part of the application users see and interact with.
- A
- 5
What is a benefit of separating an application into layers?
- A
Each layer can be developed and maintained relatively independently
- B
All communication between components is eliminated
- C
The system no longer needs testing or troubleshooting
- D
Every layer automatically runs with the same performance
Correct answer
AEach layer can be developed and maintained relatively independently
Explanation
Separation of concerns lets layers be developed and maintained more independently, which can improve flexibility and troubleshooting.
- A
- 6
Why can adding too many layers harm an application?
- A
It makes the application unable to execute tasks
- B
It can increase complexity and create communication bottlenecks
- C
It forces every layer to store a separate copy of all data
- D
It prevents the application from having a user interface
Correct answer
BIt can increase complexity and create communication bottlenecks
Explanation
Layering involves trade-offs: too many layers can add complexity and slow communication between layers.
- A
- 7
In a client-server system, what is the server's central role?
- A
Executing all processing locally on each client
- B
Displaying every client's interface on a single screen
- C
Requesting resources from each client in turn
- D
Managing and providing access to shared resources or services
Correct answer
DManaging and providing access to shared resources or services
Explanation
The server acts as a central hub that manages resources and provides clients with access to them.
- A
- 8
How does a client typically interact with a server?
- A
It requests a resource or service and then uses what the server provides
- B
It takes over the server's role whenever it needs a resource
- C
It stores the server's resources and prevents other clients from accessing them
- D
It changes the server's internal code before making a request
Correct answer
AIt requests a resource or service and then uses what the server provides
Explanation
Clients request resources or services from the server, which centrally manages and provides access to them.
- A
- 9
What is the single-point-of-failure risk in a client-server architecture?
- A
If one client disconnects, the server loses all stored resources
- B
If the server crashes, clients may lose access to its resources
- C
If the server stays online, clients cannot communicate with it
- D
If a client sends a request, every other client must shut down
Correct answer
BIf the server crashes, clients may lose access to its resources
Explanation
Because the server is central, its failure can prevent all clients from accessing the services it provides. Redundancy and backups can help address this risk.
- A
- 10
Which example best illustrates client-server architecture?
- A
Specialized modules collaborate through a shared problem-solving board
- B
An email server stores and manages messages accessed by email apps
- C
A set of interchangeable algorithms is selected for a particular task
- D
Independent filters transform data as it passes through a pipeline
Correct answer
BAn email server stores and manages messages accessed by email apps
Explanation
An email service fits the client-server pattern: the server stores and manages email, while email apps act as clients.
- A
- 11
What triggers activity in event-driven architecture?
- A
A developer manually restarting every application component
- B
Events such as user actions, sensor readings, or system changes
- C
Requests sent only by a central server to its clients
- D
A fixed sequence of steps that must always run to completion
Correct answer
BEvents such as user actions, sensor readings, or system changes
Explanation
Event-driven systems react to events, which can include user actions, sensor readings, and internal system changes.
- A
- 12
Why is event-driven architecture suitable for real-time applications?
- A
It can react to events as they occur and trigger immediate actions
- B
It guarantees that debugging asynchronous behavior is simple
- C
It requires all events to wait until the system is shut down
- D
It prevents independent activities from happening concurrently
Correct answer
AIt can react to events as they occur and trigger immediate actions
Explanation
Event-driven architecture is useful when applications must respond quickly to events, as in stock trading or online gaming.
- A
- 13
What makes event-driven systems challenging to design and debug?
- A
The architecture requires every operation to use the same data format
- B
Events cannot be generated by users or other system components
- C
Asynchronous events can occur at the same time and cause unintended effects
- D
The system cannot process updates as new information arrives
Correct answer
CAsynchronous events can occur at the same time and cause unintended effects
Explanation
Events can happen asynchronously and concurrently, making reliability, debugging, and avoiding unintended consequences difficult.
- A
- 14
Which application is an example of event-driven architecture in the content?
- A
A broker that routes requests to different servers
- B
A web application that separates data, input handling, and display
- C
A repository that hides the details of database access
- D
A fraud detection system that monitors transactions and triggers alerts
Correct answer
DA fraud detection system that monitors transactions and triggers alerts
Explanation
Fraud detection is an example because it monitors transactions and triggers alerts in response to suspicious activity.
- A
- 15
In microkernel architecture, what role does the core system play?
- A
It provides essential functionality that plug-in modules can extend
- B
It contains every specialized feature in one inseparable component
- C
It transforms data through a fixed series of processing filters
- D
It routes all client requests to independent database servers
Correct answer
AIt provides essential functionality that plug-in modules can extend
Explanation
The microkernel is a minimal core that provides essential functionality, while plug-ins add specialized features.
- A
- 16
Why can microkernel architecture make updates less disruptive?
- A
The architecture prevents specialized features from being added
- B
A plug-in can often be changed without disrupting the core or other plug-ins
- C
The core automatically rewrites every plug-in whenever one is updated
- D
All plug-ins are removed whenever the core system changes
Correct answer
BA plug-in can often be changed without disrupting the core or other plug-ins
Explanation
The modular design allows a plug-in to be fixed or updated without affecting unrelated parts of the system.
- A
- 17
What is a potential drawback of microkernel architecture?
- A
It requires every feature to be placed in the central core
- B
It cannot support custom features or specialized functionality
- C
A faulty plug-in necessarily breaks every other system component
- D
Communication between the core and many plug-ins can become complicated
Correct answer
DCommunication between the core and many plug-ins can become complicated
Explanation
As the system grows, communication between the core and its plug-ins can become complex. A minimal core may also require some functionality to be built from scratch.
- A
- 18
In the operating-system example, how are device drivers related to the microkernel?
- A
They combine application data into a user-facing presentation layer
- B
They replace the core kernel and manage all essential system tasks
- C
They act like plug-ins that provide specific hardware-related functionality
- D
They serve as clients that request data from a central email server
Correct answer
CThey act like plug-ins that provide specific hardware-related functionality
Explanation
The example describes the core kernel as handling basic tasks, while device drivers and other components provide specific functionality like plug-ins.
- A
- 19
What is the basic organizing principle of microservices architecture?
- A
Place every application responsibility in one central server process
- B
Break an application into smaller, independent services with specific responsibilities
- C
Make one algorithm handle all tasks by switching its internal rules
- D
Organize all functionality into layers with no independent services
Correct answer
BBreak an application into smaller, independent services with specific responsibilities
Explanation
Microservices divide a large application into smaller independent services, each focused on a specific task or function.
- A
- 20
How can microservices allow teams to develop more quickly?
- A
All services use one identical algorithm for every responsibility
- B
Teams can work on individual services without directly affecting the others
- C
Teams must coordinate every code change in a single shared component
- D
Each service must be deployed only when the entire application is rewritten
Correct answer
BTeams can work on individual services without directly affecting the others
Explanation
Teams can develop and deploy individual services without affecting all the others, which can speed development and deployment.
- A
- 21
A single microservice becomes overloaded while others remain lightly used. What advantage of microservices is especially relevant?
- A
The overloaded service must be merged into the user interface
- B
The other services must stop communicating permanently
- C
The whole application must be scaled as one unit
- D
The overloaded service can be scaled independently
Correct answer
DThe overloaded service can be scaled independently
Explanation
Microservices allow a heavily used service to be scaled independently of the rest of the system.
- A
- 22
Which set of concerns is especially important when managing many microservices?
- A
Service communication, coordination, network congestion, and security
- B
Filter ordering, compiler parsing, and line-by-line interpretation
- C
Pantry organization, interface plating, and layer naming
- D
Presentation formatting, single-file storage, and keyboard input
Correct answer
AService communication, coordination, network congestion, and security
Explanation
Microservices can make communication and coordination complex, increase network congestion, and require securing each service and its interactions.
- A
- 23
What is the central idea of space-based architecture as described in the content?
- A
Assign every task to a single powerful server
- B
Make each data-processing filter wait for a user request
- C
Distribute workload across multiple nodes that access a shared space
- D
Store all system functionality in a single minimal kernel
Correct answer
CDistribute workload across multiple nodes that access a shared space
Explanation
Space-based architecture distributes work across multiple processing nodes that access a shared memory or resource space.
- A
- 24
How can a space-based system increase its ability to handle large workloads?
- A
Move all processing to one larger client device
- B
Add more processing nodes to share the workload
- C
Remove all shared resources and centralize each task
- D
Make each node wait for the previous node to shut down
Correct answer
BAdd more processing nodes to share the workload
Explanation
The content describes scaling by adding more processing units or nodes to share large amounts of work.
- A
- 25
Which challenge is associated with space-based architecture?
- A
Preventing plug-ins from being added to a minimal core
- B
Choosing a grammar for a domain-specific language
- C
Maintaining data consistency across nodes and managing communication latency
- D
Keeping user interface code separate from business logic
Correct answer
CMaintaining data consistency across nodes and managing communication latency
Explanation
Distributed nodes make system management more complex, and data consistency and communication latency must be handled carefully.
- A
- 26
In master-slave architecture, what is the master's primary responsibility?
- A
Transform data independently before passing it to a filter
- B
Make decisions, delegate tasks, and coordinate the slave components
- C
Display application information directly to end users
- D
Perform every assigned task while slaves make all decisions
Correct answer
BMake decisions, delegate tasks, and coordinate the slave components
Explanation
The master coordinates the system, makes decisions, and delegates work to slave components.
- A
- 27
How can adding slave components improve a master-slave system's capacity?
- A
More workers eliminate the need for communication with the master
- B
More workers transfer all decision-making to the clients
- C
More workers guarantee that the master can never fail
- D
More workers can be assigned tasks to handle a larger workload
Correct answer
DMore workers can be assigned tasks to handle a larger workload
Explanation
The division of labor makes it possible to add more workers to handle increased workloads.
- A
- 28
What happens if the master fails and no backup mechanism exists?
- A
The slaves automatically become a broker for external applications
- B
The system continues unchanged because the master has no coordinating role
- C
The system converts all slave components into presentation layers
- D
The master may become a single point of failure for the system
Correct answer
DThe master may become a single point of failure for the system
Explanation
The master can be a single point of failure. A failover mechanism can allow a backup master to take over.
- A
- 29
Why might communication overhead affect a large master-slave system?
- A
Each slave must independently control every other slave
- B
The master must coordinate with many slaves, which can complicate communication
- C
The master is not permitted to delegate tasks to multiple components
- D
The slaves cannot report the results of their assigned work
Correct answer
BThe master must coordinate with many slaves, which can complicate communication
Explanation
Communication between the master and many slaves can become complicated and affect performance, so overhead should be minimized.
- A
- 30
What does a filter do in pipe-filter architecture?
- A
Stores every application resource for all clients
- B
Performs a specific operation on data before passing it onward
- C
Translates a programming language into a user interface
- D
Selects the master component for a group of workers
Correct answer
BPerforms a specific operation on data before passing it onward
Explanation
Each filter performs a defined operation that transforms, refines, or inspects data before passing it to the next filter.
- A
- 31
What is a benefit of pipe-filter architecture's modularity?
- A
Filters ensure every pipeline uses the same processing workflow
- B
Filters can be added, removed, or reused in different pipelines
- C
Filters guarantee that errors in final output are easy to locate
- D
Filters eliminate the need to agree on data formats
Correct answer
BFilters can be added, removed, or reused in different pipelines
Explanation
Independent filters can be rearranged or reused, making the data-processing workflow adaptable and promoting code reuse.
- A
- 32
Why can debugging a pipe-filter pipeline be difficult?
- A
An error in the output may require tracing through several filters
- B
The final output is never produced until all filters are removed
- C
Each filter performs every operation on the data at once
- D
The pipeline prevents data from being passed between stages
Correct answer
AAn error in the output may require tracing through several filters
Explanation
When the final output is wrong, it may be necessary to trace the data through each filter to find the source of the error.
- A
- 33
What compatibility constraint must filters in a pipeline account for?
- A
They must agree on how data is represented and transferred
- B
They must all use the same algorithm internally
- C
They must access data only through a museum-like curator
- D
They must be implemented by the same development team
Correct answer
AThey must agree on how data is represented and transferred
Explanation
Filters must agree on a data format, which can constrain how data is represented and transferred between stages.
- A
- 34
Which example uses a sequence of pipe-filter processing stages?
- A
A group of experts that contributes to a central problem-solving board
- B
A navigation app that selects among interchangeable routing algorithms
- C
A compiler that performs lexical analysis, parsing, and code generation
- D
An email app that accesses messages stored on a server
Correct answer
CA compiler that performs lexical analysis, parsing, and code generation
Explanation
A compiler can process source code through filters for lexical analysis, parsing, and code generation.
- A
- 35
What is the broker's role in broker architecture?
- A
Execute every service's specialized task within one process
- B
Store all domain data and expose it directly to application logic
- C
Receive client requests and route them to appropriate servers
- D
Separate user input from the application's displayed information
Correct answer
CReceive client requests and route them to appropriate servers
Explanation
The broker acts as a central hub that receives requests and routes them to the appropriate servers.
- A
- 36
Why does broker architecture decouple clients from servers?
- A
The broker combines every server into one application layer
- B
Clients use the broker to communicate rather than interacting directly with servers
- C
The broker prevents clients from making requests
- D
Clients and servers must share the same internal implementation
Correct answer
BClients use the broker to communicate rather than interacting directly with servers
Explanation
The broker mediates communication between clients and servers, so they do not need to interact directly.
- A
- 37
How can a broker improve fault tolerance when a server fails?
- A
It can redirect requests to another available server
- B
It can guarantee that no server will ever fail
- C
It can convert failed servers into client applications
- D
It can eliminate all communication between system components
Correct answer
AIt can redirect requests to another available server
Explanation
A broker can redirect requests when one server fails, helping the system continue operating.
- A
- 38
What risk arises if the broker itself fails?
- A
Every client immediately becomes an independent server
- B
It may become a single point of failure unless failover is designed
- C
All servers automatically gain direct access to client interfaces
- D
The system loses its need for routing logic
Correct answer
BIt may become a single point of failure unless failover is designed
Explanation
Because the broker coordinates communication, its failure can disrupt the system unless suitable failover mechanisms are in place.
- A
- 39
What is the central data store in Blackboard architecture used for?
- A
Holding problem information that specialized modules can read and update
- B
Routing client requests to servers based on load
- C
Storing only completed user-interface pages
- D
Executing instructions in a specific programming language
Correct answer
AHolding problem information that specialized modules can read and update
Explanation
The blackboard holds information about the problem, and specialized modules can read from and write to it.
- A
- 40
How do specialized modules contribute to a Blackboard system?
- A
They display the blackboard's contents without changing them
- B
They translate all user input into compiled machine code
- C
They analyze available information and add insights or proposed solutions
- D
They each control a separate server without sharing information
Correct answer
CThey analyze available information and add insights or proposed solutions
Explanation
Modules contribute their expertise by analyzing information on the blackboard and adding new information or possible solutions.
- A
- 41
For what kind of problem is Blackboard architecture especially useful?
- A
A problem with uncertain or incomplete data whose solution emerges gradually
- B
A request that must be processed only by a single central server
- C
A task with one fixed algorithm and no changing inputs
- D
A simple interface that needs no collaboration or shared information
Correct answer
AA problem with uncertain or incomplete data whose solution emerges gradually
Explanation
Blackboard architecture suits problems where information is uncertain or incomplete and a solution emerges through collaboration.
- A
- 42
What must a Blackboard system manage when many modules contribute at once?
- A
The presentation layer's separation from the user interface
- B
The elimination of all shared information
- C
Data consistency and synchronization to prevent conflicts
- D
The transformation of every module into a client
Correct answer
CData consistency and synchronization to prevent conflicts
Explanation
When many experts contribute simultaneously, data must remain consistent and synchronized to avoid conflicts.
- A
- 43
What does Interpreter architecture provide for a language?
- A
A central board on which experts collaboratively store findings
- B
A repository that hides the details of persistent storage
- C
A grammatical representation and an interpreter that processes its instructions
- D
A collection of independent services that share a network
Correct answer
CA grammatical representation and an interpreter that processes its instructions
Explanation
Interpreter architecture defines a grammar for a language and provides an interpreter to process and execute instructions written in it.
- A
- 44
Which task is a suitable use for Interpreter architecture?
- A
Routing client requests to multiple servers
- B
Separating an application's data from its user interface
- C
Scaling a busy service independently of other services
- D
Evaluating rules written in a domain-specific language
Correct answer
DEvaluating rules written in a domain-specific language
Explanation
An interpreter can evaluate rules expressed in a specialized language, such as rules used by a business application.
- A
- 45
What is a trade-off associated with interpreted execution?
- A
It prevents a language from expressing specialized logic
- B
It always requires more independent services than microservices
- C
It may be slower than compiled execution, and debugging can be harder
- D
It eliminates the need to define a language's grammar
Correct answer
CIt may be slower than compiled execution, and debugging can be harder
Explanation
The content notes that interpreted code may sacrifice performance compared with compiled code and that the extra interpretation layer can make debugging harder.
- A
- 46
In MVC, what is the model responsible for?
- A
Handling user input and updating the model
- B
Representing the application's data and logic
- C
Displaying information to the user
- D
Routing requests between clients and servers
Correct answer
BRepresenting the application's data and logic
Explanation
The model represents the application's data and logic.
- A
- 47
In MVC, what role does the controller play?
- A
It displays all information directly to the user
- B
It stores raw application data without processing it
- C
It handles user input and updates the model
- D
It provides a grammar for a domain-specific language
Correct answer
CIt handles user input and updates the model
Explanation
The controller handles user input and updates the model in response.
- A
- 48
In MVC, what does the view do?
- A
It displays information to the user
- B
It makes all application decisions and delegates tasks
- C
It provides a clean interface to the database
- D
It interprets instructions written in a specialized language
Correct answer
AIt displays information to the user
Explanation
The view presents information to the user.
- A
- 49
Why can MVC make web applications easier to maintain?
- A
Combining the model, view, and controller prevents changes from spreading
- B
Separating concerns can improve reuse and simplify testing and updates
- C
Requiring one controller for every view eliminates application complexity
- D
Storing all data in the view avoids changes to other components
Correct answer
BSeparating concerns can improve reuse and simplify testing and updates
Explanation
MVC separates concerns, which can improve code reuse, simplify testing, and make updates less likely to cause widespread changes.
- A
- 50
When might MVC be an unsuitable choice?
- A
When an application benefits from testing components separately
- B
When developers want to separate user input from application data
- C
When an application is so simple that MVC adds unnecessary overhead
- D
When a web application needs its data displayed to users
Correct answer
CWhen an application is so simple that MVC adds unnecessary overhead
Explanation
For simple applications, MVC may be overkill and add unnecessary overhead; it can also become complex in very large applications.
- A
- 51
What is the repository pattern's main role?
- A
Processing source code through a chain of independent filters
- B
Mediating between domain logic and data access through a clean interface
- C
Coordinating workers that perform tasks assigned by a master
- D
Allowing users to interact directly with a database
Correct answer
BMediating between domain logic and data access through a clean interface
Explanation
A repository mediates between application domain logic and the data-access layer, providing a clean interface for retrieving and persisting data.
- A
- 52
How does a repository support loose coupling?
- A
It requires domain logic to control every database operation directly
- B
It makes all application components depend on one database implementation
- C
It hides underlying database details from the rest of the application
- D
It merges data management into the user interface
Correct answer
CIt hides underlying database details from the rest of the application
Explanation
The repository hides data-store complexity, reducing direct dependencies between data access and the rest of the application.
- A
- 53
If an application changes its database, what advantage can the repository pattern provide?
- A
The repository may be updated without changing the rest of the application
- B
The user interface must take over data persistence
- C
Every application component must be rewritten to access the new database
- D
The data-access layer can be removed without replacement
Correct answer
AThe repository may be updated without changing the rest of the application
Explanation
The repository can be updated to accommodate changes to the database or data-access logic without requiring changes throughout the application.
- A
- 54
What is a potential drawback of the repository pattern?
- A
It requires every application to use the same database
- B
It prevents data access from being separated from application logic
- C
It makes it impossible to retrieve or persist data
- D
It may add unnecessary complexity to simple applications with few data-access needs
Correct answer
DIt may add unnecessary complexity to simple applications with few data-access needs
Explanation
For a simple application with limited data-access needs, a repository may add unnecessary complexity. Designing a generic repository can also be challenging.
- A
- 55
What does the strategy pattern encapsulate?
- A
A set of distinct application layers
- B
A family of interchangeable algorithms
- C
A client-server connection managed by a broker
- D
A central store of information about an uncertain problem
Correct answer
BA family of interchangeable algorithms
Explanation
The strategy pattern encapsulates a family of algorithms and makes them interchangeable.
- A
- 56
How could a navigation app use the strategy pattern?
- A
Ask a repository to store the user interface in a database
- B
Use one fixed route algorithm that cannot be changed
- C
Select among algorithms for shortest distance, fastest travel, or avoiding tolls
- D
Send every route request through a sequence of compiler filters
Correct answer
CSelect among algorithms for shortest distance, fastest travel, or avoiding tolls
Explanation
A navigation app can choose a routing strategy based on the user's preference, such as shortest distance, fastest travel time, or avoiding tolls.
- A
- 57
Why can the strategy pattern make algorithms easier to test?
- A
The pattern removes the need to test application behavior
- B
All algorithms must be tested as one inseparable component
- C
The pattern automatically determines which algorithm is correct
- D
Each algorithm can be tested independently
Correct answer
DEach algorithm can be tested independently
Explanation
Encapsulating algorithms separately makes it possible to test each one independently.
- A
- 58
When might the strategy pattern be unnecessary?
- A
When there are only one or two simple algorithms and little need for flexibility
- B
When each algorithm needs to be tested independently
- C
When an application needs to add new algorithms without changing existing code
- D
When users need different routing choices
Correct answer
AWhen there are only one or two simple algorithms and little need for flexibility
Explanation
If there are only a few simple algorithms, separating them with the strategy pattern may add unnecessary complexity.
- A
- 59
What should a team assess before choosing a software architecture pattern?
- A
Project requirements and constraints, including complexity, performance, security, and budget
- B
Only which pattern has the largest number of components
- C
Only whether the pattern is new and widely discussed
- D
Only whether another project has ever used the pattern
Correct answer
AProject requirements and constraints, including complexity, performance, security, and budget
Explanation
Choosing a pattern begins with understanding the project's requirements and constraints, including application size and complexity, performance, security, and budget.
- A
- 60
Why should a team's skills and experience influence pattern selection?
- A
A team should always choose the pattern it has never used before
- B
Team experience makes project requirements and constraints irrelevant
- C
A team's skills determine whether the project needs security
- D
A pattern the team understands is more likely to fit its strengths and support success
Correct answer
DA pattern the team understands is more likely to fit its strengths and support success
Explanation
A pattern should fit both the project's needs and the team's strengths; choosing a pattern just because it is fashionable is not enough.
- A
- 61
A project prioritizes scalability and fault tolerance. Which patterns does the content suggest considering?
- A
Microservices or space-based architecture
- B
Interpreter or repository architecture
- C
Pipe-filter or strategy architecture
- D
Layered architecture or MVC
Correct answer
AMicroservices or space-based architecture
Explanation
The content identifies microservices and space-based architecture as options to consider when scalability and fault tolerance are top priorities.
- A
- 62
A project prioritizes ease of development and maintenance. Which patterns does the content suggest considering?
- A
Space-based architecture or microservices
- B
Master-slave architecture or broker architecture
- C
Blackboard architecture or interpreter architecture
- D
Layered architecture or MVC
Correct answer
DLayered architecture or MVC
Explanation
Layered architecture and MVC are suggested as possibilities when ease of development and maintenance are more important.
- A
- 63
An application has complex data relationships and needs consistent data handling. Which pattern might be a good choice?
- A
Event-driven architecture
- B
Repository pattern
- C
Master-slave architecture
- D
Strategy pattern
Correct answer
BRepository pattern
Explanation
The content suggests the repository pattern for applications with complex data relationships and a need to keep data consistent.
- A
- 64
A system processes a stream of data in several stages. Which pattern might fit that requirement?
- A
Client-server architecture
- B
Blackboard architecture
- C
Pipe-filter architecture
- D
Microkernel architecture
Correct answer
CPipe-filter architecture
Explanation
Pipe-filter architecture is suggested for streams of data that need to be processed in different stages.
- A
- 65
Why can combining or adapting multiple architecture patterns be useful?
- A
It guarantees that the resulting design has no complexity
- B
It requires every project to follow one rigid set of rules
- C
It can produce a solution better suited to a project's specific challenges
- D
It removes the need to understand each pattern's trade-offs
Correct answer
CIt can produce a solution better suited to a project's specific challenges
Explanation
Patterns can be adapted or combined creatively to address a project's particular needs rather than followed as rigid rules.
- A
- 66
What is the most appropriate way to think about architecture patterns when designing a system?
- A
Avoid trade-offs by selecting a pattern that is perfect in every situation
- B
Choose a pattern before identifying the project's needs
- C
Apply one pattern in exactly the same way to every project
- D
Treat them as guides for balancing structure and flexibility, not strict rules
Correct answer
DTreat them as guides for balancing structure and flexibility, not strict rules
Explanation
Patterns are guides for addressing recurring design challenges. There is no universally perfect pattern, so designers must weigh trade-offs and fit the choice to the project.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.