93. Software Architecture
• Software architecture describes a system through its architectural
elements. Elements description may include:
✓ The elements structure and behavior
✓ The design principles elements emphasize, and
✓ The qualities elements realize into the architecture.
• Architectural elements can be classified into:
✓ Data elements that contain information, and
✓ Processing elements that operate on data elements
• Processing elements can be classified further according to the nature
of their processing into components and connectors:
✓ Components encapsulate application logic that transforms/alters data. Business
objects are typical examples of components
✓ Connectors encapsulate logic that formats and routes data between
components and other connectors; they do not alter the data . Decorators,
proxies, adapters, and data access objects are examples of connectors
Sherif Rasmy 2Python Fundamentals - Object Oriented Programming
• The structure of elements refers to their interfaces, compositions, and relationships.
• The behavior of elements refers to their communication, interaction, control flow, exchange of messages, and state changes over time.
• Design principles refer to guidelines that elements seek to emphasize by imposing constraints on their structure and behavior.
• Architecture qualities refer to those properties, goals, non-functional attributes, and service level objectives collectively realized by the
final structure and behavior of all architectural elements
Software Architecture
94. Object Oriented Design Principles
Sherif Rasmy 3Python Fundamentals - Object Oriented Programming
Abstraction – refers to identifying concepts within a domain as objects. Abstraction can be viewed as the activity of defining at an abstract level the essential
characteristics of objects that distinguish them from other objects, as well as providing crisp conceptual boundaries between them
• Object Oriented Design Principles
Refer to guidelines that objects seek to emphasize by imposing constraints on their structure and behavior in order to realize
desired architecture qualities. The key OOP design principles include:
Encapsulation – refers to compartmentalizing the characteristics of abstractions at a more comprehensive level. Encapsulation can be viewed as the activity of
uncovering more details regarding the information and behavior of the objects, as well as defining each objects’ interface, roles and responsibilities.
• Object Orientated Architecture
Refers to an architecture that realizes its elements through objects. Objects are used to construct both data and processing elements
Hierarchy – refers to the ranking or ordering of abstractions. Hierarchy can be viewed as the activity of defining the relationships and dependencies between
objects. The key types of relationships in OO includes Inheritance (IS-A relationship), Composition (HAS-A relationship) and Association (USES relationship)
Polymorphism – refers to the ability of objects to respond differently when receiving the same message (method call). Polymorphism allows for creating
generalized objects that share common features but allow specialized objects to respond differently because of their unique characteristics. In OO, Polymorphism
is achieved through method and operator overloading as well as method overriding which is facilitated through Inheritance
Modularity – refers to organizing architectural elements into as a set of cohesive, loosely coupled objects, modules and packages It should be noted that
Modularity is a common principle that is not specific to OO.
• Object Oriented Architecture Qualities
Refer to those properties, goals, non-functional attributes collectively realized through the structure and behavior of the objects. The key
qualities OO seek to emphasize include: Extensibility, Reusability, Robustness, Maintainability, Learnability, and Testability
117. Software Architecture
• Software architecture describes a system through its architectural
elements. Elements description may include:
✓ The elements structure and behavior
✓ The design principles elements emphasize, and
✓ The qualities elements realize into the architecture.
• Architectural elements can be classified into:
✓ Data elements that contain information, and
✓ Processing elements that operate on data elements
• Processing elements can be classified further according to the nature
of their processing into components and connectors:
✓ Components encapsulate application logic that transforms/alters data. Business
objects are typical examples of components
✓ Connectors encapsulate logic that formats and routes data between
components and other connectors; they do not alter the data . Decorators,
proxies, adapters, and data access objects are examples of connectors
Sherif Rasmy 2Python Functional Programming
• The structure of elements refers to their interfaces, compositions, and relationships.
• The behavior of elements refers to their communication, interaction, control flow, exchange of messages, and state changes over time.
• Design principles refer to guidelines that elements seek to emphasize by imposing constraints on their structure and behavior.
• Architecture qualities refer to those properties, goals, non-functional attributes, and service level objectives collectively realized by the
final structure and behavior of all architectural elements
Software Architecture
118. Functional Programming Design Principles
Sherif Rasmy 3Python Functional Programming
Higher Order Functions – requires functions to have the capability of being assigned to variables and passed as arguments to other functions.
• Functional Programming Design Principles refer to guidelines that functions seek to emphasize by imposing constraints on their
structure and behavior in order to realize desired architecture qualities. The key Functional Programming design principles
include:
Purity or Side-Effect-Free – requires functions not to modify data elements outside of its scope. A function that modifies the state (value) of an argument passed to
it, or any global variable, or even write to an external resource like a file/database is considered not pure.
• Functional Oriented Architecture refers to an architecture that realizes its processing elements through functions.
Referential Transparency – requires functions to accept at least one argument and return a value provided that returned value be the same when the function is
re-called with the same argument(s). A function that reads data from global variables/resource or calls a non-functional function is considered to be not
referentially transparency.
Misc. – Functional functions should always return the same type, return no nulls, and not throw exceptions
• Functional Programming Architecture Qualities refer to those properties, goals, non-functional attributes, collectively realized through the
structure and behavior of functions. The key qualities FP seeks to emphasize include: Performance, Reusability, Predictability, Testability
• Functional Programming Motivation Side-Effect free functions are easier to understand and to predict their behavior. Side-Effect free
functions also facilitate using multi-core parallelism without using locking., because functions no longer interfere with each other. Referential
transparency facilitates save-instead-of-recompute optimization for expensive long-lived operations; this falls under memorization or caching