1. Home
  2. Explore
  3. Computer Science
  4. Software Architecture Patterns

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Software Architecture Patterns

  • 112Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Architecture Foundations
In software design, architecture patterns act as
for structuring robust software systems.

112 questions

  1. 1
    In software design, architecture patterns act as
    _____
    for structuring robust software systems.
    Hint

    Think of a plan that guides construction.

    Answer

    blueprints

    Explanation

    Architecture patterns are described as blueprints that guide how robust software systems are built.

  2. 2
    Good software architecture helps systems remain scalable, maintainable, secure, and
    _____
    as needs change.
    Hint

    Consider the ability to adjust to future needs.

    Answer

    adaptable

    Explanation

    The content identifies scalability, maintainability, security, and adaptability as important qualities of software systems.

  3. 3
    Architecture patterns help developers address
    _____
    design challenges that recur across software projects.
    Hint

    These are challenges that appear again and again.

    Answer

    recurring

    Explanation

    Patterns provide established approaches for recurring design challenges rather than requiring a new solution every time.

  4. 4
    When choosing an architecture, developers should begin by understanding project requirements and
    _____
    .
    Hint

    Consider limits the project must work within.

    Answer

    constraints

    Explanation

    The project’s specific requirements and constraints are the first factors to understand when selecting a pattern.

  5. 5
    Architecture patterns should be treated as
    _____
    rather than strict rules.
    Hint

    They inform decisions without dictating every detail.

    Answer

    guides

    Explanation

    Patterns provide structure, but developers can adapt or blend them to meet a project’s particular needs.

  6. 6
    The size and complexity of an application, performance requirements, security needs, and budget limitations are all factors in choosing a
    _____
    .
    Hint

    These considerations help determine the appropriate structural blueprint.

    Answer

    software architecture pattern

    Explanation

    The content lists application size and complexity, performance, security, and budget among the factors that influence pattern selection.

  7. 7
    A pattern that matches a development team’s skills and experience is more likely to support project
    _____
    .
    Hint

    Think of the result supported by a team using familiar approaches.

    Answer

    success

    Explanation

    Choosing a pattern the team is comfortable with is important for success; the choice should fit both the team’s strengths and project needs.

  8. 8
    If scalability and fault tolerance are top priorities,
    _____
    or space-based architecture may be options to consider.
    Hint

    This pattern divides an application into independent services.

    Answer

    microservices architecture

    Explanation

    The content identifies microservices architecture and space-based architecture as possible choices when scalability and fault tolerance are priorities.

  9. 9
    When ease of maintenance and development is especially important, layered architecture or
    _____
    may be a better fit.
    Hint

    This web-development pattern separates model, view, and controller responsibilities.

    Answer

    MVC

    Explanation

    Layered architecture and MVC are suggested when ease of maintenance and development are important.

  10. 10
    The type of data and the complexity of its relationships can influence the choice of an architecture
    _____
    .
    Hint

    The data’s characteristics can help determine the structural approach.

    Answer

    pattern

    Explanation

    Data characteristics, including complex relationships and consistency needs, are relevant to architecture selection.

  11. 11
    For complex data relationships that need to remain consistent, the
    _____
    pattern may be a good choice.
    Hint

    This pattern separates data access from core application logic.

    Answer

    repository

    Explanation

    The repository pattern can be useful when an application has complex data relationships and needs data consistency.

  12. 12
    When data must pass through different processing stages, the
    _____
    pattern may be suitable.
    Hint

    Its name evokes data traveling through a series of processing steps.

    Answer

    pipe filter

    Explanation

    The pipe filter pattern is suited to data that needs to be processed in different stages.

  13. 13
    Developers can combine and adapt patterns to create solutions for
    _____
    situations.
    Hint

    Patterns are not limited to one rigid application context.

    Answer

    different

    Explanation

    The content emphasizes that patterns can be blended and adapted to solve many different situations.

  14. 14
    Choosing a pattern involves understanding which
    _____
    are acceptable for the project’s goals.
    Hint

    Every architectural choice has benefits and costs.

    Answer

    compromises

    Explanation

    There is no perfect pattern for every project; developers must determine which trade-offs best support their goals.

  15. 15
    The goal of applying architecture patterns is to create software that is robust, maintainable, and
    _____
    .
    Hint

    The software should be able to keep up with changing user needs.

    Answer

    adaptable

    Explanation

    The desired outcome is software that is strong, easy to maintain, and able to adapt as users’ needs change.

  16. 16
    Layered architecture organizes an application into distinct layers, each with a specific
    _____
    .
    Hint

    Each layer has its own responsibility.

    Answer

    job

    Explanation

    The pattern separates an application into layers with distinct responsibilities.

  17. 17
    In layered architecture, the data layer stores the application’s raw
    _____
    .
    Hint

    This layer corresponds to the pantry in the kitchen analogy.

    Answer

    data

    Explanation

    The data layer holds the raw data, just as a pantry stores ingredients before they are prepared.

  18. 18
    In layered architecture, the business layer handles the application’s core
    _____
    .
    Hint

    This layer processes and combines information according to the application’s rules.

    Answer

    logic

    Explanation

    The business layer handles core logic, corresponding to the preparation area in the kitchen analogy.

  19. 19
    The application layer executes tasks and coordinates activity between the
    _____
    .
    Hint

    It corresponds to where the cooking takes place in the analogy.

    Answer

    layers

    Explanation

    The application layer executes tasks and coordinates everything between the other layers.

  20. 20
    The presentation layer provides the user interface that the user
    _____
    .
    Hint

    It is the plated dish presented to the diner in the analogy.

    Answer

    interacts with

    Explanation

    The presentation layer is the interface presented to and used by the user.

  21. 21
    Separating an application into layers supports separation of
    _____
    .
    Hint

    Each layer has a distinct responsibility instead of mixing unrelated jobs.

    Answer

    concerns

    Explanation

    Separation of concerns is one of the key benefits of layered architecture.

  22. 22
    Because the layers have distinct responsibilities, they can be developed and maintained relatively
    _____
    .
    Hint

    One layer can be worked on without treating the whole application as one unit.

    Answer

    independently

    Explanation

    Layered architecture allows each layer to be developed and maintained kind of independently.

  23. 23
    Layered architecture can make a system more scalable, flexible, and easier to
    _____
    .
    Hint

    This benefit involves locating and resolving problems.

    Answer

    troubleshoot

    Explanation

    The content identifies scalability, flexibility, and easier troubleshooting as benefits of layered architecture.

  24. 24
    Adding too many layers can make a system unnecessarily
    _____
    .
    Hint

    Too much structure can make a design harder to manage.

    Answer

    complex

    Explanation

    Although layers help organize a system, too many of them can increase complexity.

  25. 25
    Excessive communication between layers can create performance
    _____
    .
    Hint

    These slow down work as it moves through the system.

    Answer

    bottlenecks

    Explanation

    Communication between layers may cause performance bottlenecks, so the number of layers should suit the system’s needs.

  26. 26
    E-commerce platforms can use layered architecture to separate parts of the shopping experience, such as browsing products and processing
    _____
    .
    Hint

    This is another step in completing an online purchase.

    Answer

    payments

    Explanation

    The content uses e-commerce platforms as an example, with different layers handling activities such as product browsing and payment processing.

  27. 27
    A banking app can use layered architecture to separate account information, transaction processing, and the
    _____
    .
    Hint

    This is the part the customer uses directly.

    Answer

    user interface

    Explanation

    The banking-app example separates account information and transaction processing from the user interface.

  28. 28
    In client-server architecture, clients communicate with a central
    _____
    .
    Hint

    It centrally manages and provides access to resources.

    Answer

    server

    Explanation

    Client-server architecture is organized around communication between a central server and multiple clients.

  29. 29
    In the library analogy for client-server architecture, the client sends a
    _____
    to request a resource.
    Hint

    A reader asks the librarian for a particular book.

    Answer

    request

    Explanation

    Clients request specific resources or services from the server.

  30. 30
    In client-server architecture, clients primarily request and use services provided by the
    _____
    .
    Hint

    This central component manages access to shared resources.

    Answer

    server

    Explanation

    The server manages and provides access to resources, while clients request and use its services.

  31. 31
    A centralized client-server approach can make maintenance easier, improve security, and provide more
    _____
    over resources.
    Hint

    Central management allows greater oversight of resources.

    Answer

    control

    Explanation

    The content names easier maintenance, better security, and more control over resources as advantages of client-server architecture.

  32. 32
    If the server crashes and clients lose access to its services, the system experiences a single point of
    _____
    .
    Hint

    The risk arises because service depends on one central component.

    Answer

    failure

    Explanation

    A server failure can prevent all clients from accessing services, creating a single point of failure.

  33. 33
    Client-server systems use redundancy and
    _____
    mechanisms to reduce the impact of server failure.
    Hint

    These arrangements help recover when the central server is unavailable.

    Answer

    backup

    Explanation

    Good client-server systems use redundancy and backup mechanisms to address the risk of server failure.

  34. 34
    In an email service such as Gmail, the server stores emails and manages their sending and
    _____
    .
    Hint

    This is the other direction of email delivery.

    Answer

    receiving

    Explanation

    The server stores messages and manages sending and receiving, while an email app acts as a client for accessing them.

  35. 35
    Event-driven architecture is designed to react to events or system
    _____
    .
    Hint

    An event may indicate that something has happened or become different.

    Answer

    changes

    Explanation

    Event-driven architecture responds to events or changes, much like a chain reaction.

  36. 36
    User actions, sensor readings, and internal system changes can all serve as
    _____
    .
    Hint

    They are occurrences that can trigger software behavior.

    Answer

    events

    Explanation

    The content gives user actions, sensor readings, and internal system changes as examples of events.

  37. 37
    Unlike a system that follows a fixed path, event-driven architecture responds to what
    _____
    .
    Hint

    The design reacts to occurrences as they arise.

    Answer

    happens

    Explanation

    Event-driven systems are designed to respond to events rather than follow only a predetermined path.

  38. 38
    Event-driven architecture is useful for applications that must process data in
    _____
    .
    Hint

    The response must happen immediately or with very little delay.

    Answer

    real time

    Explanation

    Applications such as stock trading platforms and online games may need to process data in real time.

  39. 39
    In online gaming, event-driven systems are useful because each action needs an immediate
    _____
    .
    Hint

    The system must react promptly to player actions.

    Answer

    response

    Explanation

    Online gaming is an example where each action needs an immediate response.

  40. 40
    Designing, debugging, and testing event-driven systems can be difficult because events may be
    _____
    .
    Hint

    They can occur independently rather than in a single sequential order.

    Answer

    asynchronous

    Explanation

    Event-driven systems may involve asynchronous events happening at the same time, which complicates design, debugging, and testing.

  41. 41
    Event-driven systems must be designed carefully to maintain reliability and avoid unintended
    _____
    .
    Hint

    Poorly coordinated event reactions can produce unwanted outcomes.

    Answer

    consequences

    Explanation

    The content stresses reliability and avoiding unintended consequences when many events occur asynchronously.

  42. 42
    A real-time analytics dashboard can use event-driven architecture to update as new
    _____
    arrives.
    Hint

    The dashboard reacts to incoming information.

    Answer

    data

    Explanation

    Real-time analytics dashboards are an example because they constantly update as new data comes in.

  43. 43
    A fraud detection system can react to transactions by triggering alerts when activity is
    _____
    .
    Hint

    The system identifies activity that may indicate fraud.

    Answer

    suspicious

    Explanation

    Fraud detection systems monitor transactions and trigger alerts if they detect suspicious activity.

  44. 44
    A car’s anti-lock braking system can use event-driven architecture to react quickly and prevent a wheel
    _____
    .
    Hint

    This is the condition the braking system is designed to prevent.

    Answer

    lock up

    Explanation

    The anti-lock braking system reacts to events to help prevent a wheel from locking up.

  45. 45
    In pipe filter architecture, each filter performs a specific operation on data as it moves through a series of
    _____
    .
    Hint

    The architecture’s name describes the route data follows.

    Answer

    pipes

    Explanation

    Data flows through pipes, with each filter applying a specific operation before passing it onward.

  46. 46
    A filter in a pipe filter system transforms or refines data before passing it to the
    _____
    filter.
    Hint

    The data progresses from one processing step to the following one.

    Answer

    next

    Explanation

    Each filter has a defined responsibility and passes its transformed data along the pipeline.

  47. 47
    The modularity of pipe filter architecture makes it easy to add or remove filters and change the data-processing
    _____
    .
    Hint

    This is the sequence of operations data moves through.

    Answer

    workflow

    Explanation

    Adding or removing filters allows developers to adapt the data-processing workflow to changing needs.

  48. 48
    Because filters are independent, they can be reused in different
    _____
    .
    Hint

    A filter can be used in more than one data-processing sequence.

    Answer

    pipelines

    Explanation

    Independent filters promote code reusability because they can be reused in different pipelines.

  49. 49
    When an error appears in a pipe filter system’s final output, debugging may require tracing back through each
    _____
    .
    Hint

    The source of the error may lie in any processing step.

    Answer

    filter

    Explanation

    Finding an error in the final output can require tracing through the filters to locate its source.

  50. 50
    For pipe filter components to exchange data correctly, all filters must agree on the data
    _____
    .
    Hint

    This specifies how the information is represented and transferred.

    Answer

    format

    Explanation

    Agreement on data format is necessary; otherwise, constraints can arise in how data is represented and transferred.

  51. 51
    A compiler can use pipe filter architecture to process source code through stages such as lexical analysis, parsing, and code
    _____
    .
    Hint

    This is the final listed compiler stage in the example.

    Answer

    generation

    Explanation

    Compiler processing is an example of a pipeline: filters perform lexical analysis, parsing, and code generation.

  52. 52
    Image-processing pipelines can use filters to apply effects such as blurring, sharpening, and color
    _____
    .
    Hint

    This effect adjusts the image’s colors.

    Answer

    correction

    Explanation

    Image processing is another pipe filter example, with filters applying effects including blurring, sharpening, and color correction.

  53. 53
    In microkernel architecture, the minimal core system provides the essential
    _____
    .
    Hint

    It supplies the basic capabilities on which extensions rely.

    Answer

    functionality

    Explanation

    The core system provides essential functionality, while plug-in modules add specialized features.

  54. 54
    In the microkernel Lego analogy, plug-in modules extend the core with specialized features or
    _____
    .
    Hint

    These adapt the system to particular needs.

    Answer

    customizations

    Explanation

    Plug-in modules provide specialized features or customizations beyond the core system’s essential functions.

  55. 55
    Microkernel architecture’s modularity allows plug-ins to be added or updated without disrupting the
    _____
    .
    Hint

    This is the minimal foundation that remains in place as modules change.

    Answer

    core system

    Explanation

    The pattern makes it possible to add features or update existing ones without disrupting the core system.

  56. 56
    In microkernel architecture, fixing one plug-in can be done without affecting other parts of the
    _____
    .
    Hint

    The modules are isolated enough that a change can be localized.

    Answer

    system

    Explanation

    A plug-in can be repaired independently, much like replacing a faulty Lego brick without dismantling the whole construction.

  57. 57
    As a microkernel system grows, communication between the core and its plug-ins can become
    _____
    .
    Hint

    More components can make coordination harder.

    Answer

    complicated

    Explanation

    Communication between the core system and many plug-ins can become complicated as the system grows.

  58. 58
    Because the microkernel core is minimal, some functionality may need to be built from scratch instead of using features readily available in more
    _____
    architectures.
    Hint

    This describes architectures organized as a more unified whole.

    Answer

    monolithic

    Explanation

    A minimal core may lack features that are readily available in other, more monolithic architectures.

  59. 59
    In an operating system example of microkernel architecture, the core kernel handles basics such as memory management and process
    _____
    .
    Hint

    This is the kernel task that determines how processes get time to run.

    Answer

    scheduling

    Explanation

    The operating-system example describes the core kernel handling memory management and process scheduling, while drivers and other components act as plug-ins.

  60. 60
    Microservices architecture breaks a large application into smaller, independent
    _____
    .
    Hint

    Each component focuses on a particular task or function.

    Answer

    services

    Explanation

    Microservices divide an application into smaller independent services, each focused on a specific task or functionality.

  61. 61
    In microservices, teams can work on individual services without affecting
    _____
    .
    Hint

    The services are designed to be independent of one another.

    Answer

    the others

    Explanation

    Service independence allows teams to work on one service without necessarily affecting the other services.

  62. 62
    If one microservice becomes very busy, it can be scaled
    _____
    without scaling the entire system.
    Hint

    Only the service experiencing heavy demand needs to be adjusted.

    Answer

    independently

    Explanation

    A busy microservice can be scaled independently, without impacting the rest of the system.

  63. 63
    A key challenge of microservices is coordinating communication between many independent
    _____
    .
    Hint

    The challenge involves keeping the separate components working together.

    Answer

    services

    Explanation

    Managing communication and coordination among independent services can become complex as their number grows.

  64. 64
    As the number of microservices grows, network congestion and the need to secure each service and its interactions become important
    _____
    .
    Hint

    These are risks or issues that teams must address.

    Answer

    concerns

    Explanation

    The content highlights network congestion and security of individual services and their interactions as microservices challenges.

  65. 65
    Netflix uses microservices for functions such as user authentication and content recommendations, helping it scale and adapt
    _____
    .
    Hint

    The benefit describes how fast the platform can respond to changing demands.

    Answer

    quickly

    Explanation

    Netflix is presented as an example of microservices supporting specific functions and enabling rapid scaling and adaptation.

  66. 66
    Space-based architecture distributes workload across multiple processing
    _____
    .
    Hint

    These are the separate units that work together on tasks.

    Answer

    nodes

    Explanation

    Instead of relying on one powerful server, space-based architecture distributes work across multiple nodes.

  67. 67
    Space-based architecture uses a shared memory space that can be accessed by many processing
    _____
    .
    Hint

    These components share access to common resources while working on tasks.

    Answer

    units

    Explanation

    The pattern is described as a massive shared memory space accessed by many processing units.

  68. 68
    Adding more processing nodes in space-based architecture can help handle larger amounts of data and
    _____
    .
    Hint

    This is the other increasing workload mentioned alongside data.

    Answer

    traffic

    Explanation

    The distributed design can handle huge amounts of data and traffic by adding more nodes.

  69. 69
    A challenge in space-based architecture is ensuring data
    _____
    across all distributed nodes.
    Hint

    The data should not conflict or diverge among the different components.

    Answer

    consistency

    Explanation

    Distributed systems must ensure data consistency across their nodes.

  70. 70
    Communication among distributed components can introduce
    _____
    that may affect performance.
    Hint

    This is a delay in communication or response.

    Answer

    latency

    Explanation

    Communication between distributed components can add latency, so it must be managed carefully.

  71. 71
    Large e-commerce platforms and online gaming platforms use space-based architecture to handle massive workloads and many simultaneous
    _____
    .
    Hint

    The e-commerce example emphasizes many operations occurring at once.

    Answer

    transactions

    Explanation

    The content gives large e-commerce platforms handling millions of transactions and online games supporting many connected players as examples of space-based architecture.

  72. 72
    In master-slave architecture, the master makes decisions and
    _____
    tasks to slave components.
    Hint

    The master assigns work to the other components.

    Answer

    delegates

    Explanation

    The master acts as the brains of the operation, making decisions and delegating tasks to slave components.

  73. 73
    In master-slave architecture, slave components carry out assigned tasks and report back to the
    _____
    .
    Hint

    They report to the component coordinating the work.

    Answer

    master

    Explanation

    Slave components perform assigned tasks and report their results to the master.

  74. 74
    Adding more slave components can help a master-slave system scale to handle a larger
    _____
    .
    Hint

    More workers can take on more work.

    Answer

    workload

    Explanation

    The division of labor allows more workers to be added as the workload grows.

  75. 75
    Master-slave systems can improve fault tolerance because a task can be reassigned if one worker is
    _____
    .
    Hint

    Another worker can take over when the original one cannot work.

    Answer

    unavailable

    Explanation

    If one worker is unavailable, the master can reassign its task to another worker so work can continue.

  76. 76
    If the master fails without a backup, it can become a single point of
    _____
    .
    Hint

    The entire arrangement may depend on this coordinating component.

    Answer

    failure

    Explanation

    The master component can be a single point of failure if it is not designed robustly.

  77. 77
    A
    _____
    master can take over when the primary master goes down.
    Hint

    This component is ready to assume the primary role during a failure.

    Answer

    backup

    Explanation

    Robust master-slave systems use failover mechanisms so a backup master can replace a failed primary one.

  78. 78
    Communication overhead between the master and slaves can affect performance, especially in
    _____
    systems.
    Hint

    More components can make coordination more demanding.

    Answer

    large

    Explanation

    Communication between the master and slaves can become complicated and affect performance, particularly in large systems.

  79. 79
    Database replication uses master-slave architecture to copy data to multiple servers for redundancy and high
    _____
    .
    Hint

    The system should remain accessible when a server fails.

    Answer

    availability

    Explanation

    Database replication provides redundancy and high availability; if one server fails, the system can switch to a replica.

  80. 80
    In load balancing, the master distributes incoming
    _____
    across several servers.
    Hint

    This helps prevent any one server from becoming overloaded.

    Answer

    traffic

    Explanation

    Load balancing is an example in which a master distributes incoming traffic among several servers.

  81. 81
    In broker architecture, clients and servers communicate through a central
    _____
    rather than interacting directly.
    Hint

    It connects parties like an intermediary in a marketplace.

    Answer

    broker

    Explanation

    The broker receives requests from clients and routes them to the appropriate servers, decoupling the participants.

  82. 82
    A broker routes client requests to the appropriate
    _____
    for processing.
    Hint

    These components handle the requested work.

    Answer

    servers

    Explanation

    The broker acts as a central hub that directs requests to the right servers for processing.

  83. 83
    Broker architecture is flexible because servers can be added or removed without disrupting the
    _____
    system.
    Hint

    The broker helps preserve the operation of the complete arrangement.

    Answer

    whole

    Explanation

    The broker decouples clients and servers, allowing servers to be added or removed without disrupting the whole system.

  84. 84
    A broker can improve fault tolerance by redirecting requests if a
    _____
    fails.
    Hint

    The request can be routed elsewhere when this component is unavailable.

    Answer

    server

    Explanation

    The broker can redirect requests when a server fails, improving fault tolerance.

  85. 85
    If the broker itself fails without suitable failover mechanisms, it can become a single point of
    _____
    .
    Hint

    The central intermediary may be a dependency for the whole system.

    Answer

    failure

    Explanation

    The broker must be designed with failover mechanisms because its own failure can affect the system as a whole.

  86. 86
    Broker implementations require careful design of routing logic, load balancing, and
    _____
    .
    Hint

    These measures protect the broker and the communication it coordinates.

    Answer

    security measures

    Explanation

    The content identifies routing logic, load balancing, and security measures as concerns when implementing a broker.

  87. 87
    Message brokers such as RabbitMQ and Apache Kafka allow messages to be exchanged between applications or
    _____
    .
    Hint

    These are the other software components that communicate through the broker.

    Answer

    services

    Explanation

    Message brokers facilitate message exchange between different applications or services.

  88. 88
    In Blackboard architecture, specialized modules collaborate by reading and writing information on a central
    _____
    .
    Hint

    It is the shared board on which problem information is collected.

    Answer

    Blackboard

    Explanation

    The Blackboard is a central data store where specialized modules contribute information and insights.

  89. 89
    Blackboard architecture is useful when a solution emerges gradually from uncertain or
    _____
    data.
    Hint

    The available information may not yet form a complete picture.

    Answer

    incomplete

    Explanation

    The pattern suits problems involving uncertain or incomplete data, where a solution develops as modules contribute.

  90. 90
    In a speech recognition system using Blackboard architecture, different modules can analyze audio, identify phones, match words, and interpret
    _____
    .
    Hint

    This is the understanding derived from the recognized words.

    Answer

    meaning

    Explanation

    Speech recognition is an example in which modules contribute different analyses to the central Blackboard, including interpretation of meaning.

  91. 91
    When many Blackboard modules contribute at once, data must be kept consistent and
    _____
    .
    Hint

    The shared information must stay coordinated over time.

    Answer

    synchronized

    Explanation

    Managing a central Blackboard can be complex; consistency and synchronization help avoid conflicts and support sound solutions.

  92. 92
    Blackboard modules work
    _____
    through the shared board rather than needing to solve the problem through direct collaboration.
    Hint

    They contribute to and use a common store instead of coordinating only through direct exchanges.

    Answer

    indirectly

    Explanation

    Specialized modules work indirectly through the Blackboard, each contributing its part to the solution.

  93. 93
    The Interpreter pattern defines a grammatical representation for a specific language and provides an interpreter to process and
    _____
    its instructions.
    Hint

    The interpreter carries out the meaning of the instructions.

    Answer

    execute

    Explanation

    The pattern represents a language’s grammar and processes and executes instructions written in that language.

  94. 94
    A programming language interpreter translates human-readable code into instructions the computer can understand and
    _____
    .
    Hint

    The computer does more than understand the translated instructions; it carries them out.

    Answer

    execute

    Explanation

    The content uses Python and JavaScript as examples of languages whose code an interpreter processes into instructions the computer can execute.

  95. 95
    The Interpreter pattern is useful for implementing a domain-specific or
    _____
    language.
    Hint

    This kind of language can express specialized logic or tasks.

    Answer

    scripting

    Explanation

    The pattern is useful when creating a domain-specific language or a scripting language for particular logic.

  96. 96
    In a business rule engine, an interpreter can evaluate rules written in a specialized language against
    _____
    .
    Hint

    The rules are applied to the information the application is handling.

    Answer

    the data

    Explanation

    A business application can use a specialized language to define rules and an interpreter to evaluate those rules against the data.

  97. 97
    In MVC, the model represents the application’s data and
    _____
    .
    Hint

    It contains the information and underlying behavior of the application.

    Answer

    logic

    Explanation

    The model represents the data and logic of the application.

  98. 98
    In MVC, the controller handles user input and updates the
    _____
    .
    Hint

    It changes the application’s data and logic in response to user actions.

    Answer

    model

    Explanation

    The controller handles user input and updates the model.

  99. 99
    In MVC, the view displays information to the
    _____
    .
    Hint

    It is the presentation part of the application.

    Answer

    user

    Explanation

    The view displays information to the user, while the model holds data and logic and the controller handles input.

  100. 100
    Separating responsibilities in MVC helps make code more reusable, simplifies testing, and makes applications easier to
    _____
    .
    Hint

    Changes can be made with less risk of a domino effect.

    Answer

    update

    Explanation

    MVC separates concerns, supports code reuse and testing, and makes updating an application easier without causing cascading changes.

  101. 101
    For very large applications with many views and controllers, MVC can become
    _____
    .
    Hint

    The number of components can make the pattern harder to manage.

    Answer

    complex

    Explanation

    Although MVC is powerful and popular, it can become complex in very large applications with many views and controllers.

  102. 102
    For a simple application, MVC may be
    _____
    because it adds unnecessary overhead.
    Hint

    The pattern may be more structure than the project needs.

    Answer

    overkill

    Explanation

    For a simple application, MVC can add unnecessary overhead and may be more than the project requires.

  103. 103
    The repository pattern mediates between an application’s domain logic and its data access
    _____
    .
    Hint

    It sits between core application logic and data storage operations.

    Answer

    layer

    Explanation

    A repository acts as an intermediary between the domain logic and the data access layer.

  104. 104
    A repository provides a clean interface for retrieving and
    _____
    data.
    Hint

    The application uses the interface both to obtain and to save information.

    Answer

    persisting

    Explanation

    The repository provides an interface for retrieving and persisting data while hiding data-store details.

  105. 105
    The repository pattern hides the complexity of the underlying database or data
    _____
    .
    Hint

    This is the system where information is kept.

    Answer

    store

    Explanation

    The repository hides the complexity of the underlying database or data store from the rest of the application.

  106. 106
    Because the repository isolates data access, changing the database may require updating the repository without changing the rest of the
    _____
    .
    Hint

    The repository limits how far a data-storage change must spread.

    Answer

    application

    Explanation

    The pattern promotes loose coupling; changes to the database or data access logic can be localized to the repository.

  107. 107
    The Strategy pattern defines a family of algorithms, encapsulates each one, and makes them
    _____
    .
    Hint

    One approach can be swapped for another as needed.

    Answer

    interchangeable

    Explanation

    The pattern allows algorithms to be exchanged according to the situation or user’s needs.

  108. 108
    A navigation app can use the Strategy pattern to switch among routing algorithms for shortest distance, fastest travel time, or avoiding
    _____
    .
    Hint

    This route preference avoids a particular kind of road charge.

    Answer

    tolls

    Explanation

    The navigation example selects among routing strategies based on the user’s preferences, including avoiding tolls.

  109. 109
    The Strategy pattern supports code reuse by allowing algorithms to be used in different parts of an application or in different
    _____
    .
    Hint

    The algorithms may be reused beyond a single program.

    Answer

    applications

    Explanation

    The content notes that algorithms can be reused in different parts of an application or across different applications.

  110. 110
    Since each algorithm can be tested independently, the Strategy pattern can make
    _____
    easier.
    Hint

    This is the process of checking whether the algorithms work correctly.

    Answer

    testing

    Explanation

    Encapsulating algorithms separately allows each one to be tested independently.

  111. 111
    The Strategy pattern makes an application more extensible because new algorithms can be added without changing the
    _____
    code.
    Hint

    New options can be added while leaving what is already there alone.

    Answer

    existing

    Explanation

    New algorithms can be added without changing existing code, making the application more extensible.

  112. 112
    If there are only one or two simple algorithms, using the Strategy pattern may add unnecessary
    _____
    .
    Hint

    A flexible structure can be excessive for a very small problem.

    Answer

    complexity

    Explanation

    The pattern may be overkill when there are only one or two simple algorithms, or when separating very similar algorithms is not worth the effort.

1 of 112
Question 1 of 112

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent