Saturday, 25 June 2016

What is GoF (Gang of Four) ?


The authors of book "Design patterns" are known as "Gang of Four" :

What is the GRASP principle ?


General Responsibility Assignment Software Principles
  • Guidelines for assigning responsibility to classes and objects in OO design.
  • uses various patterns :
    • Controller
      • A non-user interface object responsible for receiving or handling a system event.
    • Creator
      • Factory Pattern (GoF)
    • Indirection
      • Proxy Pattern (GoF)
    • Information Expert
      • Information Hiding
    • High Cohesion
    • Low Coupling
    • Polymorphism
    • Protected Variations
      • Open Close Principle of SOLID principle
    • Pure Fabrication
      • System as a set of related software functionalities that can be reused for different purposes

'IS A' vs. 'HAS A'


has-a
  • A composition relationship where one object "belongs to" another object and behaves according to the rules of ownership.

is-a 
  • A relationship between abstractions (e.g. types, classes), where one class A is a subclass of another class B

Favor Composition over inheritance

What are the Software Design considerations ?


Software Design considerations
  • Compatibility
  • Extensibility
  • Fault-tolerance
  • Maintainability
  • Modularity
  • Reliability
  • Reusability
  • Robustness
  • Security
  • Usability
  • Performance
  • Portability
  • Scalability
  • Availability
  • Recoverability
  • Monitorability

What are the principles of Software Design ?


Software design principles
  • SOLID
  • GRASP
  • DRY (Don’t Repeat Yourself)
  • KISS (Keep It Simple and Stupid)
  • YAGNI (You Aren’t Gonna Need It)
  • If it ain’t broken, don’t fix it !
 

What are the common practices for improving SLRs ?


Redundancy
  • Load Balancing
  • Failover
  • Clustering

Availability
  • Active replication : performed by processing the same request at every replica
  • Passive replication : involves processing each single request on a single replica and then transferring its resultant state to the other replicas


Performance
  • Increase system capacity
  • Increase computational efficiency 

Extensibility
  • Clearly define the scope in the service-level agreement
  • Anticipate expected changes
  • Design a high-quality object model

Scalability
  • Vertical Scalability : more processors, memory, and disks
  • Horizontal Scalability : more servers

Reliability
  • Increase computational efficiency
  • Transactions
  • Monitor and restart
  • Redundancy
  • Degradation
  • Bound execution time

What is the impact of dimensions on SLRs (Service level requirements) ?


Capacity
  • Raw power in an element - CPU, fast network connection, or large storage capacity
  • increased through vertical scaling
  • can improve performance, availability, and scalability

Redundancy
  • Multiple systems that work on the same job - Load balacing
  • increased through horizontal scaling
  • can increase performance, reliability, availability, extensibility, and scalability
  • can decrease manageability and security

Modularity
  • Dividing a computational problem into separate elements
  • can increase scalability, extensibility, maintainability, and security
  • can decrease performance, reliability, availability, and manageability

Tolerance
  • Time available to fulfill a request from a user
  • can increase performance, scalability, reliability, and manageability

Workload
  • Computational work being performed at a particular point within the system
  • consumes available Capacity
  • can increase performance, scalability, and availability

Heterogeneity
  • Diversity in technologies that is used within a system
  • can increase performance and scalability
  • can decrease performance, scalability, availability, extensibility, manageability, and security