Twee - Common Software Architecture Patterns
Twee - Common Software Architecture Patterns
Twee - Common Software Architecture Patterns
2 How does the layered pattern in software architecture help structure programs?
a By decomposing them into hierarchical groups of tasks at different abstraction levels.
b By distributing work among identical components and aggregating their results.
c By facilitating the publication and subscription of events through a central bus.
d By separating user input handling from the internal data representation.
3 Which software architecture pattern is commonly used in message broker applications?
a Client-Server
b Master-Slave
c Broker
d Peer-to-Peer
6 What type of software systems commonly utilize the Peer-to-Peer architecture pattern?
a File sharing networks, multimedia protocols, and blockchain-based applications.
b Database applications and peripherals connected to a bus.
c General desktop applications and e-commerce web apps.
d Notification services and Android development.
7 What is the primary role of the Controller component in the Model-View-Controller
(MVC) pattern?
a To handle user input and interactions.
b To display information to the user.
c To contain the core functionality and data.
d To select, configure, and execute processing modules.
3 The four layers of a general information system include the presentation layer, application
layer, business logic layer, and data access layer.
4 The server component only provides services to one client component.
5 The Master component does not distribute work among slave components.
6 Messages are published by the source to a specific channel on the event bus, and listeners
subscribe to that channel.
7 Not all components have access to Blackboard and cannot produce new data objects.
2 How does the Layered Pattern structure programs, and what are the four layers commonly
found in a general information system?
3 Explain how the Client-Server pattern functions and provide examples of applications
where it is used.
5 What are the major components of the Event Bus pattern, and where is this software
architecture pattern commonly employed?
6 How does the Pipe-Filter pattern process data, and in which fields is it typically used?
7 Discuss the Broker Pattern and its role in coordinating communication among distributed
systems.
8 In the Peer-to-Peer pattern, how do individual components (peers) function, and what are
some common uses of this pattern?
9 Explain the Model-View-Controller pattern and its division into three parts. Provide
examples of web frameworks that use this pattern.
10 What is the Interpreter Pattern used for, and in which type of languages is it commonly
applied?
Correct Answers
2 Correct Answers:
1 b
2 a
3 c
4 a
5 c
6 a
7 a
3 Correct Answers:
1 True
2 False - This statement contradicts the factual information provided in the text - the
speaker is talking about the most common patterns, not the least common.
3 True
4 False - This statement contradicts the factual information provided in the text - the
server provides services to multiple client components, not just one.
5 False - This statement contradicts the factual information provided in the text - the
Master component does distribute work among slave components.
6 True
7 False - This statement contradicts the factual information provided in the text - all
components have access to Blackboard and can produce new data objects.
4 Correct Answers:
1 pictorial representation of an IT system 2 communication among components
3 application structure 4 levels of abstraction 5 clients 6 result
7 event source and listeners
5 Correct Answers:
1 The primary goal of software architecture is to identify requirements affecting the
structure of an application, reducing business risks associated with technical
solutions, and bridging the gap between business and technical needs.
2 The Layered Pattern structures programs by decomposing them into subtasks at
different levels of abstraction. The four common layers are Presentation/UI layer,
Application/Service layer, Business Logic/Domain layer, and Data Access/Persistent
layer.
3 The Client-Server pattern involves a server providing services to multiple clients who
request these services. It is commonly used in online applications like email,
document sharing, and banking.
4 The Master-Slave pattern consists of a master component distributing work among
identical slave components. This pattern is often used in database applications and
situations involving connected peripherals.
5 The Event Bus pattern deals with events through components like Event Source, Event
Listeners, Channel, and Event Bus. It is widely used in Android development and
notification services.
6 The Pipe-Filter pattern processes a stream of data by passing it through filters
enclosed within processing steps. It is used in building compilers and defining
workflows in bioinformatics.
7 The Broker Pattern structures distributed systems with decoupled components using
a broker for communication coordination. It is employed in message broker software
like Apache Kafka and JBoss messaging.
8 In the Peer-to-Peer pattern, individual components known as peers can function as
both clients and servers, dynamically changing roles. It is used in file-sharing
networks, multimedia protocols, and blockchain-based products.
9 The Model-View-Controller pattern divides interactive applications into model, view,
and controller parts to separate core functionality, user display, and input handling.
Web frameworks like Django and Rails are based on this pattern.
10 The Interpreter Pattern is used to interpret programs written in a specific language by
evaluating sentences or expressions. It is commonly used in database query languages
such as SQL.