0% found this document useful (0 votes)
62 views59 pages

SAD_Assignment1

software architecture course

Uploaded by

Hana Yaregal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views59 pages

SAD_Assignment1

software architecture course

Uploaded by

Hana Yaregal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 59

1.

Given the following quality scenario  If the bus subsystem stops transmitting its location for any
reason (processor crashes, GPS receiver stops working, transmitter stops working) during peak traffic
hours, then the displays should show the scheduled arrival time for that bus. This will continue until the
bus returns to its base, whereupon the subsystem should be fixed within 30 minutes. A. Which quality
attribute is described in the scenario? B. Restate the quality attribute requirement as a quality attribute
scenario in the form of quality-attribute-specific tables C. Which tactic applicable/use is described in the
scenario?

ChatGPT said:

ChatGPT

A. Which quality attribute is described in the scenario?

The quality attribute described in this scenario is availability. The system needs to ensure that the bus
location information remains accessible to the displays, even if the subsystem experiences issues such as
a processor crash, GPS failure, or transmitter malfunction. The requirement emphasizes minimizing
downtime and providing fallback mechanisms to ensure the service continues functioning (e.g., showing
scheduled arrival times) during outages.

B. Restate the quality attribute requirement as a quality attribute scenario in the form of quality-
attribute-specific tables

To restate the scenario as a quality attribute scenario, we can break it down into specific components:

Attribute Description

Quality
Availability
Attribute

The bus subsystem stops transmitting its location due to processor crashes, GPS
Stimulus
receiver failure, or transmitter failure during peak traffic hours.

Peak traffic hours, the system must continue to function in a potentially high-traffic,
Environment
high-stress environment.

Artifact The bus subsystem, including its processors, GPS receiver, and transmitter.

The displays should show the scheduled arrival time for the bus until the subsystem
Response
returns to service.

Response The scheduled arrival time is displayed without interruption. The subsystem is restored
Measure within 30 minutes of returning to the base.

C. Which tactic applicable/use is described in the scenario?

The tactic described in the scenario is related to fault tolerance and failover mechanisms. Specifically, it
seems to describe graceful degradation and failure recovery tactics:

 Graceful Degradation: When the bus subsystem fails, the system still provides useful information
(scheduled arrival time) instead of completely failing to provide any data.
 Failure Recovery: The subsystem is restored within a fixed time (30 minutes), ensuring the
system can recover and resume normal functionality after a failure.

4o mini

You said:

2. List and explain Static vs. Dynamic design models?

ChatGPT said:

ChatGPT

Static vs. Dynamic Design Models

In software design and architecture, static and dynamic models are two different approaches to
visualizing and describing how a system behaves and is structured. Here's a detailed breakdown of each:

Static Design Models

Static models describe the structure of a system and how its components are organized. These models
focus on the static aspects of the system, such as data structures, relationships, and components that do
not change during execution. They provide a snapshot of the system's architecture.

Key Characteristics:

 Focus: Describes the structure, organization, and components of a system that remain constant
throughout its execution.

 Behavior: Does not capture system behavior over time; instead, it shows the relationships and
interactions between static components.

 Viewpoint: Primarily represents the system's static structure (e.g., classes, objects, and their
relationships).

Examples of Static Models:

1. Class Diagrams (UML):

o Describes classes, their attributes, methods, and the relationships between them (e.g.,
inheritance, composition, and association).

2. Component Diagrams:

o Depicts the physical components or modules of a system and how they are
interconnected.

3. Deployment Diagrams:

o Describes the physical deployment of software on hardware nodes, showing how the
software is distributed across different machines.
4. ER Diagrams (Entity-Relationship Diagrams):

o Used in database design to describe entities, their attributes, and relationships.

Example Usage:

 Class Diagram: Shows the relationships between objects, attributes, and methods, but does not
show how objects interact dynamically at runtime.

 Component Diagram: Illustrates the software components (e.g., modules, libraries) and how
they communicate with each other in a static way.

Dynamic Design Models

Dynamic models focus on the behavior of the system over time. These models show how different parts
of the system interact and change in response to different stimuli, events, or conditions. They capture
how the system behaves during execution, with a focus on time-dependent behavior.

Key Characteristics:

 Focus: Describes the dynamic behavior of the system, especially the interactions and changes
that occur at runtime.

 Behavior: Captures how objects or components change states, interact, or evolve over time.

 Viewpoint: Primarily represents the system's behavior, state transitions, and execution flow.

Examples of Dynamic Models:

1. Sequence Diagrams (UML):

o Illustrates how objects or components interact over time by showing messages


exchanged between them in a sequential order.

2. Activity Diagrams:

o Describes the flow of activities or actions within a system and how different tasks are
executed in response to events.

3. State Diagrams:

o Depicts the states that an object or system can be in and how it transitions between
states based on events or actions.

4. Communication Diagrams:

o Similar to sequence diagrams, but emphasizes the relationships between objects rather
than the time order of events.

5. Use Case Diagrams:


o Focuses on the interactions between the system and external actors, modeling what
actions the system performs.

Example Usage:

 Sequence Diagram: Shows the order in which messages are passed between objects at runtime,
reflecting the system's dynamic interactions.

 State Diagram: Describes how an object transitions through different states based on events
(e.g., "waiting," "processing," "completed").

Comparison Between Static and Dynamic Models:

Aspect Static Models Dynamic Models

Structure and organization of system Behavior, interactions, and state changes


Focus
components over time

The system's components and their The system's operation and interactions at
Key Emphasis
relationships runtime

Describes how components are related Describes how the system behaves over
Purpose
and structured time

Changes Over Describes system behavior and state


No change during runtime (static)
Time transitions (dynamic)

Class Diagrams, Component Diagrams, ER Sequence Diagrams, State Diagrams,


Examples
Diagrams Activity Diagrams

System architecture, component design, Interaction modeling, state management,


Use Cases
database schema runtime behavior

When to Use Each:

 Static Models are best used when:

o You need to understand the system’s components and their relationships.

o You are designing the structure of the system or the database.

o You want to visualize the long-term, unchanging organization of the system.

 Dynamic Models are best used when:

o You need to understand how the system behaves during execution.

o You are modeling interactions between objects or components over time.


o You need to manage and visualize changes in state or execution flow.

Both types of models are typically used together in comprehensive system design to provide a holistic
view of both structure and behavior.

4o mini

You said:

3. Explain software architecture pattern and software design pattern with proper diagram and scenarios,
difference and example?

ChatGPT said:

ChatGPT

Software Architecture Pattern vs. Software Design Pattern

Software architecture patterns and software design patterns are both critical to the software
development process, but they serve different purposes and operate at different levels of abstraction in
the system design.

Software Architecture Pattern

Definition: A software architecture pattern refers to a high-level, reusable solution to a recurring


architectural problem that provides a framework for organizing the structure of the system. It addresses
broad concerns such as how components or services interact, scalability, and overall system design.
Architecture patterns focus on the global structure of a system, influencing major decisions that affect
performance, security, maintainability, etc.

Key Characteristics:

 Works at a high level of abstraction.

 Defines the fundamental organization of a system and the high-level interactions between
components.

 Focuses on system-wide concerns, such as scalability, reliability, fault tolerance, and


maintainability.

 Usually includes guidelines for structuring components, how they communicate, and the way
dependencies are managed.

Examples of Software Architecture Patterns:

1. Layered Architecture Pattern:

o Divides the system into layers where each layer has a specific responsibility. Common
layers are Presentation, Business Logic, and Data Access.
o Scenario: A web application that separates the user interface, business logic, and
database management into three distinct layers.

2. Microservices Architecture Pattern:

o The system is divided into small, independently deployable services that communicate
via well-defined APIs.

o Scenario: A large e-commerce application where each feature (e.g., order management,
product catalog, user authentication) is handled by a separate microservice.

3. Client-Server Architecture Pattern:

o The system is divided into two parts: a client that makes requests and a server that
provides responses.

o Scenario: A traditional client-server application, such as a web browser and a web


server.

4. Event-Driven Architecture Pattern:

o The system is built around events and their handling, where services communicate by
emitting and reacting to events.

o Scenario: An online payment system where various services (e.g., payment processing,
order fulfillment) listen to and act on payment success or failure events.

Diagram for Layered Architecture Pattern:

plaintext

Copy code

+--------------------------------------+

| Presentation Layer |

| (User Interface, UI Components) |

+--------------------------------------+

| Business Logic Layer |

| (Business Rules, Core Application) |

+--------------------------------------+

| Data Access Layer |

| (Database, File System, APIs, etc.) |

+--------------------------------------+
Software Design Pattern

Definition: A software design pattern is a more detailed, reusable solution to a specific problem that
arises within the context of software design. Design patterns deal with smaller-scale, more localized
concerns, such as object creation, behavior, and interaction between components. They focus on
improving the design of individual components or modules.

Key Characteristics:

 Works at a lower level of abstraction than architecture patterns.

 Provides solutions to specific problems that arise during development, typically related to object
design, class structures, and interaction.

 Helps in writing more maintainable, flexible, and scalable code.

 Focuses on solving problems related to classes, objects, methods, or interactions.

Examples of Software Design Patterns:

1. Singleton Pattern:

o Ensures that a class has only one instance and provides a global point of access to that
instance.

o Scenario: A logging system where only one instance of the logger should exist in the
entire application to prevent redundant logs.

2. Factory Method Pattern:

o Defines an interface for creating objects, but allows subclasses to alter the type of
objects that will be created.

o Scenario: A notification system where different types of notifications (SMS, email, push)
are created using a common interface, but the actual instantiation depends on the
notification type.

3. Observer Pattern:

o Allows an object (the subject) to notify a list of dependent objects (the observers)
automatically of any state changes, typically by calling one of their methods.

o Scenario: A weather monitoring system where multiple display devices (observers)


update their readings when the central weather station (subject) changes its state.

4. Decorator Pattern:

o Allows additional responsibilities to be added to an object dynamically. It provides a


flexible alternative to subclassing for extending functionality.

o Scenario: A coffee shop application where a basic coffee object can be dynamically
decorated with additional features like milk, sugar, or whipped cream.
Diagram for Singleton Pattern:

plaintext

Copy code

+---------------------------+

| Singleton Class |

| - private static instance|

| - private constructor |

| - public getInstance() |

+---------------------------+

Comparison: Architecture Pattern vs. Design Pattern

Aspect Software Architecture Pattern Software Design Pattern

Level of Low-level, focused on components and


High-level, system-wide decisions
Abstraction interactions

System structure, components, and their Class structures, object creation, and
Focus
relationships specific behaviors

Solves broad problems related to system Solves local problems in how objects
Purpose
organization and interaction and components interact

Global system architecture, inter-component Specific issues within individual


Scope
communication components or interactions

Microservices, Layered Architecture, Client- Singleton, Factory Method, Observer,


Example
Server Decorator

System reliability, scalability, fault tolerance, Code reuse, object creation, behavior
Typical Concern
deployment flexibility

Example Scenario of Architecture and Design Patterns Together:

Imagine you're building an online shopping system:

1. Software Architecture Pattern:

o You might use the Microservices Architecture Pattern to divide the system into several
independent services like order service, payment service, and inventory service.

2. Software Design Pattern:


o Inside the order service, you might use the Factory Method Pattern to create different
types of orders (e.g., regular order or express order).

o You could also use the Observer Pattern to notify the user interface (UI) whenever an
order status changes (e.g., from processing to shipped).

Both patterns work together, with the architecture pattern defining the overall system structure and the
design pattern solving localized issues within specific components.

Conclusion:

 Software Architecture Patterns define the overall system structure and are concerned with
large-scale system organization.

 Software Design Patterns are concerned with smaller design issues and provide reusable
solutions at a more granular level. Both types of patterns are essential for creating scalable,
maintainable, and efficient software systems.

4o mini

You said:

4. Write about design methods in detail?

ChatGPT said:

ChatGPT

Design Methods in Software Engineering

Design methods in software engineering refer to the structured approaches and processes used to
develop software solutions from requirements to implementation. These methods aim to ensure that
software systems are well-designed, maintainable, scalable, and adaptable. They guide the software
design process by providing specific guidelines, tools, and techniques to translate functional and non-
functional requirements into a coherent design.

Key Design Methods:

1. Structured Design

2. Object-Oriented Design (OOD)

3. Component-Based Design

4. Prototyping

5. Rapid Application Development (RAD)

6. Model-Driven Design

7. Agile Design
Each of these methods has its own focus, principles, and processes for designing software systems. Let's
delve into each of them:

1. Structured Design

Overview: Structured design is a method that focuses on breaking down a system into smaller,
manageable components or modules. It emphasizes a top-down approach where high-level modules are
progressively divided into more detailed, low-level modules. Structured design relies heavily on
flowcharts, data flow diagrams (DFDs), and other visual representations.

Key Principles:

 Modularity: Decomposing a system into independent modules that can be developed, tested,
and maintained separately.

 Top-Down Approach: Designing the system starting from the highest level of abstraction and
progressively refining it.

 Data Flow: Focus on how data flows through the system, ensuring that data is passed between
modules in a consistent and logical manner.

Techniques:

 Data Flow Diagrams (DFD): Used to represent how data moves through the system.

 Entity-Relationship (ER) Diagrams: Illustrates the relationships between data entities.

 Structure Charts: Used to represent the hierarchy of modules and their interactions.

Use Case:

 Structured design is commonly used in traditional systems like transaction processing systems
where clear data flow and modular design are essential.

2. Object-Oriented Design (OOD)

Overview: Object-Oriented Design (OOD) is a design method based on the concept of objects, which
encapsulate both data and behavior. The main goal is to structure software around real-world objects
and their interactions. It emphasizes reusability, modularity, and extensibility.

Key Principles:

 Encapsulation: Grouping related data and behavior (methods) within objects.

 Inheritance: Objects can inherit properties and behaviors from other objects, promoting
reusability.

 Polymorphism: Objects can take on many forms, and the same operation can behave differently
depending on the object.
 Abstraction: Hiding the complexity by focusing on the relevant properties and behaviors of
objects.

Techniques:

 Class and Object Diagrams: Visual representations of classes, objects, and their relationships.

 UML (Unified Modeling Language): A standard language for visualizing object-oriented design,
including class diagrams, sequence diagrams, and state diagrams.

Use Case:

 Object-Oriented Design is suitable for building systems that require flexibility, such as graphical
user interfaces (GUIs), simulations, or systems that are expected to evolve over time.

3. Component-Based Design

Overview: Component-Based Design (CBD) focuses on designing software by assembling reusable,


independently deployable, and replaceable components. These components communicate with each
other via well-defined interfaces. It promotes modularity, reusability, and scalability.

Key Principles:

 Component Reusability: Components are designed to be reused across different systems or


projects.

 Separation of Concerns: Each component focuses on a specific task or functionality.

 Loose Coupling: Components should interact with each other through well-defined interfaces,
reducing dependencies between them.

Techniques:

 Component Diagrams: Used in UML to represent the components and their interfaces.

 Service-Oriented Architecture (SOA): A design method based on the CBD approach where
services are treated as components that communicate over a network.

Use Case:

 Component-based design is widely used in enterprise applications, where different services or


components (e.g., payment processing, user authentication) are integrated to form a complete
system.

4. Prototyping

Overview: Prototyping is a design method that focuses on creating early, simplified versions (prototypes)
of the system to explore ideas, validate requirements, and gather feedback from users. Prototypes are
iteratively refined based on user feedback.
Key Principles:

 User Involvement: Users provide feedback on prototypes to ensure that the system meets their
needs.

 Iterative Development: The prototype is built, tested, and refined in multiple iterations.

 Early Visualization: A working prototype allows users to interact with a version of the system
before the final product is built.

Techniques:

 Throwaway Prototyping: A prototype is quickly developed and discarded once it serves its
purpose of gathering requirements or testing design ideas.

 Evolutionary Prototyping: A prototype is continuously improved based on feedback until it


eventually becomes the final product.

Use Case:

 Prototyping is useful in projects where requirements are unclear or subject to change, such as
new product development or systems with a high degree of user interaction.

5. Rapid Application Development (RAD)

Overview: Rapid Application Development (RAD) is a design methodology that prioritizes rapid
prototyping, user feedback, and an iterative approach to design. RAD emphasizes short development
cycles to quickly produce functional systems and gather feedback for continuous improvement.

Key Principles:

 Iterative Development: Focuses on delivering working software quickly in short, iterative cycles.

 User Feedback: Regular involvement of users to ensure the system aligns with their needs.

 Minimal Documentation: Reduces the time spent on documentation in favor of rapid


prototyping.

Techniques:

 Prototyping: Rapidly creating prototypes to gather user feedback.

 Time-Boxing: Setting time constraints for each iteration to keep development focused and
efficient.

Use Case:

 RAD is suitable for projects with tight deadlines or evolving requirements, such as small to
medium-sized applications and proof-of-concept development.
6. Model-Driven Design

Overview: Model-Driven Design (MDD) is an approach where models are used as the primary artifact in
the design process. These models describe the system at a higher level of abstraction, and code is
automatically generated or derived from these models. It emphasizes automation, reuse, and model-
based documentation.

Key Principles:

 Modeling First: Focus on building high-level models that describe the system's structure and
behavior.

 Code Generation: Automatically generate code from models, reducing manual coding and
errors.

 Abstraction: Models abstract away implementation details, focusing on what the system does
rather than how it does it.

Techniques:

 Unified Modeling Language (UML): Used to create various models such as class diagrams, state
diagrams, and sequence diagrams.

 Domain-Specific Languages (DSLs): Specialized modeling languages tailored to a particular


problem domain.

Use Case:

 Model-Driven Design is often used in complex, large-scale systems where automation can
significantly speed up the development process, such as in embedded systems or large
enterprise applications.

7. Agile Design

Overview: Agile design emphasizes flexibility, collaboration, and customer-centric development. It


encourages the iterative design of software in small increments, with regular feedback from stakeholders
and frequent releases. The goal is to deliver working software early and often.

Key Principles:

 Incremental Development: Deliver small, functional pieces of the system early and frequently.

 Collaboration: Continuous collaboration between developers and stakeholders.

 Adaptability: Be ready to adjust design decisions based on feedback and changing requirements.

Techniques:

 User Stories: Descriptions of system features from the user’s perspective that guide
development.
 Continuous Integration and Continuous Delivery (CI/CD): Automating the build and deployment
process to frequently deliver software updates.

 Test-Driven Development (TDD): Writing tests before code to ensure that the software meets
requirements.

Use Case:

 Agile design is most suitable for projects where requirements are uncertain or likely to change
over time, such as in startup environments or customer-facing applications.

Conclusion

Design methods in software engineering provide structured approaches to translating requirements into
solutions. Each method has its strengths and is suited to different types of projects. For example,
structured design is ideal for traditional systems with clear specifications, while agile design excels in
environments with evolving requirements and frequent iterations.

Choosing the right design method depends on the project’s nature, complexity, requirements, and
constraints. In practice, software development often involves combining several of these methods to
leverage their strengths in different aspects of the system.

4o mini

You said:

5. Detail discuss and explain three kinds of software Structures with example and diagram

ChatGPT said:

ChatGPT

Three Kinds of Software Structures:

Software structures are the ways in which software systems are organized and how different
components and modules are arranged and interact with each other. These structures play a vital role in
the system’s maintainability, scalability, and overall design. Below are three common kinds of software
structures:

1. Monolithic Structure

2. Layered Structure

3. Client-Server Structure

Let’s discuss each type in detail, along with examples and diagrams.

1. Monolithic Structure
Overview: A monolithic structure is one in which the entire software system is built as a single unit,
meaning all components are interconnected and exist within a single codebase. In this structure, there is
no separation between different system modules. All functions, user interfaces, business logic, and data
access layers are tightly coupled into a single executable or deployment unit.

Key Characteristics:

 Single Codebase: All functionality exists in one unified codebase.

 Tightly Coupled Components: All modules are directly dependent on each other.

 Single Deployment Unit: The entire system is packaged and deployed as a single application.

Advantages:

 Simple to Develop: Easier to implement for small applications with minimal complexity.

 Easy to Test: Testing can be straightforward because everything is integrated.

 Performance: Inter-module communication is faster since everything runs in the same process.

Disadvantages:

 Scalability Issues: As the application grows, scaling becomes difficult.

 Hard to Maintain: Due to tight coupling, making changes in one part of the application may
affect other parts.

 Difficult to Adopt New Technologies: Hard to integrate with newer technologies as the entire
system is interdependent.

Example: A small content management system (CMS) that handles both user registration, blog posts,
and comments as a single unit is a typical example of a monolithic system.

Diagram for Monolithic Structure:

plaintext

Copy code

+--------------------------------------------------+

| Monolithic System |

| +--------------------------------------------+ |

| | User Interface (UI) | |

| +--------------------------------------------+ |

| | Business Logic | |

| +--------------------------------------------+ |

| | Data Access Layer | |


| +--------------------------------------------+ |

| | Database | |

| +--------------------------------------------+ |

+--------------------------------------------------+

In this diagram, the entire system is packaged together, with the UI, business logic, data access, and
database interacting in a single unified codebase.

2. Layered Structure

Overview: A layered structure divides the system into distinct layers, each responsible for a specific set
of tasks. Layers are arranged in a hierarchical order, where each layer depends on the one below it, but
not on the layers above. Common layers include the presentation layer, business logic layer, and data
access layer. This separation helps in organizing the system's functionality and enables modular
development.

Key Characteristics:

 Separation of Concerns: Each layer is responsible for a distinct function (UI, business logic, data
storage, etc.).

 Loose Coupling: Layers interact with each other through well-defined interfaces.

 Hierarchical Structure: Layers are stacked on top of each other, with each layer only
communicating with the layer directly below it.

Advantages:

 Modularity: Easier to maintain and test since each layer is independent.

 Scalability: Easier to scale individual layers, such as the business logic or data storage.

 Flexibility: Can easily swap or upgrade a layer without affecting the rest of the system.

Disadvantages:

 Performance Overhead: Passing data through multiple layers can introduce performance
bottlenecks.

 Complexity in Design: More complex than monolithic systems and requires careful design to
ensure smooth interaction between layers.

Example: An e-commerce application where the user interface (UI) communicates with the business
logic layer for processing orders, and the business logic layer interacts with the data access layer to fetch
product details and process payments.

Diagram for Layered Structure:

plaintext
Copy code

+--------------------------------------+

| Presentation Layer |

| (User Interface, Frontend) |

+--------------------------------------+

| Business Logic Layer |

| (Application Logic, Services) |

+--------------------------------------+

| Data Access Layer |

| (Database, File System, APIs) |

+--------------------------------------+

| Database/Storage |

+--------------------------------------+

In this structure, each layer has a well-defined responsibility and communicates only with the layer
directly adjacent to it.

3. Client-Server Structure

Overview: A client-server structure is a distributed architecture where the system is divided into two
main components: clients and servers. Clients request services, resources, or data from the server,
which processes these requests and sends back the appropriate response. This structure is widely used
in web applications, databases, and networked systems.

Key Characteristics:

 Separation of Roles: Clients are responsible for interacting with users, while servers provide
services and handle business logic.

 Communication via Network: Clients and servers typically communicate over a network, often
using protocols like HTTP, TCP/IP, or WebSockets.

 Scalable and Distributed: Servers can be scaled to handle multiple clients, and new clients can
be easily added without major changes to the server.

Advantages:

 Scalability: Servers can be scaled horizontally to handle more client requests.

 Centralized Management: Centralized control of resources (e.g., databases) makes it easier to


manage and secure data.
 Resource Sharing: Clients can access a wide range of resources provided by the server without
needing to store them locally.

Disadvantages:

 Network Dependency: The system's performance and availability depend heavily on the
network.

 Server Overload: A large number of clients can overload the server if it’s not appropriately
scaled.

Example: A web application where the client (web browser) makes HTTP requests to the server (web
server) to fetch data or interact with the backend services (e.g., login, querying a database).

Diagram for Client-Server Structure:

plaintext

Copy code

+---------------------+ +---------------------+

| Client | <--> | Server |

| (User Interface) | | (Business Logic, |

| (Browser, Mobile) | | Data Access) |

+---------------------+ +---------------------+

+-----------+

| Database |

| (Storage) |

+-----------+

In this structure, clients interact with the server, and the server may access a database or other backend
services to fulfill client requests.

Comparison Between Monolithic, Layered, and Client-Server Structures

Monolithic
Aspect Layered Structure Client-Server Structure
Structure

Single, unified Distributed system (clients and


System Type Multi-layered, modular system
system servers)

Coupling Tightly coupled Loose coupling between layers Loose coupling between clients
Monolithic
Aspect Layered Structure Client-Server Structure
Structure

and servers

Difficult to scale as Easier to scale by adding more Scalable by adding more servers
Scalability
the system grows resources to individual layers or clients

Easier to maintain and update


Hard to maintain as Easier to maintain due to
Maintainability independently for clients or
the system grows modularity of layers
servers

Low flexibility for High flexibility for changing or High flexibility for handling
Flexibility
changes or updates upgrading individual layers client types and server updates

Simple, small Large applications with distinct Web apps, networked


Example Use
applications or responsibilities (e.g., business applications with distinct roles
Case
prototypes logic, UI, data) for clients and servers

Conclusion:

The three software structures — monolithic, layered, and client-server — each serve different purposes
and are appropriate for different scenarios:

1. Monolithic Structure is best for small, simple applications where the entire system can be
managed as a single unit.

2. Layered Structure is ideal for complex applications that require separation of concerns and
modular development, making it easier to maintain and scale.

3. Client-Server Structure is a distributed architecture used in web applications, where clients


interact with centralized servers, enabling scalable and manageable systems.

Understanding these structures helps in selecting the appropriate architecture for your software
depending on the scale, complexity, and requirements of the project.

//////////////////////////////////////////////////////////////////////////

1. Given the following quality scenario  If the bus subsystem stops transmitting its location for any
reason (processor crashes, GPS receiver stops working, transmitter stops working) during peak
traffic hours, then the displays should show the scheduled arrival time for that bus. This will
continue until the bus returns to its base, whereupon the subsystem should be fixed within 30
minutes. A. Which quality attribute is described in the scenario? B. Restate the quality attribute
requirement as a quality attribute scenario in the form of quality-attribute-specific tables C.
Which tactic applicable/use is described in the scenario?
BLACKBOXAI

A. Quality Attribute Described

The quality attribute described in the scenario is Availability. This is evident from the requirement that
the bus subsystem should continue to provide information (scheduled arrival time) even when it stops
transmitting its location due to various failures. Additionally, the requirement for the subsystem to be
fixed within a specific time frame (30 minutes) further emphasizes the importance of maintaining
availability.

B. Quality Attribute Scenario

Here is the quality attribute scenario restated in a structured format:

| Attribute | Description |
|--------------------|---------------------------------------------------------------------------------| | Source | Bus
subsystem | | Stimulus | The bus subsystem stops transmitting its location (due to processor crash, GPS
failure, or transmitter failure) during peak traffic hours. | | Environment | During peak traffic hours |
| Artifact | Bus location transmission subsystem | | Response | The displays show the scheduled arrival
time for that bus. | | Response Measure | The display continues to show the scheduled arrival time until
the bus returns to its base, and the subsystem is fixed within 30 minutes. |

C. Applicable Tactic

The tactic applicable in this scenario is Failover. This tactic involves providing an alternative method of
operation when a primary system fails. In this case, when the bus subsystem fails to transmit its location,
the system falls back to showing the scheduled arrival time, ensuring that users still receive relevant
information. Additionally, the requirement for the subsystem to be fixed within 30 minutes suggests a
focus on Recovery tactics, ensuring that the system can return to normal operation promptly after a
failure.

2. List and explain Static vs. Dynamic design models?

BLACKBOXAI

Static and dynamic design models are two fundamental approaches used in software design and
architecture to represent different aspects of a system. Here’s a breakdown of each:

Static Design Models

Definition: Static design models represent the structure of a system at a specific point in time. They
focus on the organization of the system's components and their relationships without considering the
behavior of the system over time.
Characteristics:

 Structure-Oriented: Static models emphasize the organization of the system, including classes,
objects, components, and their relationships.

 No Time Dependency: They do not account for the dynamic behavior or state changes of the
system during execution.

 Documentation: Often used for documentation purposes, providing a clear view of the system
architecture and design.

 Examples:

 Class Diagrams: Show the classes in a system and their relationships (inheritance,
associations, etc.).

 Component Diagrams: Illustrate the components of a system and their interactions.

 Deployment Diagrams: Represent the physical deployment of artifacts on nodes.

Use Cases:

 Useful in the early stages of design to establish a clear understanding of the system's
architecture.

 Helpful for code generation and understanding the relationships between different parts of the
system.

Dynamic Design Models

Definition: Dynamic design models represent the behavior of a system over time. They focus on how the
system operates, including the interactions between components and the changes in state that occur
during execution.

Characteristics:

 Behavior-Oriented: Dynamic models emphasize the interactions and behaviors of the system
components as they execute.

 Time Dependency: They account for the sequence of events, state changes, and the flow of
control within the system.

 Examples:

 Sequence Diagrams: Show how objects interact in a particular scenario of a use case,
detailing the order of messages exchanged.

 State Diagrams: Represent the states of an object and the transitions between those
states based on events.

 Activity Diagrams: Illustrate the flow of control or data in a system, showing the
sequence of activities.
Use Cases:

 Useful for understanding how the system will behave in response to various inputs and events.

 Helpful in identifying potential issues related to concurrency, timing, and state management.

Summary

In summary, static design models provide a snapshot of the system's structure, while dynamic design
models illustrate how that structure behaves over time. Both types of models are essential in software
design, as they complement each other by providing a comprehensive view of the system's architecture
and behavior. Static models help in understanding the organization and relationships, while dynamic
models help in understanding the interactions and state changes that occur during execution.

3. Explain software architecture pattern and software design pattern with proper diagram and
scenarios, difference and example?

BLACKBOXAI

Software architecture patterns and software design patterns are both essential concepts in software
engineering, but they serve different purposes and operate at different levels of abstraction. Below is an
explanation of each, along with diagrams, scenarios, differences, and examples.

Software Architecture Pattern

Definition: A software architecture pattern is a high-level solution to a recurring design problem in


software architecture. It defines the overall structure of a software system, including its components,
their relationships, and the principles guiding their design and organization.

Characteristics:

 Focuses on the system as a whole.

 Addresses large-scale concerns such as scalability, performance, and maintainability.

 Provides a blueprint for the system's structure.

Common Examples:

1. Layered Architecture: Divides the system into layers, each with specific responsibilities (e.g.,
presentation, business logic, data access).

2. Microservices Architecture: Structures the application as a collection of loosely coupled


services, each responsible for a specific business capability.

3. Event-Driven Architecture: Uses events to trigger and communicate between decoupled


services or components.
Diagram: Layered Architecture Example

VerifyOpen In EditorRunCopy code

1+---------------------+

2| Presentation Layer |

3+---------------------+

4| Business Logic |

5+---------------------+

6| Data Access Layer |

7+---------------------+

8| Database |

9+---------------------+

Scenario: In a web application, the layered architecture pattern can be used to separate concerns. The
presentation layer handles user interactions, the business logic layer processes data and applies business
rules, and the data access layer interacts with the database.

Software Design Pattern

Definition: A software design pattern is a general reusable solution to a commonly occurring problem in
software design. It provides a template for how to solve a problem in a way that can be reused in
different contexts.

Characteristics:

 Focuses on specific components or classes.

 Addresses design-level concerns such as object creation, composition, and interaction.

 Provides a proven solution to a specific problem.

Common Examples:

1. Singleton Pattern: Ensures a class has only one instance and provides a global point of access to
it.

2. Observer Pattern: Defines a one-to-many dependency between objects so that when one object
changes state, all its dependents are notified.

3. Factory Pattern: Provides an interface for creating objects in a superclass but allows subclasses
to alter the type of created objects.

Diagram: Observer Pattern Example


VerifyOpen In EditorRunCopy code

1+-----------------+

2| Subject |

3|-----------------|

4| + attach() |

5| + detach() |

6| + notify() |

7+-----------------+

8 |

9 |

10 |

11+-----------------+

12| Observer |

13|-----------------|

14| + update() |

15+-----------------+

Scenario: In a stock market application, the observer pattern can be used where the stock price (subject)
notifies multiple investors (observers) whenever there is a change in price.

Differences Between Software Architecture Patterns and Software Design Patterns

| Aspect | Software Architecture Pattern | Software Design Pattern |


|---------------------------|--------------------------------------------------|-------------------------------------------------|
| Level of Abstraction | High-level (system-wide) | Low-level (component or class level) | | Focus |
Overall structure and organization of the system | Specific design issues and interactions | | Scope |
Addresses large-scale concerns (e.g., scalability, performance) | Addresses specific design problems (e.g.,
object creation, behavior) | | Examples | Layered Architecture, Microservices, Event-Driven | Singleton,
Observer, Factory |

Summary

In summary, software architecture patterns provide a high-level framework for structuring an entire
system, while software design patterns offer specific solutions to common design problems within that
framework. Both are crucial for creating robust, maintainable, and scalable software systems.
Understanding the distinction between the two helps software engineers choose the right approach for
their specific needs.
Software Architectural Patterns in System Design

Last Updated : 11 Nov, 2024

Design patterns and architectural styles play a crucial role in shaping the structure and behavior of
software systems. Let's explore several architectural patterns and styles, each with its characteristics and
suitable diagrams.

Table of Content

 Layered Architecture (N-Tier Architecture)

 Microservices Architecture

 Service-Oriented Architecture (SOA)

 Event-Driven Architecture (EDA)

 Hexagonal Architecture (Ports and Adapters)

 Component-Based Architecture

 Blackboard Architecture

 CQRS (Command Query Responsibility Segregation)

 Serverless architecture

 Circuit Breaker Pattern

 Model-view-controller pattern

1. Layered Architecture (N-Tier Architecture)

Layered Architecture (N-Tier Architecture) is a software design pattern that structures an application into
multiple distinct layers, each responsible for specific tasks or concerns. This approach helps in separating
different aspects of the application into modular, manageable, and reusable components. Each layer
interacts with the one directly above or below it, but layers typically don’t interact with each other
directly, promoting a clear separation of concerns.
Layered Architecture

 Presentation Layer (UI) : This is where the user interacts with the application. It handles user
input and displays information.

 Application Layer (Business Logic) : This layer contains the core logic of the application, such as
processing user requests and managing business rules.
 Data Access Layer (Database) :Data is retrieved and stored. It interacts with the database,
ensuring separation of data concerns.

For Example: In an online e-commerce application, the presentation layer handles user interaction, the
business logic layer processes orders and payments, and the data access layer manages database
interactions. This separation allows for clear responsibilities and easier maintenance.

This separation of concerns makes the system modular and easier to maintain.

2. Microservices Architecture

Microservices Architecture is a software architectural style where an application is structured as a


collection of small, independent services, each focused on a specific business function. These services
are loosely coupled, meaning they can be developed, deployed, and scaled independently of one
another.

For Example: A e-commerce store platform may have separate microservices for account service,
inventory service and shipping service. Each service is independently deployable and communicates via
APIs, allowing for scalability and flexibility.

3. Service-Oriented Architecture (SOA)

Service-Oriented Architecture (SOA) is an architectural pattern where an application is designed as a


collection of loosely coupled, reusable services that communicate with each other over a network. Each
service in an SOA performs a specific business function or operation and can be accessed by other
services or external clients. Benefits of SOA include:
 Services are modular and can be developed, updated, and maintained independently.

 You can combine existing services to create new applications, improving time-to-market and
reducing development costs.

 SOA allows systems using different technologies or platforms to work together through
standardized communication.
Service-Oriented Architecture (SOA)

For Example: A healthcare system uses SOA where services like patient management, appointment
scheduling, and billing are designed as independent services. Each service communicates over a network
to provide a unified experience, often using SOAP or RESTful web services.

4. Event-Driven Architecture (EDA)


Event-Driven Architecture (EDA) is a software design pattern where the flow of a system is driven by
events. An event represents a change in state or an occurrence that other parts of the system can react
to. In this architecture, components communicate by producing and consuming events, allowing them to
act independently and asynchronously. This makes the system more flexible, scalable, and responsive to
real-time actions.
For Example: In a stock trading application, when a user places an order, an event is generated. This
event triggers other processes such as price updates, notifications, and transaction validation, allowing
the system to respond asynchronously to user actions.

5. Hexagonal Architecture (Ports and Adapters)

The Ports and Adapters pattern, another name for Hexagonal Architecture, is a software design
methodology that seeks to provide loosely linked application components. Isolating an application's
essential logic (the "inside") from external systems or interfaces (the "outside") is the idea. This is
accomplished by drawing distinct lines between the main logic of the application and the external
systems—like databases, web services, user interfaces, or messaging systems—that communicate with
it.

For Example: A payment gateway uses hexagonal architecture where the core logic (payment
processing) remains independent of external systems like databases, UI, or third-party services. These
external systems interact with the core through specific adapters (e.g., REST API, database access).

6. Component-Based Architecture

According to the architectural design pattern known as "component-based architecture," an application


is constructed by putting together separate, reusable parts that each contain a particular purpose. Every
component is an independent unit that carries out a specific function and provides an open interface for
communication. Because these parts can be created, tested, and implemented separately, the system
becomes more adaptable, scalable, and modular.
For Example: In a web application, reusable components like a login form, navigation bar, and product
listing are created independently and combined to form the UI. Each component encapsulates specific
functionality and can be reused across different pages.

7. Blackboard Architecture

A software design pattern known as "Blackboard Architecture" involves several components (sometimes
referred to as "knowledge sources") working together to solve a complex problem by progressively
improving a shared data structure termed the "blackboard." While several components (or modules)
contribute their knowledge and procedures to alter or improve the answer, the blackboard serves as a
common repository for interim findings.
Blackboard Architecture

For Example: In a medical diagnosis system, different modules (e.g., symptom analysis, patient history,
and lab tests) analyze data and contribute to a shared blackboard. As new information is added, other
components update the shared knowledge to refine the diagnosis.

8. CQRS (Command Query Responsibility Segregation)


Common Querry Responsibility Segregation, or CQRS, is a design pattern that divides the task of
managing commands and inquiries among several components. Separating the methods for reading and
publishing data is the primary goal of the CQRS architectural pattern. It separates the read and update
operations on a datastore into two separate models: Queries and Commands, respectively.

For Example: In an online shopping app, Commands like placing an order are processed and stored in
one model (write model), while Queries to fetch order details or product listings are handled by a
separate read model, optimizing performance and scalability.

9. Serverless architecture

Developers can create and execute apps using serverless architecture, a cloud computing design style,
without having to worry about maintaining the supporting infrastructure. According to this paradigm,
server administration, scaling, and resource allocation are automatically handled by cloud providers (like
AWS, Azure, or Google Cloud). Developers just concentrate on writing code and designing functions that
are run in response to events, rather than deploying and maintaining servers.

For Example: In a serverless web application, user profile data is processed by cloud functions. Instead of
managing servers, developers write functions that execute in response to events (e.g., an HTTP request)
and scale automatically with demand, reducing overhead and cost.

10. Circuit Breaker Pattern

The Circuit Breaker Pattern is a software design pattern that helps prevent cascading failures in
distributed systems. It monitors the health of a service, and if failures reach a certain threshold, it "trips"
the circuit, stopping requests to the failing service. This prevents the system from overloading the
service with more requests, giving it time to recover.

For Example:
 Just like an electrical circuit breaker, when an issue is detected, the circuit "opens" to stop the
flow of requests.

 After a set time, the circuit "closes" again if the service is healthy. This allows the system to fail
gracefully and recover without spreading the failure to other parts of the system.

11. Model-view-controller pattern

The Model-View-Controller (MVC) pattern is a software architectural design that separates an


application into three interconnected components: Model, View, and Controller. This separation helps
organize code by decoupling the business logic, user interface, and user input handling, which promotes
modularity, maintainability, and scalability.

 Model: Represents the core data and business logic of the application. It is responsible for
retrieving, storing, and processing data, and updating the View when data changes.

 View: The user interface (UI) component that displays the data to the user and responds to user
interactions. The View is updated whenever the Model changes.

 Controller: Acts as an intermediary between the Model and the View. It handles user input,
updates the Model accordingly, and updates the View to reflect any changes in the Model.

Conclusion

These architectural patterns and styles provide a framework for designing and building robust, scalable,
and maintainable software systems. The choice of architecture depends on the specific requirements
and constraints of your project. Each of these patterns comes with its own advantages and trade-offs, so
it's important to select the one that best fits your needs.

4. Write about design methods in detail?

BLACKBOXAI

Design methods in software engineering refer to structured approaches and techniques used to create
software designs that meet specified requirements. These methods help in organizing thoughts, ensuring
consistency, and facilitating communication among stakeholders. Below, we will explore various design
methods in detail, including their characteristics, advantages, and typical use cases.

1. Structured Design

Overview: Structured design is a method that emphasizes a top-down approach to software


development. It breaks down a system into smaller, manageable components or modules, which can be
developed and tested independently.

Characteristics:

 Hierarchical Decomposition: The system is decomposed into smaller modules, each with a
specific function.

 Data Flow Diagrams (DFDs): Used to represent the flow of data within the system.

 Modularity: Promotes the creation of modules that can be reused in different parts of the
system.

Advantages:

 Easier to understand and manage due to modularity.

 Facilitates parallel development, as different teams can work on different modules.

 Enhances maintainability and scalability.

Use Cases: Suitable for large systems where clear structure and modularity are essential, such as
enterprise applications.

2. Object-Oriented Design (OOD)

Overview: Object-oriented design is a method that uses the principles of object-oriented programming
(OOP) to design software. It focuses on defining objects that represent real-world entities and their
interactions.

Characteristics:
 Encapsulation: Bundles data and methods that operate on the data within objects.

 Inheritance: Allows new classes to inherit properties and behaviors from existing classes.

 Polymorphism: Enables objects to be treated as instances of their parent class, allowing for
flexible and reusable code.

Advantages:

 Promotes code reuse through inheritance and polymorphism.

 Enhances maintainability by encapsulating behavior and state within objects.

 Facilitates modeling of complex systems through real-world analogies.

Use Cases: Commonly used in applications that require complex data modeling, such as graphical user
interfaces (GUIs) and simulation systems.

3. Component-Based Design

Overview: Component-based design focuses on building software systems using reusable components.
Each component is a self-contained unit that provides specific functionality and can be independently
developed and deployed.

Characteristics:

 Reusability: Components can be reused across different applications.

 Interoperability: Components can interact with each other through well-defined interfaces.

 Encapsulation: Each component encapsulates its internal implementation details.

Advantages:

 Reduces development time and costs by reusing existing components.

 Enhances system flexibility and scalability.

 Simplifies maintenance, as components can be updated independently.

Use Cases: Ideal for large-scale systems, such as enterprise applications and web services, where
different teams can work on different components.

4. Agile Design

Overview: Agile design is a flexible and iterative approach to software design that emphasizes
collaboration, customer feedback, and rapid delivery of functional software. It is often used in
conjunction with agile development methodologies like Scrum or Kanban.

Characteristics:

 Iterative Development: Designs are developed in small increments, allowing for continuous
improvement.

 Collaboration: Encourages close collaboration between developers, designers, and stakeholders.


 User -Centric: Focuses on delivering value to users through regular feedback and adjustments.

Advantages:

 Adapts quickly to changing requirements and priorities.

 Increases stakeholder engagement and satisfaction through regular feedback.

 Reduces risks by delivering functional software early and often.

Use Cases: Suitable for projects with rapidly changing requirements, such as startups and innovative
software products.

5. Model-Driven Design

Overview: Model-driven design emphasizes the use of models to represent various aspects of the
system. These models can be used to generate code, documentation, and other artifacts.

Characteristics:

 Abstraction: Models abstract the complexities of the system, making it easier to understand and
communicate.

 Code Generation: Tools can automatically generate code from models, reducing manual coding
efforts.

 Consistency: Ensures consistency across different parts of the system by using a common model.

Advantages:

 Speeds up the development process through automation.

 Enhances communication among stakeholders by providing visual representations.

 Reduces errors by ensuring that the generated code aligns with the model.

Use Cases: Commonly used in systems where formal specifications are required, such as safety-critical
systems and large enterprise applications.

Conclusion

Design methods play a crucial role in the software development process by providing structured
approaches to creating software designs. Each method has its strengths and weaknesses, making them
suitable for different types of projects and organizational contexts. By understanding these design
methods, software engineers can choose the most appropriate approach for their specific needs, leading
to more effective and efficient software development.

Chapter 4. Introducing The Design Method

The Design Method is a framework you can implement in every design project to achieve appropriate
results. This blueprint helps you gain understanding, craft a plan, develop ideas, and ultimately produce
and apply them.
Presenting The Design Method

The Design Method is a philosophy and approach that lends clarity to and facilitates your work. It helps
you understand the situation and problem, and then allows you to determine what the design solution
needs to do. The method walks you through an increasingly detailed series of stages. This top-down
approach prevents fumbling around with styles, instead enabling you to shape your choices around what
your design and client actually need.

Many design process philosophies exist. Some are rigidly structured and driven by rationalism; others
take a more emotional approach and favor improvisation. Some rely heavily on observation; others
encourage an approach in which designers and users collaborate closely. Some divide the process into
seven stages; others pick six, and still others three—heck, I think they come in all sizes. In fact, crafty
agencies treat the design process as a marketing gimmick and put great effort into creating proprietary
names and pretty flowcharts illustrating how their “unique” process works. (You can likely imagine what I
think of this last practice.)

It’s hard to say that any one process is better than the rest. Each has a place for some client, designer,
situation, or discipline. The important point is that you employ a process that suits you and your clients,
and work it consistently instead of just winging it and doing what feels good at the time. (I did that once,
and as a consequence, I now have a tattoo of Selena Gomez and a puppy on my left thigh.) If you help
clients communicate messages, ideas, values, and the like, you’ll find The Design Method to be
particularly suitable to your needs.

The Design Method shares similarities with other processes, although it’s also different in many ways. It’s
rational and ordered, overwhelmingly straightforward and logical, but it also involves using your
intuition. It requires an involved dialogue with clients; however, it doesn’t ask them to perform tasks
they are neither trained nor equipped for. It doesn’t assume that the initial specifications are the right
ones; instead, it begins with research, observation, and questioning in order to evaluate what
deliverables are most suitable. The method is rooted in how a studio works, not isolated theory. The
result is process stages and approaches that work better in practice than in a textbook. You’ll find that
this applied view shapes the process stages, recommendations for work habits and practices, and the
language I use to describe this method.

The particular slant of The Design Method is informed by a communication design standpoint. The
reason I mention this point is that some of the approaches used in product design, for example, aren’t
directly transferrable to what brand, graphic, and communication designers do. Communication is key to
our work at smashLAB regardless of the form it takes. We might build a visual system, website, content
strategy, application, or signage system; in each case, we are helping to create or facilitate
communication.

Certain design approaches are sensible on paper but difficult to incorporate in actual practice. The
Design Method is applied and works well for designers who need to solve often ill-defined visual
communication problems. In fact, this method has evolved at our agency over nearly 15 years of daily
practice. We’ve experimented with several approaches in the past and learned from each of these tests,
adding what worked to our process. We didn’t come by these learnings easily: By taking so much time to
sort out this method, our agency has become increasingly productive and successful—more than that,
our clients get effective work because of this approach.
To apply this design methodology, you must agree to follow the stages laid out later in this chapter. Don’t
try to skip a step, get fancy, or make your process any harder than it needs to be. Just follow the process
as intended; I promise this approach won’t lead you astray. Every day I apply this method, and it
continues to delight me. Although The Design Method may seem, and actually is, deceptively simple, it
has never failed me when I followed its well-ordered steps.

The Fundamental Stages of The Design Method

Most design processes share a number of common stages and tasks. In The Design Method, all activities
are organized into four broad stages, which I’ll outline in a moment. These stages are defined quite
generally so you can grasp the core activities, and then shape presentation and details according to your
specific needs. You’ll determine your own working phases and create corresponding documentation
based on these steps. You might also develop small leave-behinds, booklets, diagrams, visualizations,
videos, or slide decks that help your clients understand the way you’ll work with them.

Some methods have organized their work into a few broad stages, such as Reflect, Observe, Make, and
then Repeat. Others seem to like alliteration, and use the groupings Define, Design, Develop, and Deploy.
Still others sound more scientific, starting with Discovery, and moving
into Interpretation, Ideation, Experimentation, and Evolution. Regardless of how you present your
process to clients, odds are that you’ll be working through a few common stages. The Design Method is
based on these stages, which from here on become this book’s area of focus. They include the following:

1. Discovery. Gathering data and becoming familiar with the situation through observation and analysis.

2. Planning. Identifying key needs and issues, and developing a strategy and actionable plan to address
these concerns.

3. Creative. Exploring conceptual options and potential design directions, and organizing these
possibilities into a clear vision.

4. Application. Implementing the approach and building out design elements along with testing,
measurement, evaluation, and refinement.

The point of identifying these fundamental stages, and working within them, is to lend structure to your
design process. But in actuality, these stages sometimes bleed into one another. Although Discovery
starts the process, you never stop learning about your clients and their needs. Planning, too, is most
exhaustive at the beginning of projects, but you’ll continue to plan smaller points throughout your
project. The Creative and Application stages involve a cyclical set of tasks: You’ll hatch ideas, develop
prototypes, run iterations, test your approach, and refine your design. Following these stages will help
you mitigate whims that would otherwise leave you bouncing through projects at random.

Although the overlapping aspects of these stages may turn out to be murkier than you like, design isn’t
that absolutely segmented. This lack of clarity has become even more prevalent in recent years and
relates, in part, to how many design projects are now digital in nature. A digital setting allows you to
assess results, adjust, and redeploy more rapidly and inexpensively than other settings in which
changing and redeploying items increases time and cost. The management of American Airlines, for
example, probably wouldn’t be keen to change its identity a week after launching its redesign. After
applying the new visuals to all of its airplanes and branded materials, such a task would be substantial
regardless of how the new treatments were received.

The Design Method relies on four key process stages; however, the working phases you employ are
informed by the kind of design you do and the project milestones you establish.

You’ll likely personalize the language you use to describe your working process and how you segment
your work modes. That’s fine. Part of doing so will involve the kind of design you perform for your
clients. Additionally, you may find it useful to determine the actual working phases, or service items,
your projects require. Doing so will help you add detail to how you estimate, schedule, bill, and manage
projects. You’ll have to do this on your own because no one else knows the size, type, or scope of
projects you work on.

At smashLAB, we generally break down our working phases into: Discovery and Planning, Information
Architecture and User Experience, Creative and Production, Technology, Content, and Deployment. The
phases we use make provisions for interaction design projects and content creation, because they are a
big part of what we do for our clients. Again, these working phases are more specific than the process
stages described in The Design Method. Process stages and working phases are different in that the
former identify broad actions, whereas the latter are used to estimate project requirements and
correspond with billable service items in our time tracking.

For most designers, crafting visuals feels more like design than knowledge gathering does; therefore, you
might be inclined to jump right to the Creative stage. Doing so is akin to renting office space before
you’ve written a business plan—not a particularly wise decision. Once again, you need to understand the
project situation and determine a sensible course of action. The Discovery and Planning tasks deserve
your sweat first. Having worked through these stages, you can then move into Creative and Application,
knowing that you’ve taken the right steps. For years, I made design the wrong way. To help you avoid the
same mistakes, let me tell you why I did and how I remedied my clumsy ways.

How The Design Method Came to Be


This book and method directly stem from my ignorance and need to find a more sensible way to create
design. Like many designers, my career didn’t follow the standard path of design school, interning, and
finally becoming a designer under the tutelage of more senior designers and art directors. Instead, I
studied painting in art school and did production for a newspaper. These visual language and technical
capabilities provided a starting point to begin my career as a designer. The part I was missing was
the how and why of design.

Like me in my earlier days, many designers just want to make innovative work and challenge design
conventions, especially when they are new to the craft. I shirked the task of doing research and
documenting my findings; all I wanted to do was to pull out my markers and play with ideas. My early
forays into design suffered from this blind enthusiasm. Eventually, I started to ask what my design
needed to accomplish. The more often I started a project with this question and answered it in a clear
fashion, the better the response I would get from clients and audiences. The design solutions that got
the most praise were often the most plain and obvious.

The Design Method was born from experience. The observations that shaped this approach came from
opening a studio we had hardly any right to run and learning about design in a hands-on fashion. The
questions we faced ranged from how to determine what steps to take in our projects to the best way to
version a file. The method we used became stronger with each varied job our agency faced. Through
these projects we learned to recognize patterns in the work we did and determine which aspects of our
process might be repeatable in future work. Similarly, we knew we could gain efficiencies by
standardizing project phases and tasks.

In our first approach we itemized every project step and created detailed task lists. This act helped us
identify stages in our workflow, but adhering to these lists became unwieldy. Being so granular meant
that every job needed its own set of tasks, which often numbered in the many hundreds. On projects
with overlapping deliverables (like a website and a corporate identity), the task lists didn’t transfer well.
Worse yet, they were so inconvenient to keep on top of that they interfered with our work.

Later, we sought technologies that would help us better organize our methods, but software fell short as
well. After spending many weeks looking for software that would magically solve our problems, we
realized that a GANTT chart creator, a task manager, or a collaboration tool could not accomplish so
much. Although many good technologies exist, these tools need to support a well-defined process—not
take its place.

For a long time we didn’t believe we even had a stable process, given how we’d adhere to an approach
for a while and later encounter its limitations. But after we began incorporating certain techniques, these
methods clicked together in our studio and produced the results we had hoped for. There’s an irony of
sorts in how much our agency utilizes (and espouses) methodology now, given the organic and rather
cumbersome path we took in developing it.

We’ve now earned an applied sense for how to effectively create design. Between analysis and hands-on
learning, we’ve established a series of rules and systems that work quite well—particularly for those who
are asked to design items that may still be undefined. One of the core notions that allow The Design
Method to work is to employ a singular approach, which we affectionately call the funnel.

The Method as a Funnel


When you think of The Design Method, picture a funnel. This device helps you move your design in one
direction and continually refine your actions. Many requirements, questions, and possibilities go into the
funnel at the beginning, but these must narrow and keep you moving toward a single trajectory. This
perspective runs contrary to the way many designers treat the design process. They tend to confuse
creativity as a fragmented, tangential venture in which the number of options presented is congruous
with the quality of service afforded.

Many people see design and creative work as a tangential process; I prefer to think about my work as
though it’s running through a funnel—always getting narrower and clearer.

Those who want to deliver good design efficiently need to regard the whole process of design differently.
You can’t consider wayward tangents and the creation of dead ends to be of any value to your clients.
Instead, you must understand that you need to identify a target. Yes, getting there will require
experiments, but these need to be directed—not just random creative dalliances. You should also
recognize that you can only reach that target by controlling your impulses, concentrating on an end goal,
and narrowing your options to make them more manageable.

The Design Method is a process of refinement in which you sort out the big issues first and move on to
smaller components. A comparable scenario would be choosing a place to stay on vacation. Before you’d
book a hotel, you’d start by determining your destination, what you wanted to do there, and the dates
for your travel. Then you’d choose the most important attributes for a hotel (e.g., budget, quality,
location, amenities) and narrow your search appropriately.

Although the hotel analogy might seem a tad pedestrian, the comparison is useful when you consider
the way some create design. Many start by weighing every possibility available, and even act on some of
these impulses, without taking time to determine whether these possibilities deserve consideration.
These alternatives might prove interesting and entertaining, but they waste time. Given how labor-
intensive design is, such indulgences soon prove costly and are best avoided. The tough part is trying to
break your clients of their deadly “three options” habit and instead funneling all your effort into a single
approach.

We meet with designers and studio leads on a regular basis, and it continues to baffle us that many—if
not all—still present three different design options for every project. They all acknowledge that doing so
is foolish and hate having to work this way, but oddly enough, few designers seem willing to try another
way. The three option approach is akin to asking a chef to present three meals, scrutinizing them at
length, and then chucking each item on a plate and mixing them together into one big mess. This is
madness—madness I tell you! Nevertheless, designers seem powerless to break from this tradition.

How did we abolish this pointless habit at smashLAB? We logically explained our “one concept
approach” to prospective clients, presented it as a benefit—which it is—and used it as a point of
differentiation. “Why hire a studio that squanders your funds by creating options you’ll never use
anyway?” Let me elaborate on how concentrating on one concept produced by utilizing the funnel
approach can save you time, more wisely allocate your clients’ money, and reduce aggravation for all
involved.

Only One Concept (or Design Direction)

The most visible aspect of the funnel, in practice, is in providing one—not three—concepts for your
clients. This is a central principle of The Design Method. You complete Discovery, develop a sensible plan,
and then present a single design direction. This path will then be either vetoed or refined, but you will
not force your clients to evaluate multiple approaches while hoping for the best. Such requests are not
fair to your clients—in spite of how desperately they may beg for more options. Working in such an
inefficient manner is outright unethical.

It’s important that you strengthen your understanding of—and belief in—this singular approach to
creative concepts and design direction. Most clients worry that without alternatives they’ll miss out on
opportunities. They think that having three different flavors of a design will help them pinpoint the one
that’s right for them. Although the desire for many options is completely understandable, this perceived
need results in a flawed means of producing workable design. You need to prepare them to understand
the pitfalls of this outdated and costly practice.

The challenge of showing more than one concept or design direction at a time is that the multitude of
options makes it difficult to weigh the merits of each solution. Viewers tend to confuse each option as
part of a whole and lump their observations together. Compromising objectivity in this way makes the
collection, and parsing, of feedback on individual directions difficult because all opinions become
combined. This often leads clients to think they can have the best of all options by just picking aspects of
each direction and merging them into one “super-design.” (We call this Frankensteining, and I’ve never
seen it work out favorably.)

Additionally, it’s your job as a designer to edit options to those most viable for your clients and their
audiences. Designers shirk their duties when they make clients answer questions about design direction
—particularly given that most clients aren’t equipped to anticipate the potential limitations of certain
approaches. Will they know that the laser-cut card option comes with a prohibitively high print cost? Do
they appreciate that the complex logo won’t reproduce at small sizes? Are they supposed to implicitly
know that using many custom fonts in a website will affect the load time? You are the one who needs to
identify issues and help your clients avoid such pitfalls.

Another problem involves the necessary requirements to present three viable options for more complex
design projects. Consider websites: They are layered, dimensional settings that take time to produce.
Creating three variations for a website compels you to either split a limited number of hours three ways,
diluting each option, or create one viable option and then apply some peripheral changes to create two
more—often trivial—variations. Neither is a workable option, so you’re forced to either triple the design
budget or work at one-third of your billable rate (which aren’t great options either).

Of course, providing only one option becomes more or less relevant depending on the effort required to
produce a prototype fit for your client’s consideration. For example, showing a few logo variations at one
time isn’t difficult—even though doing so might bewilder your client. On the other hand, presenting a
few website or identity options at one sitting is less practical, simply given the onerous amount of time
required to properly consider and develop such items.

More on how to present your work is discussed in Chapter 9, “Presenting Work to Clients.” For now, just
know that The Design Method is built around supplying one concept or approach. For some, this
viewpoint will prove a more substantial hurdle than for others. However, you can probably appreciate
how much more sensible it is to create and refine one option than it is to create three options and make
your client determine which functions best. Clearly, this part of the process will make some
uncomfortable; don’t let how unfamiliar it is stop you from experiencing its benefits.

How many targets can you hit at one time? Precisely. So, I stop aiming for three and instead concentrate
on just one. Believe me—that’s hard enough.

The Design Method Works

You may disagree with the approach presented in this book. That’s OK, and you probably aren’t alone.
I’ve talked about the same ideas with some who passionately tell me that this approach is too dogmatic
and simply can’t work. But because I’ve approached design in various ways over the years, I can honestly
tell you how well a singular, knowledge-led, systems-based approach works. This method allows you to
pinpoint the direction you need to take your client, identify the sequence in which you produce items,
and outline a way to replicate these steps on future projects.

Clarity is a rare treat in an industry in which each project is so different from the next. By establishing
one trajectory, you can concentrate on what you need to achieve; therefore, you are better equipped to
make workable design. The Design Method forces you to ask good questions at appropriate times. When
you adhere to this approach, a set of checks and balances emerges, and helps focus your efforts on the
items and considerations that matter most.

An additional benefit of implementing The Design Method is that your business can gain operational
efficiencies. Following this method allows you to better organize resources and staff. It enables you to
create standardized documentation and repurpose these templates. Additionally, you’ll begin to realize a
natural project flow by adopting these organized steps. Not only do you need to create effective design,
you need to produce work in an ordered and predictable fashion. Part of this cogent approach involves
presenting your reasoning to clients in a manner that’s clear, accurate, and organized.

Providing personalized guidance and clear documentation to your clients affords them a more pleasant
and consistent experience—don’t underestimate the importance of this level of service! You can make
the greatest design and still fail if your clients feel ignored, poorly supported, or don’t understand what
you’re proposing. Consider the customer experience your clients receive when they work with you.
Many designers fail to do so and think the design product is the only part that matters. The way your
customers feel about their time with you is pivotal in ensuring your studio’s economic viability and
survival.

Each time you run the process, you’ll learn what works and what doesn’t, retool your steps and refine
your working methods, and improve the output of your work. This continual refinement will strengthen
your studio and the relationships of those working within it. Finding ways to make better design and
communication is what this process is all about.

Additionally, The Design Method is so darned sensible that once you fully implement it, you won’t be
able to revert to your old ways of working. Designers bring order to the projects they’re tasked with and
the people they help, but many mistakenly believe they can achieve such order through slipshod
practices and a lack of process. You know better. And by applying this kind of rigor in your process and
actions, you become part of the maturation of design from a pursuit confused for being solely about
decoration to one prized for its practitioners’ ability to resolve complex problems in many different
settings.

Design Methodology in Increasingly Varied Settings

Design-centric approaches are being applied to global-scale problems. You find evidence in the
substantial coverage business publications give to the greater possibilities in design and how “design
thinking” has become a popular term among many who have never even stepped foot in a design studio.
The challenges society faces are becoming progressively vast: resource concerns, social issues, and the
threats of climate change, to name a few.

You are tapped to help with these bigger challenges because the way designers think is so unique. You
are given an incomplete set of information and are then tasked to build something that may still be
undefined. You need to conduct research, ask questions, and probe for insight in settings you’re
unfamiliar with. Thereafter, you form a hypothesis, prototype options, and test them without necessarily
knowing how success will be measured.

As a result of all the variability, the possibility of a simple cookie-cutter solution for all problems becomes
less workable. For this reason good design methodology needs to be adaptive. It can’t falter in the face
of these diverse challenges; instead, the process needs to be resilient enough to adapt as parameters
change.
The One Laptop per Child program—from infrastructure to hardware—proves a delightful example of
what impacts can be made by applying design thinking to massive challenges.

The advantage of knowing how to approach and solve vague problems is that other new challenges
become less bewildering. In fact, I’ve used The Design Method approach to design the interior of my
home (and I am certainly no interior designer), inform the position of organizations, and even write this
book. Actually, the method presented in this book is ideal for structuring a lengthy document. In effect,
you can use The Design Method to help you make sense of many big problems you face in countless
situations.

Up Next

The first step in The Design Method is Discovery, which focuses on gaining understanding of the situation
you’re designing for. In the next chapter, I’ll explain why achieving this insight is so important and detail
how to ask questions and get the information you need to create a sensible plan.

5. Detail discuss and explain three kinds of software Structures with example and diagram
Software structures refer to the organization and arrangement of components within a software system.
They define how different parts of the system interact with each other and how they are organized to
achieve the desired functionality. Here, we will discuss three common kinds of software
structures: Layered Architecture, Microservices Architecture, and Event-Driven Architecture. Each
structure will be explained in detail, along with examples and diagrams.

1. Layered Architecture

Overview: Layered architecture is a design pattern that organizes software into distinct layers, each with
specific responsibilities. This separation of concerns allows for better maintainability, scalability, and
testability.

Characteristics:

 Each layer communicates only with the layer directly above or below it.

 Layers can be developed and tested independently.

 Changes in one layer typically do not affect others.

Common Layers:

 Presentation Layer: Handles user interface and user interaction.

 Business Logic Layer: Contains the core functionality and business rules.

 Data Access Layer: Manages data storage and retrieval.

 Database Layer: The actual database where data is stored.

Example: A web application for an online bookstore.

Diagram:

VerifyOpen In EditorRunCopy code

1+---------------------+

2| Presentation Layer |

3| (User Interface) |

4+---------------------+

5| Business Logic |

6| (Order Processing) |

7+---------------------+

8| Data Access Layer |

9| (Database Queries) |

10+---------------------+
11| Database |

12| (SQL, NoSQL) |

13+---------------------+

Use Case: In the online bookstore application, the presentation layer would handle user interactions
(e.g., displaying books, taking orders), the business logic layer would process orders and manage
inventory, and the data access layer would interact with the database to retrieve and store book
information.

2. Microservices Architecture

Overview: Microservices architecture is a design approach that structures an application as a collection


of small, loosely coupled services. Each service is responsible for a specific business capability and can be
developed, deployed, and scaled independently.

Characteristics:

 Services communicate over a network, typically using RESTful APIs or messaging protocols.

 Each service can be developed in different programming languages and technologies.

 Promotes continuous delivery and deployment.

Example: An e-commerce platform with separate services for user management, product catalog, order
processing, and payment processing.

Diagram:

VerifyOpen In EditorRunCopy code

1+-------------------+ +-------------------+

2| User Service | | Product Service |

3| (Handles users) | | (Manages products) |

4+-------------------+ +-------------------+

5 | |

6 | |

7 +-----------+--------------+

8 |

9 |

10 +-------------------+

11 | Order Service |
12 | (Processes orders) |

13 +-------------------+

14 |

15 |

16 +-------------------+

17 | Payment Service |

18 | (Handles payments) |

19 +-------------------+

Use Case: In the e-commerce platform, the user service manages user accounts, the product service
manages the product catalog, the order service processes customer orders, and the payment service
handles payment transactions. Each service can be updated independently, allowing for greater flexibility
and scalability.

Static and Dynamic Models In Software Engineering

Software engineering is the discipline that primarily deals in the application of computer science and
engineering knowledge for designing, building, and sustaining software products. Models can be
classified into two broad categories: static and dynamic. This article analyzes the definitions,
characteristics, and differences between the static and dynamic models in software engineering.

Table of Content

 What is Static Model?

 What is a Dynamic Model?

 Static vs Dynamic Modelling

 Conclusion

 Frequently Asked Questions

What is a Static Model?

In software engineering, a static model is concerned with the architectural characteristics of a system.
It describes the system's elements and how they are connected at a given time. Static models do not
model the behavior of the system but rather its state. Some of the well-known static models are:

 Class Diagrams: Class Diagrams are the residual classes, interfaces, and relationships between
them in an Object-Oriented System. They incorporate attributes, methods, and the
relationships of one class with another.
 Entity-Relationship Diagrams (ERD): Mainly employed in database-related work, entity
relationship diagrams depict the entities in a database, their characteristics and the
connections they share.

 Component Diagrams: Component Diagram diagrams depict how the entire software is
organized and the relationship that these components of the software have with one another.

 Deployment Diagrams: A Deployment Diagram illustrates how software architecture, designed


on a conceptual level, translates into the physical system architecture where the software will
run as nodes.

What is a Dynamic Model?

Dynamic model describes the behavior of complex systems in addition to time and comprises a group
of models that give the current state of the system. It describes how the system evolves with regards
to certain events, the control flow and how the various components of the system interact. They are
particularly crucial in that they describe the real-time character, execution of activities, roles, and
occurrences within the system.

 Sequence Diagrams: Sequence diagrams represent the flow of messages between the objects
to achieve a particular task or a process.

 State Machine Diagrams: Applied to specify the possible conditions that an object can be in
and the change of these conditions based on events.

 Activity Diagrams: Activity diagrams illustrate the actions or processes in a system as well as
show when and if each activity/operation occurs.

 Use Case Diagrams: Use Case Diagram are principally used to document requirements but also
give a dynamic view since they depict the utilization of the system by the users.

Static vs Dynamic Modelling

Aspect Static Model Dynamic Model

Focus Structure and relationships Behavior and interactions

Time
Snapshot at a specific point in time Changes and evolution over time
Perspective

Class diagrams, ER diagrams, Sequence diagrams, state machine


Examples component diagrams diagrams, activity diagrams

Usage Architecture, design, documentation Behavior analysis, workflow modeling


Aspect Static Model Dynamic Model

Nature Descriptive Behavioral

Primary Static relationships and


Dynamic processes and state changes
Concern dependencies

Level of Detail High-level structural details Detailed behavioral interactions

Define system architecture and data


Analyze and validate system behavior
Purpose structures

Suitable for design and specification Suitable for simulation, testing, and
Suitability phases validation phases

UML class diagrams, ERD tools, UML sequence diagrams, state machine
Tools architecture frameworks tools, activity diagram tools

Conclusion

Static models are said to be equally as important as dynamic models in software engineering. Static
models give step by step details of the system design and this helps a lot in designing and
documentation phase. On the other hand, dynamic models provide understanding of how the system
works and when it has to perform how to ensure that it works as intended. Through integrating the
two, the software engineers can develop good systems that are well documented and more reliable.

Frequently Asked Questions

1. Why are static models important in software engineering?

This is significant in the case of developing static models because they offer detailed descriptions of
the system’s layouts and designs. They assist this by providing the lay out of the architecture, its
relationships and dependencies with other parts of the architecture which is majorly useful in planning
documentation among others.

2. Can a software project succeed with only static modeling?


It is important that there is a static model but merely to rely on this kind of model is not enough as it
will only provide a limited view of the subject. Descriptive models are also used to describe a
behavior/ interaction or change in states within a system which is needed for the correct function of
the system.

3. How do dynamic models help in software testing?

Dynamic models play an important role in software testing since they assist in the development of a
graphical representation of the system that shows its functions and how things interrelate. They
enable the tester to test the system against different scenarios, and come up with a scenario that
shows that the system has problems, as well as a scenario that shows that the system is fine.

4. Can static and dynamic models be used together?

Static and dynamic models can be used in parallel or can build on each other in order to fully explain
the system. Static models show how things are and where they are located while dynamic models
show how the things go and work and they all together give the best display of the entire systems.

3. Event-Driven Architecture

Overview: Event-driven architecture (EDA) is a design pattern that focuses on the production, detection,
consumption, and reaction to events. In this architecture, components communicate by emitting and
listening for events, allowing for decoupled interactions.

Characteristics:

 Components are loosely coupled, as they do not need to know about each other.

 Events can be processed asynchronously, improving responsiveness.

 Suitable for systems that require real-time processing and scalability.

Example: A social media application where user actions (like posting, commenting, or liking) trigger
events that update various components of the system.

Diagram:

VerifyOpen In EditorRunCopy code

1+-------------------+

2| User Action |

3| (Post, Comment) |

4+-------------------+

5 |

6 | emits event

7 v
8+-------------------+

9| Event Bus |

10| (Message Broker) |

11+-------------------+

12 |

13 | routes events

14 v

15+-------------------+ +-------------------+

16| Notification | | Analytics |

17| (Sends alerts) | | (Tracks user data) |

18+-------------------+ +-------------------+

Use Case: In the social media application, when a user posts a new message, an event is emitted to the
event bus. The notification service listens for this event and sends alerts to followers, while the analytics
service tracks the engagement metrics. This decoupling allows for easy addition of new features without
affecting existing components.

Summary

In summary, the three kinds of software structures discussed—Layered Architecture, Microservices


Architecture, and Event-Driven Architecture—each offer unique advantages and

Event-Driven Architecture vs. Microservices Architecture

Last Updated : 03 Oct, 2024

In system design, choosing the right architecture is crucial for building scalable and efficient systems.
Two popular approaches, Event-Driven Architecture (EDA) and Microservices Architecture, each offer
unique benefits. This article explores their definitions, differences, use cases, and more.
Event-Driven Architecture vs. Microservices Architecture

Table of Content

 What is Event-Driven Architecture?

 What is Microservices Architecture?

 Event-Driven Architecture vs. Microservices Architecture

 Use Cases of Event-Driven Architecture

 Use Cases of Microservices Architecture

 FAQs on Event-Driven Architecture vs Microservices Architecture

What is Event-Driven Architecture?

(EDA) is a software design paradigm centered around the production, detection, consumption, and
reaction to events. In this architecture, applications are designed to respond to events, which can be
triggered by user actions, system changes, or external services. EDA promotes decoupling of
components, allowing for more flexible and scalable systems.

Key Features of EDA:

 Asynchronous Communication: Components communicate via events rather than direct calls,
reducing dependencies.

 Loose Coupling: Components can evolve independently, improving maintainability.

 Real-Time Processing: EDA enables applications to respond immediately to events, making it


ideal for scenarios that require quick action.

What is Microservices Architecture?


Microservices Architecture is an architectural style that structures an application as a collection of small,
autonomous services, each responsible for a specific business capability. These services communicate
over well-defined APIs and can be deployed independently, allowing teams to develop, deploy, and scale
applications more efficiently.

Key Features of Microservices:

 Service Independence: Each microservice operates independently, allowing for isolated


development and deployment.

 Technology Agnostic: Teams can choose the best technology stack for each microservice.

 Scalability: Services can be scaled individually based on demand, optimizing resource use.

Event-Driven Architecture vs. Microservices Architecture

Below are the differences between event driven architecture and microservices architecture:

Feature/Aspect Event-Driven Architecture (EDA) Microservices Architecture

Communication Primarily synchronous via APIs, but can


Asynchronous via events
Pattern include events

Independent services, but may have


Loose coupling of components
Coupling interdependencies

Often uses event sourcing; Each service has its own database,
Data Management complex data management promoting autonomy

Scales well with event streams; Services can be scaled independently


Scalability handles spikes effectively based on demand

Components can evolve


Teams can use different tech stacks for
Development independently without major
different services
Flexibility changes

Real-Time Excellent for real-time data Can support real-time features, but often
Processing processing not the primary focus
Feature/Aspect Event-Driven Architecture (EDA) Microservices Architecture

Can introduce complexity in Complexity arises from managing multiple


Complexity event management services and dependencies

Ideal for real-time analytics, IoT, Best for large applications like e-
Use Cases and event-driven applications commerce, banking, and CMS

Failure Failure of one component doesn’t Independent failures may require careful
Management directly affect others management to avoid cascading issues

Use Cases of Event-Driven Architecture

Below are the use cases of event-driven architecture:

 Real-Time Analytics: Analyze streaming data for immediate business insights and adjustments.

 IoT Applications: Trigger automatic actions based on sensor-generated events in smart devices.

 Financial Services: Process transactions as events to enable rapid execution and updates.

 E-Commerce Platforms: Handle real-time notifications and updates for orders and inventory.

 Social Media Platforms: React to user interactions instantly by updating feeds and notifications.

Use Cases of Microservices Architecture

Below are the use cases of microservices architecture:

 E-Commerce Platforms: Manage payments, inventory, and user accounts through independent
services.

 Content Management Systems (CMS): Enable specialized teams to develop and manage
individual content services.

 Banking Applications: Maintain separate services for transactions, account management, and
fraud detection.

 Travel Booking Systems: Handle flight, hotel, and car rental services independently for better
scalability.

 Healthcare Systems: Manage patient records and appointments through isolated, flexible
services.

 Gaming Applications: Scale matchmaking and game logic services independently to


accommodate player demand
Conclusion

Choosing between Event-Driven Architecture and Microservices Architecture depends on the specific
needs of your application. EDA excels in scenarios requiring real-time processing and loose coupling,
while microservices provide flexibility in development and deployment of complex applications.

You might also like