CSC3003S Asd-2
CSC3003S Asd-2
WEEK- 1
4 major principles of Object Oriented Programming
• Inheritance -Deriving subclasses from a super class in order to inherit the methods and
shared attributes
• Polymorphism -The ability of a method to have more than one form
▪ Static polymorphism by overloading
▪ Dynamic Polymorphism by overriding
• Encapsulation - Keeping data and methods of an object together including getters and
setters to ensure information hiding
• Data Abstraction - Hiding low level details to reduce complexity
• The cost of dependability is exponential , the greater the dependability , the greater the cost
• All aspects simply take more money and time
Performance testing
• Load Testing checks how well the app works with normal user traffic. It helps find any slowdowns
before the app is launched.
• Stress Testing pushes the app to its limits with very heavy traffic. It shows when and where the
app breaks under pressure.
• Spike Testing checks how the app handles sudden jumps in user activity. It ensures the app can
manage sudden surges in usage.
• Soak/Endurance Testing makes sure the app can handle normal user traffic over a long time
without slowing down or crashing.
• Volume Testing adds a large amount of data to the app’s database to see how it performs with
lots of information. Database is populated .
Availability and Failure Metrics
•MTBF (Mean Time Between Failures): The average time the system works without failing.
Higher MTBF = More reliable.
• MTTR (Mean Time to Repair): How long it takes to fix a system after it fails. Lower MTTR
= Faster recovery.
• MTTF (Mean Time to Failure): Time before the system completely fails (for systems that
cannot be repaired).
Software Lifecycle Stages
• Design: Planning and creating the system’s structure.
• Development: Writing code and building the system.
• Testing: Checking for bugs, vulnerabilities, or issues.
• Change Management: Handling updates, improvements, or repairs to the system.
WEEK 3
Architectural Design
• This refers to the set of principal design decisions about the system
• A software architecture simplifies the system by focusing on key details, leaving out
unnecessary information. It provides just enough insight to support analysis, decision
making, and reducing risks.
• Also this is the key decisions about how a software system is structured, how its parts
interact, and how they are combined into larger subsystems, guided by a specific
architectural style.
• Internal implementation is not architectural
Architectural thinking
• The translation from problem domain to solution concepts
Architecture and system characteristics (MAPSS)
• Performance
• Security
• Safety
• Availability
• Maintainability
RUP "4+1" View of Architecture (Kruchten)
This model organizes architecture into five main views to address various concerns and
ensure that all stakeholders' perspectives are considered. The 4+1 model includes:
1. Logical View
• Focuses on the functional requirements of the system.
• Typically represented by Communication Diagrams.
• Deals with how the system's components communicate and interact.
2. Development View
• Looks at the system from a programmer's perspective.
• Depicted using Component & Package Diagrams.
• Organizes the system into modules and shows the dependencies among them.
3. Process View
• Deals with the dynamic aspects of the system, such as concurrency, performance, and
scalability.
• Represented through Activity Diagrams.
• Focuses on how processes communicate and how the system behaves during
execution.
4. Physical (Deployment) View
• Shows how the system is deployed in the physical environment.( Maps to hardware)
• Illustrated by Deployment Diagrams.
• Details where the software runs on hardware and how different hardware components
communicate.
5. Scenarios (Use Cases, User Stories)
• Represents how the system interacts with its environment or users.
• Use cases and user stories are used to validate the architecture against its
requirements.
Type and Lollipop
1. «type» Stereotype: In UML, when you see the word "«type»," it means the class is an
interface or a virtual class. Interfaces are like blueprints for a class, specifying what
functions or methods must be implemented without detailing how they should work.
2. Lollipop Notation: Instead of drawing the full interface class in a diagram, UML lets us
use a "lollipop" symbol (a small circle on a stick) to represent that an interface is
being implemented by a class. This makes the diagram simpler.
• In short, a lollipop means that a class uses or implements an interface, without
showing the detailed connections or full structure of the interface class itself. It's just
a visual shortcut.
WEEK 4
Architecture Patterns Overview
1. Model-View-Controller (MVC):
• Model: Manages the data and logic of the application.
• View: Displays data to the user in a specific format.
• Controller: Manages user input and updates the model and view accordingly.
• Example: A temperature app with two views (Fahrenheit and Celsius) that updates both
views when one changes.
2. Layered Architecture:
• Organizes software into layers that handle specific aspects (UI, Business Logic,
Services). • UI Layer: Handles user interaction (e.g., web pages).
• Application Layer: Manages business rules, workflows.
• Service Layer: Provides high-level services like persistence and logging.
• Foundation: Includes low-level technical utilities like data structures and networking.
• Benefits: Easier to understand, replace, and modify.
3. Client-Server Architecture:
• Client: Requests services.
• Server: Provides services.
• Often used in web services where a client interacts with a server to fetch data.
4. Repository Architecture:
• Used for data-heavy systems where data is stored in a central repository.
• Example: Blackboard pattern where different agents access the same repository to perform
tasks.
5. Pipe and Filter Architecture:
• Data is passed through multiple stages (pipes) and transformed at each stage (filters).
• Example: Processing a burger where each step (adding bun, patty, toppings) represents a
filter.
Additional Concepts:
• System Architecture vs. Design:
◦ Architecture: High-level structure and skeleton of the system.
◦ Design: Focuses on lower-level details, like how the code is structured.
• Key Principles:
◦ Cohesion: High communication within modules.
◦ Coupling: Low communication between modules (aim to minimize it).
LAST WEEK
1. Component-Based Software Engineering (CBSE)
• Background: Traditional object-oriented approaches failed to support effective reuse
because developers needed to know too many details about the classes, including the
source code.
• Solution: Components provide abstraction at a higher level. Components are stand-alone
service providers that are bigger than single classes and hide their implementation.
• Characteristics of Components:
◦ Composable: Interact through publicly defined interfaces.
◦ Deployable: Can be self-contained and operate on a platform that implements the
component model.
◦ Documented: Fully documented to help users understand if the component meets their
needs.
◦ Independent: Can be composed and deployed without specific dependencies.
◦ Standardized: Conform to a standard component model, including metadata,
documentation, and deployment guidelines.
2. Introduction to Service-Oriented Architecture (SOA)
• Definition: SOA is an architectural pattern that designs software systems based on loosely
coupled, reusable service components that encapsulate specific business or operational
procedures. Services can represent business functions and are accessible through protocols
like REST or SOAP.
• Key Advantages of SOA:
◦ Scalable & Flexible: Easy to add or drop services over time, enabling scalability and
adaptability.
◦ Fault Tolerance & Redundancy: Allows for robust systems by adding redundancy and
diverse services.
3. Web Services and Service Independence
• Web Services: Defined as reusable software components that can be distributed and
accessed over the internet using standard protocols (e.g., XML).
• Service vs. Component:
◦ Services are independent and do not rely on a 'requires' interface, unlike components.
◦ Communication relies on message-based exchanges.
4. Service-Oriented Software Engineering
• Need for Evolution: Traditional software engineering approaches have to evolve to align
with service-oriented principles.
• Service Engineering: Developing dependable, reusable services that can be used across
different systems. This involves:
◦ Developing for Reuse: Creating services intended for use across various applications.
◦ Developing with Reuse: Building software using existing services as core
components.
5. Service-Oriented Architectures (SOA)
• Principles: Building distributed systems using stand-alone services that can execute on
different computers provided by various providers.
• Key Protocols for Service Communication:
◦ SOAP (Simple Object Access Protocol): A message exchange
protocol.
◦ WSDL (Web Service Description Language): Defines service
interfaces.
◦ WS-BPEL: A workflow language for service composition.
6. Services as Reusable Components
• Definition of a Service: A loosely coupled, reusable software component that can be
distributed and accessed programmatically.
• Platform Independence: Services are platform and language-independent, focusing on
providing a 'provides' interface without requiring dependency declarations.
7. Examples and Use Cases of SOA
• In-Car Information System: A service-based system providing drivers with information
(e.g., weather, traffic) linked to GPS. The system uses service discovery to find appropriate
services.
• Key Benefits of SOA in this Case:
◦ Flexibility to bind to services based on location.
◦ Translation services allow movement across regions.
8. Key Standards and Technologies in SOA
• SOAP: Supports communication between services.
• WSDL: Specifies what operations a service supports and how it is
accessed.
• WS-BPEL: Allows defining complex service compositions.
9. RESTful Web Services
• REST (Representational State Transfer): A simpler architectural style that focuses on
transferring resource representations from server to client.
• Characteristics:
◦ Stateless Communication: Each request contains all necessary
information. ◦ Lower Overhead: Efficient and suitable for mobile applications.
◦ Uses Standard HTTP Methods: GET, POST, PUT, DELETE.
10. Pro and Cons of RESTful
Approach
• Advantages:
◦ Simple and easy to implement.
◦ Lower overhead compared to SOAP.
• Disadvantages:
◦ Designing complex services can be challenging.
◦ Lack of formal standards for describing interfaces.
11. Service Engineering and Development
Process
• Stages of Service Engineering:
1. Service Candidate Identification: Understanding business processes to identify
potential services.
2. Service Design: Defining logical interfaces and service interactions.
3. Implementation & Deployment: Developing, testing, and deploying the services.
12. Task and Entity-Oriented Services
• Task-Oriented Services: Linked to specific activities.
• Entity-Oriented Services: Similar to objects, linked to business entities (e.g., forms).
• Classification of Services: Utility, Business, and Coordination services.
13. Service Interface Design
• Design Considerations:
◦ Minimize the number of messages exchanged.
◦ Include service state information in messages if necessary.
◦ Design logical interfaces, specifying operation names and parameters.
14. Service Composition and Workflows
• Service Composition: Combining existing services to create new applications.
• Workflow Design: Creating logical sequences of activities to implement coherent business
processes.
15. Microservices Architecture
• Comparison to SOA: Microservices are more fine-grained, reducing dependencies. They
emphasize “share-as-little-as-possible,” while SOA promotes “share-as-much-as possible.”
• Advantages of Microservices:
◦ Easy deployment and scaling.
◦ Quick to develop and deploy.
◦ Better suited for smaller, well-defined tasks.
16. SOA vs. Microservices
• SOA: Ideal for complex, enterprise-wide systems requiring integration with various
applications and services.
• Microservices: Suitable for smaller systems, enabling agility and fast deployments without
heavy dependencies.
17. Use Cases for Microservices
• Best for smaller web-based applications and systems that require quick deployment,
scalability, and independent functionality.
18. Service Testing Challenges
• Testing Issues:
◦ Services are black boxes, so internal source-based testing methods cannot be used.
◦ External service modifications can invalidate previous tests.
◦ Dynamic binding and unpredictable non-functional behavior complicate testing.
19. Deployment and Management
• Service Deployment: Services are made available by publicizing their details, enabling
service discovery and binding.
• Legacy Systems: SOA allows integration with legacy systems, offering a modern interface
for existing functionalities.
20. Conclusion and Key Takeaways
• SOA & Microservices Evolution: Both are essential for modern software development,
offering reusable, scalable, and flexible solutions.
• Choosing the Right Approach: The choice between SOA and microservices depends on
the scale, complexity, and specific needs of the system being developed.