Lesson 9
1. Architectural Design
Definition: Architectural design is the process of defining a structured solution that meets all
technical and operational requirements while optimizing quality attributes such as performance,
security, and manageability.
• Purpose: Establishes the high-level structure of a software system, ensuring that it
satisfies the system’s requirements and constraints.
• Core Elements:
o Components: Major elements of the system (e.g., modules, functions).
o Connectors: Mechanisms for communication (e.g., APIs, network protocols).
o Configuration: The layout of components and connectors within the system.
• Architectural Patterns:
o Layered Architecture: Separates concerns by defining layers (e.g., presentation,
business logic, data).
o Client-Server Architecture: Splits functionality between service providers
(servers) and requesters (clients).
o Microservices Architecture: Decomposes applications into small, independently
deployable services.
o Event-Driven Architecture: Uses events to trigger and communicate between
components.
Benefits:
• Facilitates scalability and flexibility.
• Enables easier maintenance and system evolution.
• Supports separation of concerns, enhancing modularity.
2. Distributed Systems Architectures
Definition: Distributed systems architecture involves designing systems where components
located on networked computers communicate and coordinate actions by passing messages.
• Characteristics:
o Decentralization: No single point of control; components operate independently.
o Scalability: Supports expansion by adding new nodes or services.
o Fault Tolerance: Can continue operation despite individual component failures.
• Common Architectures:
o Client-Server: Clients request services provided by central servers.
o Peer-to-Peer (P2P): Each node acts as both client and server, sharing resources
directly.
o Service-Oriented Architecture (SOA): Services are shared and reused across
distributed systems, often implemented with web services or RESTful APIs.
o Cloud-Based Architecture: Leverages cloud services to manage infrastructure,
scaling, and load balancing.
Challenges:
• Concurrency: Managing multiple requests simultaneously.
• Latency and Bandwidth: Network communication can be slow or unreliable.
• Security: Ensuring data integrity, confidentiality, and access control across distributed
components.
3. Object-Oriented Design (OOD)
Definition: Object-oriented design focuses on defining a system as a collection of interacting
objects, each representing an entity with attributes and behaviors.
• Core Concepts:
o Classes and Objects: A class defines the structure and behaviors; objects are
instances of classes.
o Encapsulation: Protects object state by hiding internal details.
o Inheritance: Allows new classes to inherit characteristics from existing ones.
o Polymorphism: Enables a single function to handle different data types.
• Design Principles:
o SOLID Principles: Guide good OO design (Single Responsibility, Open-Closed,
Liskov Substitution, Interface Segregation, Dependency Inversion).
o Design Patterns: Reusable solutions for common problems (e.g., Factory,
Singleton, Observer).
Benefits:
• Promotes modularity and reusability.
• Enhances maintainability by allowing easier updates.
• Supports a natural mapping to real-world entities.
4. Real-Time Software Design
Definition: Real-time software design is focused on systems that must operate within strict
timing constraints, where correctness depends on timely execution.
• Types of Real-Time Systems:
o Hard Real-Time: Missing a deadline could lead to catastrophic failure (e.g.,
medical devices).
o Soft Real-Time: Missing a deadline may degrade performance but is tolerable
(e.g., video streaming).
• Key Concepts:
o Deterministic Execution: Predictable timing for responses to inputs.
o Scheduling Algorithms: Ensure that tasks meet timing constraints (e.g., Rate
Monotonic, Earliest Deadline First).
o Concurrency Control: Manages access to shared resources without blocking
critical operations.
Challenges:
• Balancing resource usage with timing constraints.
• Designing for robustness in unpredictable environments.
• Testing for all potential timing scenarios.
5. Design with Re-use
Definition: Design with re-use emphasizes using existing components, frameworks, or modules
to build new systems, reducing development time and cost.
• Types of Re-usable Assets:
o Code Libraries: Ready-to-use code blocks that handle common functionality.
o Frameworks: Provide a structured environment with reusable components (e.g.,
Spring for Java, Django for Python).
o Design Patterns: General solutions to recurring design problems.
o APIs and Services: Third-party services that can be integrated (e.g., payment
gateways, data analytics services).
Approaches:
• Component-Based Development: Develops software by assembling reusable
components.
• Service-Oriented Architecture (SOA): Focuses on creating modular services that can be
reused across applications.
Benefits:
• Reduces development time by avoiding redundant coding.
• Improves reliability by using well-tested components.
• Enhances flexibility, as components can be swapped or upgraded.
6. User Interface Design
Definition: User interface (UI) design involves creating the visual and interactive elements of
software that allow users to engage with the system.
• Core Principles:
o Usability: Ensures ease of use and intuitive navigation.
o Consistency: Similar elements should look and behave similarly across the
application.
o Feedback: Provides users with timely responses to their actions.
o Affordance: Design cues that suggest how elements should be used (e.g.,
clickable buttons).
• UI Design Process:
o User Research: Understand the target audience and their needs.
o Wireframing and Prototyping: Create low- and high-fidelity sketches of the UI.
o Testing and Iteration: Refine the design based on user feedback.
Common Patterns:
• Navigation Bars and Menus: Provide easy access to different parts of the application.
• Forms and Input Fields: Allow users to submit information.
• Icons and Buttons: Offer recognizable and actionable elements for users.
Benefits:
• Improves user satisfaction and engagement.
• Increases productivity by streamlining user interactions.
• Reduces errors and the learning curve for new users.