SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Boutique product development company 
It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products.
Software Architecture, 
Principles, Design Patterns 
Boutique product development company 
It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products. 
Arslan Anwar | Senior Software Engineer
Arslan Anwar | Senior Software Engineer
Agenda 
➢ Software Architecture 
➢ Software Design Principles 
Arslan Anwar | Senior Software Engineer
Software Architecture 
➢ What is Software Architecture 
➢ Architecture vs. Design 
➢ Why Architecture is important 
➢ MVC , MVP , MV VM, 3 Tier 
Arslan Anwar | Senior Software Engineer
Software Architecture 
What is Software Architecture 
Arslan Anwar | Senior Software Engineer
Software Architecture 
What is Software Architecture 
o IEEE: Architecture is defined by the recommended practice as 
the fundamental organization of a system, embodied in its 
components, their relationships to each other and the environment, and 
the principles governing its design and evolution. 
o Architecture captures system structure in terms of components 
and how they interact. It primarily focuses on aspects such as 
performance, reliability, scalability, testbility, maintainability and 
various other attributes, which can be key both structurally 
and behaviorally of a software system. 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Software Architecture vs. Software Design 
All architecture is design, but not all design is architecture. 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Software Architecture vs. Software Design 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Software Architecture vs. Software Design 
Architecture Design 
Fundamental properties Detailed properties 
Define guidelines Communicate with developers 
Cross-cutting concerns Details 
High-impact Individual components 
Communicate with business 
stakeholders 
Use guidelines 
Manage uncertainty Avoid uncertainty 
Conceptual integrity Completeness 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Role of Software Architecture 
Completeness 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Role of Software Architecture 
Architecture plays a vital role in establishing the structure of 
the system, early in the development lifecycle 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Multi Tier Architecture 
In software engineering, multi-tier architecture (often 
referred to as n-tier architecture) is a client–server 
architecture in which 
▪ Presentation 
▪ Application processing 
▪ Data management 
functions are physically separated. The most 
widespread use of multi-tier architecture is the three-tier 
architecture. 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Multitier Tier Architecture 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Model View Controller 
▪ A controller can send commands to the model to update the model's state (e.g., 
editing a document). It can also send commands to its associated view to change 
the view's presentation of the model (e.g., by scrolling through a document). 
▪ A model notifies its associated views and controllers when there has been a 
change in its state. This notification allows the views to produce updated output, 
and the controllers to change the available set of commands. In some cases an 
MVC implementation might instead be "passive," so that other components 
must poll the model for updates rather than being notified. 
▪ A view requests information from the model that it uses to generate an output 
representation to the user. 
▪1 - * relationship between controller and view 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Model View Controller 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Model View Presenter 
MVP is a user interface architectural pattern engineered to facilitate automated 
unit testing and improve the separation of concerns in presentation logic: 
▪ The model is an interface defining the data to be displayed or otherwise acted 
upon in the user interface. 
▪ The view is a passive interface that displays data (the model) and routes user 
commands (events) to the presenter to act upon that data. 
▪ The presenter acts upon the model and the view. It retrieves data from 
repositories (the model), and formats it for display in the view. 
▪1 - 1 relationship between presenter and view 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Model View Presenter 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Model View Adapter 
Model–view–adapter (MVA) or mediating-controller MVC is an architectural 
pattern and multitier architecture, used in software engineering. In complex 
computer applications that present large amounts of data to users, developers 
often wish to separate data (model) and user interface (view) concerns so that 
changes to the user interface will not affect data handling and that the data can 
be reorganized without changing the user interface. 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Model View ViewModel 
Model: domain model which or the data access layer that represents that content 
View: View refers to all elements displayed by the GUI such as buttons, labels, 
and other controls. 
View model: “model of the view” meaning it is an abstraction of the view that 
also serves in mediating between the view and the model which is the target of 
the view data bindings. It could be seen as a specialized aspect of what would be 
a controller (in the MVC pattern) that acts as a converter that changes model 
information into view information and passes commands from the view into the 
model. 
Controller: some references for MVVM also include a controller layer to 
illustrate that the view model is a specialized functional set in parallel with a 
controller, while others do not. 
Binder: the use of a declarative databinding and command bind technology is an 
implicit part of the pattern. 
Relationship: Many views can use one ViewModel 
Arslan Anwar | Senior Software Engineer
Software Architecture 
Model View ViewModel 
Arslan Anwar | Senior Software Engineer
Problems - Android side 
● Tight coupling in business logic and view 
● Difficult to segregate responsibilities 
● Difficult to test 
● A lot of boilerplate code 
Solution: Follow an architectural pattern! 
Lala Rukh | Software Engineer
Solution - Android side 
● MVC in Android 
● MVP in Android 
● MVVM in Android 
Lala Rukh | Software Engineer
RoboBinding vs AndroidBinding 
● Binding - a look 
● Basic approach of implementation 
● Maintenance and stability 
● Reduction of boilerplate code 
● Ease of use 
Lala Rukh | Software Engineer
RoboBinding - Sample Project 
Talk is cheap, show me the code! 
Lala Rukh | Software Engineer
Conclusion 
● RoboBinding solves our problems: 
○ reduced a lot of boilerplate code 
○ decouples view and logic 
○ responsibilities segregated 
○ easy to test code 
Lala Rukh | Software Engineer
Software Design and Principles 
➢ What is Software Design 
➢ Design Smell 
➢ Software Design Principles 
SOLID (object-oriented design) 
DRY principle 
YAGNI principle 
KISS principle 
Arslan Anwar | Senior Software Engineer
Software Design 
What is Software Design 
o Software design is the process of defining software methods, 
functions, objects, and the overall structure and interaction of your code 
so that the resulting functionality will satisfy your users requirements. 
Arslan Anwar | Senior Software Engineer
Software Design 
7 Design Smell 
1. Rigidity 
2. Fragility 
3. Immobility 
4. Viscosity 
5. Needless Complexity 
6. Needless repetition 
7. Opacity 
Arslan Anwar | Senior Software Engineer
Software Design 
7 Design Smell 
▪ Rigidity 
The system is hard to change because every change forces many 
other changes to other parts of the system. 
▪ Fragility 
Changes cause the system to break in places that have no 
conceptual relationship to the part that was changed. 
▪ Immobility 
It is hard to disentangle the system into components that can be 
reused in other systems. 
Arslan Anwar | Senior Software Engineer
Software Design 
7 Design Smell 
▪ Viscosity 
Doing things right is harder than doing things wrong. 
▪ Needless Complexity 
The design contains infrastructure that adds no direct benefit. 
▪ Need Repetition 
The design contains repeating structures that could be unified 
under a single abstraction. 
▪ Opacity 
It is hard to read and understand. It does not express its intent 
well. 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Software Design Principles 
Software design principles represent a set of guidelines that helps us to 
avoid having a bad design. The software designs helps to make a 
software well designed, well read and best maintainable. 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
S.O.L.I.D Principles 
S.O.L.I.D. is a collection of best-practice, object-oriented design principles which 
can be applied to your design, allowing you to accomplish various desirable goals 
such as loose-coupling, higher maintainability, intuitive location of interesting 
code, etc. 
Single Responsibility 
Open Closed 
Liskov Substitution 
Interface Segregation 
Dependency Inversion 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
S.O.L.I.D Principles 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Single Responsibility Principle 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Single Responsibility Principle 
The Single Responsibility Principle (SRP) states that there should 
never be more than one reason for a class to change. This means 
that every class, or similar structure, in your code should have only 
one job to do. 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Open Closed Principle 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Open Closed Principle 
The Open-Closed Principle (OCP) states that classes should be 
open for extension but closed for modification. 
“Open to extension” means that you should design your classes so 
that new functionality can be added as new requirements are 
generated. “Closed for modification” means that once you have 
developed a class you should never modify it, except to correct 
bugs. 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Open Closed Principle 
So how do we add credit card support? You 
could add an “if” statement like this, but then 
that would be violation of OCP. 
Here is a better solution: 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Liskov Substitution Principle 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Liskov Substitution Principle 
"Derived types must be completely substitutable for their base 
types" 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Liskov Substitution Principle 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Interface Segregation Principle 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Interface Segregation Principle 
The Interface Segregation Principle (ISP) states that clients should 
not be forced to depend upon interface members they do not use. 
When we have non-cohesive interfaces, the ISP guides us to create 
multiple, smaller, cohesive interfaces. 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Interface Segregation Principle 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Dependency Inversion Principle 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Dependency Inversion Principle 
The Dependency Inversion Principle (DIP) states that high-level 
modules should not depend upon low-level modules; they should 
depend on abstractions. Secondly, abstractions should not depend 
upon details; details should depend upon abstractions. 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Miscellaneous Principles which are worth mentioning 
• Program to Interface Not Implementation. 
• Depend on Abstractions, Not Concrete classes. 
• YAGNI (You aren’t going to need it. So don’t implement it). 
• Least Knowledge Principle. (Only talk to your immediate 
friends. Classes that they inherit from, objects that they 
contain, objects passed by argument) 
• Hollywood Principle. ( Don’t call use, we will call you ) 
• Keep it Simple and Sweet / Stupid. ( KISS) 
• Minimize Coupling 
• Maximize Cohesion 
• Apply Design Pattern wherever possible. 
Arslan Anwar | Senior Software Engineer
Software Design Principles 
Don’t Repeat Yourself 
Arslan Anwar | Senior Software Engineer
Design Patterns 
Thank You 
Arslan Anwar | Senior Software Engineer

Weitere ähnliche Inhalte

Was ist angesagt?

Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patternsMd. Sadhan Sarker
 
Software architecture and software design
Software architecture and software designSoftware architecture and software design
Software architecture and software designMr. Swapnil G. Thaware
 
An Introduction to Software Architecture
An Introduction to Software ArchitectureAn Introduction to Software Architecture
An Introduction to Software ArchitectureRahimLotfi
 
Unified process,agile process,process assesment ppt
Unified process,agile process,process assesment pptUnified process,agile process,process assesment ppt
Unified process,agile process,process assesment pptShweta Ghate
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software EngineeringVarsha Ajith
 
Principles of software architecture design
Principles of software architecture designPrinciples of software architecture design
Principles of software architecture designLen Bass
 
Software Quality Attributes
Software Quality AttributesSoftware Quality Attributes
Software Quality AttributesHayim Makabee
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process ModelsAtul Karmyal
 
Service Oriented Architecture (SOA)
Service Oriented Architecture (SOA)Service Oriented Architecture (SOA)
Service Oriented Architecture (SOA)Mazhar Ishaq Khokhar
 
Software archiecture lecture09
Software archiecture   lecture09Software archiecture   lecture09
Software archiecture lecture09Luktalja
 
Rational Unified Process
Rational Unified ProcessRational Unified Process
Rational Unified ProcessKumar
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software EngineeringManish Kumar
 
Software Process Improvement
Software Process ImprovementSoftware Process Improvement
Software Process ImprovementBilal Shah
 
Unit iii(part b - architectural design)
Unit   iii(part b - architectural design)Unit   iii(part b - architectural design)
Unit iii(part b - architectural design)BALAJI A
 
Software Architecture and Design - An Overview
Software Architecture and Design - An OverviewSoftware Architecture and Design - An Overview
Software Architecture and Design - An OverviewOliver Stadie
 

Was ist angesagt? (20)

Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Software architecture and software design
Software architecture and software designSoftware architecture and software design
Software architecture and software design
 
An Introduction to Software Architecture
An Introduction to Software ArchitectureAn Introduction to Software Architecture
An Introduction to Software Architecture
 
Unified process,agile process,process assesment ppt
Unified process,agile process,process assesment pptUnified process,agile process,process assesment ppt
Unified process,agile process,process assesment ppt
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software Engineering
 
Principles of software architecture design
Principles of software architecture designPrinciples of software architecture design
Principles of software architecture design
 
Software Quality Attributes
Software Quality AttributesSoftware Quality Attributes
Software Quality Attributes
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
Service Oriented Architecture (SOA)
Service Oriented Architecture (SOA)Service Oriented Architecture (SOA)
Service Oriented Architecture (SOA)
 
Software archiecture lecture09
Software archiecture   lecture09Software archiecture   lecture09
Software archiecture lecture09
 
Rational Unified Process
Rational Unified ProcessRational Unified Process
Rational Unified Process
 
Design Pattern in Software Engineering
Design Pattern in Software EngineeringDesign Pattern in Software Engineering
Design Pattern in Software Engineering
 
Documenting Software Architectures
Documenting Software ArchitecturesDocumenting Software Architectures
Documenting Software Architectures
 
4+1 view model
4+1 view model4+1 view model
4+1 view model
 
Software Process Improvement
Software Process ImprovementSoftware Process Improvement
Software Process Improvement
 
Unit iii(part b - architectural design)
Unit   iii(part b - architectural design)Unit   iii(part b - architectural design)
Unit iii(part b - architectural design)
 
Software Metrics
Software MetricsSoftware Metrics
Software Metrics
 
Software Architecture and Design - An Overview
Software Architecture and Design - An OverviewSoftware Architecture and Design - An Overview
Software Architecture and Design - An Overview
 
Sdlc
SdlcSdlc
Sdlc
 

Ähnlich wie Software Architecture vs design

software architecture
software architecturesoftware architecture
software architecturearnav gupta
 
Software engineering
Software engineeringSoftware engineering
Software engineeringStella526835
 
Elementary Probability theory Chapter 2.pptx
Elementary Probability theory Chapter 2.pptxElementary Probability theory Chapter 2.pptx
Elementary Probability theory Chapter 2.pptxethiouniverse
 
[2015/2016] Software systems engineering PRINCIPLES
[2015/2016] Software systems engineering PRINCIPLES[2015/2016] Software systems engineering PRINCIPLES
[2015/2016] Software systems engineering PRINCIPLESIvano Malavolta
 
Mengenal Software Development Life Cycle - Gilang Ramadhan
Mengenal Software Development Life Cycle - Gilang RamadhanMengenal Software Development Life Cycle - Gilang Ramadhan
Mengenal Software Development Life Cycle - Gilang RamadhanDicodingEvent
 
Design concepts
Design conceptsDesign concepts
Design conceptsJoshuaU1
 
Software architectures
Software architecturesSoftware architectures
Software architecturesAmandeep Singh
 
13 Advantages of Using Laravel for Web Development.pdf
13 Advantages of Using Laravel for Web Development.pdf13 Advantages of Using Laravel for Web Development.pdf
13 Advantages of Using Laravel for Web Development.pdfLorryThomas1
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architectureshuchi tripathi
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesQamar Abbas
 
Unit_4_Software_Design.pptx
Unit_4_Software_Design.pptxUnit_4_Software_Design.pptx
Unit_4_Software_Design.pptxtaxegap762
 
Software Lifecycle Management
Software Lifecycle ManagementSoftware Lifecycle Management
Software Lifecycle ManagementAnkit Jain
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patternsConcetto Labs
 
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB TechExploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB TechPooja Gaikwad
 
Struts & hibernate ppt
Struts & hibernate pptStruts & hibernate ppt
Struts & hibernate pptPankaj Patel
 
Pradeep Kumar _Profile
Pradeep Kumar _ProfilePradeep Kumar _Profile
Pradeep Kumar _ProfilePradeep Kumar
 

Ähnlich wie Software Architecture vs design (20)

software architecture
software architecturesoftware architecture
software architecture
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Elementary Probability theory Chapter 2.pptx
Elementary Probability theory Chapter 2.pptxElementary Probability theory Chapter 2.pptx
Elementary Probability theory Chapter 2.pptx
 
[2015/2016] Software systems engineering PRINCIPLES
[2015/2016] Software systems engineering PRINCIPLES[2015/2016] Software systems engineering PRINCIPLES
[2015/2016] Software systems engineering PRINCIPLES
 
Mengenal Software Development Life Cycle - Gilang Ramadhan
Mengenal Software Development Life Cycle - Gilang RamadhanMengenal Software Development Life Cycle - Gilang Ramadhan
Mengenal Software Development Life Cycle - Gilang Ramadhan
 
Design concepts
Design conceptsDesign concepts
Design concepts
 
Software architectures
Software architecturesSoftware architectures
Software architectures
 
CHAPTER12.ppt
CHAPTER12.pptCHAPTER12.ppt
CHAPTER12.ppt
 
13 Advantages of Using Laravel for Web Development.pdf
13 Advantages of Using Laravel for Web Development.pdf13 Advantages of Using Laravel for Web Development.pdf
13 Advantages of Using Laravel for Web Development.pdf
 
Chapter1
Chapter1Chapter1
Chapter1
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecture
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
Unit_4_Software_Design.pptx
Unit_4_Software_Design.pptxUnit_4_Software_Design.pptx
Unit_4_Software_Design.pptx
 
Software Lifecycle Management
Software Lifecycle ManagementSoftware Lifecycle Management
Software Lifecycle Management
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
 
MVC.pptx
MVC.pptxMVC.pptx
MVC.pptx
 
Itc chapter # 7
Itc   chapter # 7Itc   chapter # 7
Itc chapter # 7
 
Exploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB TechExploring MVVM, MVC, MVP Patterns - CRB Tech
Exploring MVVM, MVC, MVP Patterns - CRB Tech
 
Struts & hibernate ppt
Struts & hibernate pptStruts & hibernate ppt
Struts & hibernate ppt
 
Pradeep Kumar _Profile
Pradeep Kumar _ProfilePradeep Kumar _Profile
Pradeep Kumar _Profile
 

Kürzlich hochgeladen

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Software Architecture vs design

  • 1. Boutique product development company It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products.
  • 2. Software Architecture, Principles, Design Patterns Boutique product development company It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products. Arslan Anwar | Senior Software Engineer
  • 3. Arslan Anwar | Senior Software Engineer
  • 4. Agenda ➢ Software Architecture ➢ Software Design Principles Arslan Anwar | Senior Software Engineer
  • 5. Software Architecture ➢ What is Software Architecture ➢ Architecture vs. Design ➢ Why Architecture is important ➢ MVC , MVP , MV VM, 3 Tier Arslan Anwar | Senior Software Engineer
  • 6. Software Architecture What is Software Architecture Arslan Anwar | Senior Software Engineer
  • 7. Software Architecture What is Software Architecture o IEEE: Architecture is defined by the recommended practice as the fundamental organization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution. o Architecture captures system structure in terms of components and how they interact. It primarily focuses on aspects such as performance, reliability, scalability, testbility, maintainability and various other attributes, which can be key both structurally and behaviorally of a software system. Arslan Anwar | Senior Software Engineer
  • 8. Software Architecture Software Architecture vs. Software Design All architecture is design, but not all design is architecture. Arslan Anwar | Senior Software Engineer
  • 9. Software Architecture Software Architecture vs. Software Design Arslan Anwar | Senior Software Engineer
  • 10. Software Architecture Software Architecture vs. Software Design Architecture Design Fundamental properties Detailed properties Define guidelines Communicate with developers Cross-cutting concerns Details High-impact Individual components Communicate with business stakeholders Use guidelines Manage uncertainty Avoid uncertainty Conceptual integrity Completeness Arslan Anwar | Senior Software Engineer
  • 11. Software Architecture Role of Software Architecture Completeness Arslan Anwar | Senior Software Engineer
  • 12. Software Architecture Role of Software Architecture Architecture plays a vital role in establishing the structure of the system, early in the development lifecycle Arslan Anwar | Senior Software Engineer
  • 13. Software Architecture Multi Tier Architecture In software engineering, multi-tier architecture (often referred to as n-tier architecture) is a client–server architecture in which ▪ Presentation ▪ Application processing ▪ Data management functions are physically separated. The most widespread use of multi-tier architecture is the three-tier architecture. Arslan Anwar | Senior Software Engineer
  • 14. Software Architecture Multitier Tier Architecture Arslan Anwar | Senior Software Engineer
  • 15. Software Architecture Model View Controller ▪ A controller can send commands to the model to update the model's state (e.g., editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document). ▪ A model notifies its associated views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to change the available set of commands. In some cases an MVC implementation might instead be "passive," so that other components must poll the model for updates rather than being notified. ▪ A view requests information from the model that it uses to generate an output representation to the user. ▪1 - * relationship between controller and view Arslan Anwar | Senior Software Engineer
  • 16. Software Architecture Model View Controller Arslan Anwar | Senior Software Engineer
  • 17. Software Architecture Model View Presenter MVP is a user interface architectural pattern engineered to facilitate automated unit testing and improve the separation of concerns in presentation logic: ▪ The model is an interface defining the data to be displayed or otherwise acted upon in the user interface. ▪ The view is a passive interface that displays data (the model) and routes user commands (events) to the presenter to act upon that data. ▪ The presenter acts upon the model and the view. It retrieves data from repositories (the model), and formats it for display in the view. ▪1 - 1 relationship between presenter and view Arslan Anwar | Senior Software Engineer
  • 18. Software Architecture Model View Presenter Arslan Anwar | Senior Software Engineer
  • 19. Software Architecture Model View Adapter Model–view–adapter (MVA) or mediating-controller MVC is an architectural pattern and multitier architecture, used in software engineering. In complex computer applications that present large amounts of data to users, developers often wish to separate data (model) and user interface (view) concerns so that changes to the user interface will not affect data handling and that the data can be reorganized without changing the user interface. Arslan Anwar | Senior Software Engineer
  • 20. Software Architecture Model View ViewModel Model: domain model which or the data access layer that represents that content View: View refers to all elements displayed by the GUI such as buttons, labels, and other controls. View model: “model of the view” meaning it is an abstraction of the view that also serves in mediating between the view and the model which is the target of the view data bindings. It could be seen as a specialized aspect of what would be a controller (in the MVC pattern) that acts as a converter that changes model information into view information and passes commands from the view into the model. Controller: some references for MVVM also include a controller layer to illustrate that the view model is a specialized functional set in parallel with a controller, while others do not. Binder: the use of a declarative databinding and command bind technology is an implicit part of the pattern. Relationship: Many views can use one ViewModel Arslan Anwar | Senior Software Engineer
  • 21. Software Architecture Model View ViewModel Arslan Anwar | Senior Software Engineer
  • 22. Problems - Android side ● Tight coupling in business logic and view ● Difficult to segregate responsibilities ● Difficult to test ● A lot of boilerplate code Solution: Follow an architectural pattern! Lala Rukh | Software Engineer
  • 23. Solution - Android side ● MVC in Android ● MVP in Android ● MVVM in Android Lala Rukh | Software Engineer
  • 24. RoboBinding vs AndroidBinding ● Binding - a look ● Basic approach of implementation ● Maintenance and stability ● Reduction of boilerplate code ● Ease of use Lala Rukh | Software Engineer
  • 25. RoboBinding - Sample Project Talk is cheap, show me the code! Lala Rukh | Software Engineer
  • 26. Conclusion ● RoboBinding solves our problems: ○ reduced a lot of boilerplate code ○ decouples view and logic ○ responsibilities segregated ○ easy to test code Lala Rukh | Software Engineer
  • 27. Software Design and Principles ➢ What is Software Design ➢ Design Smell ➢ Software Design Principles SOLID (object-oriented design) DRY principle YAGNI principle KISS principle Arslan Anwar | Senior Software Engineer
  • 28. Software Design What is Software Design o Software design is the process of defining software methods, functions, objects, and the overall structure and interaction of your code so that the resulting functionality will satisfy your users requirements. Arslan Anwar | Senior Software Engineer
  • 29. Software Design 7 Design Smell 1. Rigidity 2. Fragility 3. Immobility 4. Viscosity 5. Needless Complexity 6. Needless repetition 7. Opacity Arslan Anwar | Senior Software Engineer
  • 30. Software Design 7 Design Smell ▪ Rigidity The system is hard to change because every change forces many other changes to other parts of the system. ▪ Fragility Changes cause the system to break in places that have no conceptual relationship to the part that was changed. ▪ Immobility It is hard to disentangle the system into components that can be reused in other systems. Arslan Anwar | Senior Software Engineer
  • 31. Software Design 7 Design Smell ▪ Viscosity Doing things right is harder than doing things wrong. ▪ Needless Complexity The design contains infrastructure that adds no direct benefit. ▪ Need Repetition The design contains repeating structures that could be unified under a single abstraction. ▪ Opacity It is hard to read and understand. It does not express its intent well. Arslan Anwar | Senior Software Engineer
  • 32. Software Design Principles Software Design Principles Software design principles represent a set of guidelines that helps us to avoid having a bad design. The software designs helps to make a software well designed, well read and best maintainable. Arslan Anwar | Senior Software Engineer
  • 33. Software Design Principles S.O.L.I.D Principles S.O.L.I.D. is a collection of best-practice, object-oriented design principles which can be applied to your design, allowing you to accomplish various desirable goals such as loose-coupling, higher maintainability, intuitive location of interesting code, etc. Single Responsibility Open Closed Liskov Substitution Interface Segregation Dependency Inversion Arslan Anwar | Senior Software Engineer
  • 34. Software Design Principles S.O.L.I.D Principles Arslan Anwar | Senior Software Engineer
  • 35. Software Design Principles Single Responsibility Principle Arslan Anwar | Senior Software Engineer
  • 36. Software Design Principles Single Responsibility Principle The Single Responsibility Principle (SRP) states that there should never be more than one reason for a class to change. This means that every class, or similar structure, in your code should have only one job to do. Arslan Anwar | Senior Software Engineer
  • 37. Software Design Principles Open Closed Principle Arslan Anwar | Senior Software Engineer
  • 38. Software Design Principles Open Closed Principle The Open-Closed Principle (OCP) states that classes should be open for extension but closed for modification. “Open to extension” means that you should design your classes so that new functionality can be added as new requirements are generated. “Closed for modification” means that once you have developed a class you should never modify it, except to correct bugs. Arslan Anwar | Senior Software Engineer
  • 39. Software Design Principles Open Closed Principle So how do we add credit card support? You could add an “if” statement like this, but then that would be violation of OCP. Here is a better solution: Arslan Anwar | Senior Software Engineer
  • 40. Software Design Principles Liskov Substitution Principle Arslan Anwar | Senior Software Engineer
  • 41. Software Design Principles Liskov Substitution Principle "Derived types must be completely substitutable for their base types" Arslan Anwar | Senior Software Engineer
  • 42. Software Design Principles Liskov Substitution Principle Arslan Anwar | Senior Software Engineer
  • 43. Software Design Principles Interface Segregation Principle Arslan Anwar | Senior Software Engineer
  • 44. Software Design Principles Interface Segregation Principle The Interface Segregation Principle (ISP) states that clients should not be forced to depend upon interface members they do not use. When we have non-cohesive interfaces, the ISP guides us to create multiple, smaller, cohesive interfaces. Arslan Anwar | Senior Software Engineer
  • 45. Software Design Principles Interface Segregation Principle Arslan Anwar | Senior Software Engineer
  • 46. Software Design Principles Dependency Inversion Principle Arslan Anwar | Senior Software Engineer
  • 47. Software Design Principles Dependency Inversion Principle The Dependency Inversion Principle (DIP) states that high-level modules should not depend upon low-level modules; they should depend on abstractions. Secondly, abstractions should not depend upon details; details should depend upon abstractions. Arslan Anwar | Senior Software Engineer
  • 48. Software Design Principles Miscellaneous Principles which are worth mentioning • Program to Interface Not Implementation. • Depend on Abstractions, Not Concrete classes. • YAGNI (You aren’t going to need it. So don’t implement it). • Least Knowledge Principle. (Only talk to your immediate friends. Classes that they inherit from, objects that they contain, objects passed by argument) • Hollywood Principle. ( Don’t call use, we will call you ) • Keep it Simple and Sweet / Stupid. ( KISS) • Minimize Coupling • Maximize Cohesion • Apply Design Pattern wherever possible. Arslan Anwar | Senior Software Engineer
  • 49. Software Design Principles Don’t Repeat Yourself Arslan Anwar | Senior Software Engineer
  • 50. Design Patterns Thank You Arslan Anwar | Senior Software Engineer