SlideShare une entreprise Scribd logo
1  sur  7
Android development principles
SOLID
• These principles not only help in writing a well-structured
code but they also make sure that the code can easily be
extended later.
• If developers design and implement their codes without
using structured design principles such as SOLID principles,
they will create long-lasting problems for other developers
that will want to work on the project in future.
• Software Rot or Code Rot or Software Erosion is either a
slow deterioration of software quality over time or its
decreasing responsiveness, which will eventually lead to
software becoming faulty, unusable, and in need of
upgrade.
Single Responsibility
• Single Responsibility, as its name suggests, means that your classes should
have only one responsibility
• The reason behind Single Responsibility is that it makes your class more
complex and lead to code duplication issues which almost always ends up
with non-updated codes.
Open-Closed Principle
• This means that your software entities like classes, functions, modules etc. should be open to
extension but not modification.
• This is a very basic principle that should be followed no matter what platform you are coding
for.
• This principle requires you to write a class or function or module in a way that it does need to
be changed whenever your requirements change.
• For example, if you are making a class to calculate the area of a shape like a circle then you
shouldn’t change the class every time a new shape comes as an input.
• Designing a base class and then extending it with the help of inheritance, or any other
technique depending on the language you are using, is the way to go.
Liskov Substitution Principle
• “Objects should be replaceable with their subtype instances
without having the need to alter the program.”
• In short, you can replace the objects of List with any of its
subtype without causing the program to break
Interface Segregation Principle
• The Interface Segregation Principle states that there should be a lot of
Client-specific User Interfaces rather than a general purpose User
Interface.
• A general purpose User Interface will make your code complex because of
the multiple callbacks as well as make the user confused. Remember,
always give users small achievable goals rather than a big time-consuming
task.
Dependency Inversion Principle
• High-level modules should be independent of the low-level
modules. Both should depend on abstractions.
• Details should depend on Abstractions instead of Abstractions
depending on the Details.
• requirements for an application changes a lot. And, changes
are risky.
• So, making your modules independent will make them
reusable as well as significantly reduce the risks involved in
changing the implementations.

Contenu connexe

Similaire à android principle.pptx

Similaire à android principle.pptx (20)

Dependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and PatternsDependency Injection, Design Principles and Patterns
Dependency Injection, Design Principles and Patterns
 
Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile DevelopmentKevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
 
Software development fundamentals
Software development fundamentalsSoftware development fundamentals
Software development fundamentals
 
Segue to design patterns
Segue to design patternsSegue to design patterns
Segue to design patterns
 
Waterfall Model.pptx
Waterfall Model.pptxWaterfall Model.pptx
Waterfall Model.pptx
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry Practices
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
The Open-Closed Principle - the Original Version and the Contemporary Version
The Open-Closed Principle - the Original Version and the Contemporary VersionThe Open-Closed Principle - the Original Version and the Contemporary Version
The Open-Closed Principle - the Original Version and the Contemporary Version
 
System Development Life Cycle Models
System Development Life Cycle ModelsSystem Development Life Cycle Models
System Development Life Cycle Models
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
ISTQB - Software development life cycle
ISTQB - Software development life cycleISTQB - Software development life cycle
ISTQB - Software development life cycle
 
SDLC Method Training Course
SDLC Method Training CourseSDLC Method Training Course
SDLC Method Training Course
 
SDLC Methodologies
SDLC MethodologiesSDLC Methodologies
SDLC Methodologies
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 
"X" Driven-Development Methodologies
"X" Driven-Development Methodologies"X" Driven-Development Methodologies
"X" Driven-Development Methodologies
 
Project Life Cycle and Effort Estimation
Project Life Cycle andEffort EstimationProject Life Cycle andEffort Estimation
Project Life Cycle and Effort Estimation
 
Solid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile developmentSolid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile development
 
Modules and Modularization.pptx
Modules and Modularization.pptxModules and Modularization.pptx
Modules and Modularization.pptx
 
Object Oriented Design SOLID Principles
Object Oriented Design SOLID PrinciplesObject Oriented Design SOLID Principles
Object Oriented Design SOLID Principles
 

Plus de debasish duarah (6)

Physical Fitness.pptx
Physical Fitness.pptxPhysical Fitness.pptx
Physical Fitness.pptx
 
Overview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptxOverview of Adroid Architecture.pptx
Overview of Adroid Architecture.pptx
 
layout and UI.pptx
layout and UI.pptxlayout and UI.pptx
layout and UI.pptx
 
XML Introduction to GUI objects.pptx
XML Introduction to GUI objects.pptxXML Introduction to GUI objects.pptx
XML Introduction to GUI objects.pptx
 
Guidelines for Android application design.pptx
Guidelines for Android application design.pptxGuidelines for Android application design.pptx
Guidelines for Android application design.pptx
 
Web server
Web serverWeb server
Web server
 

Dernier

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 

Dernier (20)

COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 

android principle.pptx

  • 2. SOLID • These principles not only help in writing a well-structured code but they also make sure that the code can easily be extended later. • If developers design and implement their codes without using structured design principles such as SOLID principles, they will create long-lasting problems for other developers that will want to work on the project in future. • Software Rot or Code Rot or Software Erosion is either a slow deterioration of software quality over time or its decreasing responsiveness, which will eventually lead to software becoming faulty, unusable, and in need of upgrade.
  • 3. Single Responsibility • Single Responsibility, as its name suggests, means that your classes should have only one responsibility • The reason behind Single Responsibility is that it makes your class more complex and lead to code duplication issues which almost always ends up with non-updated codes.
  • 4. Open-Closed Principle • This means that your software entities like classes, functions, modules etc. should be open to extension but not modification. • This is a very basic principle that should be followed no matter what platform you are coding for. • This principle requires you to write a class or function or module in a way that it does need to be changed whenever your requirements change. • For example, if you are making a class to calculate the area of a shape like a circle then you shouldn’t change the class every time a new shape comes as an input. • Designing a base class and then extending it with the help of inheritance, or any other technique depending on the language you are using, is the way to go.
  • 5. Liskov Substitution Principle • “Objects should be replaceable with their subtype instances without having the need to alter the program.” • In short, you can replace the objects of List with any of its subtype without causing the program to break
  • 6. Interface Segregation Principle • The Interface Segregation Principle states that there should be a lot of Client-specific User Interfaces rather than a general purpose User Interface. • A general purpose User Interface will make your code complex because of the multiple callbacks as well as make the user confused. Remember, always give users small achievable goals rather than a big time-consuming task.
  • 7. Dependency Inversion Principle • High-level modules should be independent of the low-level modules. Both should depend on abstractions. • Details should depend on Abstractions instead of Abstractions depending on the Details. • requirements for an application changes a lot. And, changes are risky. • So, making your modules independent will make them reusable as well as significantly reduce the risks involved in changing the implementations.