Summary
Highlights
Software architecture defines the high-level structure of a software system, organizing how components interact and communicate. It addresses fundamental questions about system construction, emphasizing major design decisions over detailed code lines. Key goals include scalability, maintainability, reliability, and security.
The lecture discusses common software architecture patterns: Layered Architecture, Monolithic vs. Microservices Architecture, and Event-Driven Architecture (EDA). Each pattern suits different conditions and needs.
Muhammad Diki Widianto introduces the 10th lecture on Software Analysis and Design, focusing on software architecture and interfaces. The learning objectives include understanding, designing, and determining software architecture and interfaces based on system characteristics.
The layered architecture is a classic pattern dividing the system into distinct layers: Presentation Layer (user interface), Business Logic Layer (core business rules), Data Access Layer (database interaction), and Database Layer (data storage). Each layer communicates only with the layers directly above or below it.
Advantages of layered architecture include independent scalability, technological flexibility across layers, and simplified maintenance due to isolated changes. Disadvantages include increased complexity, potential performance overhead (latency) due to inter-layer communication, and rigid separation that can sometimes lead to inefficiency.
Monolithic architecture consolidates all application features (UI, business logic, data access) into a single, unified codebase and deployment unit. Microservices architecture, conversely, breaks down applications into smaller, independent services, each with its own codebase, database, and deployment process.
Monolithic systems have low initial complexity but struggle with scalability and redeployment (small changes require full redeployment). Microservices increase initial complexity but offer flexible scalability, independent redeployment, and better fault isolation. Monolithic is suitable for small teams and startups; microservices are better for large enterprises with high traffic.
EDA is a reactive approach where software services are triggered by events. Changes in application status generate 'events' that are processed by a message broker. This allows for asynchronous communication and quicker responses, making processes more efficient (e.g., handling user payments, stock reduction, email notifications, and invoice generation simultaneously).
Software interfaces are contact points between systems or between a system and its user. There are two main categories: User Interface (UI), which facilitates direct human-system interaction, and Application Programming Interface (API), which enables software-to-software communication.
User interfaces include Graphical User Interface (GUI) for visual interaction (buttons, menus), Command Line Interface (CLI) for text-based commands (terminal), and Voice User Interface (VUI) for voice commands (e.g., virtual assistants).
APIs define how systems request and respond to data. Common types are REST (Representational State Transfer) for HTTP-based communication, GraphQL for client-defined data retrieval, and gRPC for fast, efficient microservices communication using binary protocols.
A good interface is not just visually appealing but also user-friendly and efficient. Key principles include visibility (easy-to-find elements), consistency (uniform patterns), feedback (responses to user actions), simplicity, and accessibility (usable by all, user-friendly).
Software architecture profoundly influences interface design. For microservices, robust REST APIs are crucial for inter-service communication. In layered architecture, UI interacts with the business logic layer, not directly with the database. Event-driven architectures rely on event messages for component interaction rather than direct function calls.