0% found this document useful (0 votes)
12 views

411 - Mobile Applications Development - Architecture

This document discusses mobile application development. It covers design versus architecture, programming paradigms like object oriented programming and functional programming, design principles, design patterns, and software architecture patterns like MVP and MVC. It emphasizes the importance of balancing behavior and architecture in software design. The SOLID principles for object oriented design are explained to help ensure code is maintainable, extendable, and testable. Finally, it discusses evaluating complexity in software applications and introduces clean architecture.

Uploaded by

bed-com-08-19
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

411 - Mobile Applications Development - Architecture

This document discusses mobile application development. It covers design versus architecture, programming paradigms like object oriented programming and functional programming, design principles, design patterns, and software architecture patterns like MVP and MVC. It emphasizes the importance of balancing behavior and architecture in software design. The SOLID principles for object oriented design are explained to help ensure code is maintainable, extendable, and testable. Finally, it discusses evaluating complexity in software applications and introduces clean architecture.

Uploaded by

bed-com-08-19
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Mobile Applications

Development
Isaac S. Mwakabira(Mr.)
Introduction
In Modern Mobile Software Development

❖ Design vs Architecture
❖ Paradigms
➢ Introduction to Functional Programming
➢ Object Oriented Programming
■ Objects(Class), Abstraction, Inheritance - interfaces & abstract classes, Polymorphism,
Encapsulation
❖ Design Principles
❖ Design Patterns
➢ Structural, Creation, Behavioral
❖ Software Architecture Patterns - MVP, MVC, MVVM
Design vs Architecture
Design:
❖ Structures and decision at lower level of detail
❖ May involve writing code or building the artefact
❖ Quality of software is measured by how much effort is needed to change the
artefact.
❖ Low effort entails good design & high effort bad design. Well designed code matters.
❖ “We can clean it up later; we just have to get to market first!” ~ (Might Be You)
Architecture:
❖ High level divorced from lower level details
❖ Minimizes human resources required to build and maintain the required system
❖ Reduces costs overtime - organization saves on capital
Behavior vs Architecture
Every software must have behavior & architecture values.

It is your responsibility to ensure both values are satisfied and in a balanced


manner.

Behavior - software must satisfy user requirements. Your job is to test that
functional requirements are met. Testing & debugging.

Architecture - software must be “softly” easy to understand and change. It must


have a shape that can easily be adapted to new requirements.
Behavior vs Architecture
Every software must have behavior & architecture values.
It is your responsibility to ensure both values are satisfied and in a balanced
manner.
❖ Behavior - software must satisfy user requirements. Your job is to test that
functional requirements are met. Testing & debugging.
❖ Architecture - software must be “softly” easy to understand and change. It
must have a shape that can easily be adapted to new requirements.
What about Function vs Architecture?
❖ Balance is key, software must be soft.
Programming Paradigms
Architecture begins with your code.

❖ How should we write our code so as to ensure good design architecture?

Paradigms, principles and patterns exist for this purpose.

❖ Paradigm - A category of entities sharing common characteristics. Ways of programming that inform
developers on what programming structure to use and when to use them.
❖ They streamline development process by describing tasks required for building high-quality software
products.
❖ Structured, functional, & object oriented.

Objective:

❖ Structured development process, as guidance for quality software product.


Programming Paradigms
❖ Structured Programming
➢ Structured programming imposes discipline on direct transfer of control
❖ Object Oriented Programming
➢ Object-oriented programming imposes discipline on indirect transfer of control
➢ Objects(Class), Abstraction, Inheritance - interfaces & abstract classes, Polymorphism,
Encapsulation
❖ Functional Programming
➢ Functional programming imposes discipline upon assignment
Software Architecture

● Characteristics
❖ Maintainable & Extendable
❖ Testable
❖ Understandable for new developers or stakeholders
Software Architecture - Characteristics

● Maintainable Software
❖ Ability to fix bugs without introducing new ones or ability to fix a bug without affecting other
existing components
❖ Ability to fix a bug without it recurring in the future
❖ Ability to fix a bug with low editing of existing components
● Extendable
❖ The ability to add a new feature - with minimal changes to current components
❖ The ability to add a new feature - without changing the shape of the original architecture
Software Architecture - Characteristics

● Testable Software
❖ The ability to test each component separately
❖ Low maintenance effort for test code
❖ Efficiency in terms of testing effort and code coverage
Software Architecture - Characteristics

● Understandable for new developers & stakeholders


❖ Low barrier of entry - new stakeholders can understand the project structure quickly
❖ Easy to explain - all developers can easily explain the structure of the software

“Truth can only be found in one place: the code.”


Robert C. Martin
Evaluating the Complexity of Software
Applications
● Can become very complex
● High number of core components
● High number of libraries

● Ie. Services: network, email etc., Repositories, Interfaces & other


components
Evaluating the Complexity of Software
Applications
● Interoperability Between Components
❖ Highly decoupled from each other
Easy readable code
Clear naming for classes & variables
Follows the SOLID principles for Object Oriented Design
Small classes
❖ Able to consistently communicate with others
Evaluating the Complexity of Software
Applications
● Goals
❖ Well defined structure & layers
❖ Well defined components
❖ Our code
Extendable
Maintainable
Testable
● Note:
❖ Good architecture saves valuable development time and as we all know, time === money
Evaluating the Complexity of Software
Applications
● The SOLID Principles

❖ Firstly introduced by Robert C. Martin known as Uncle Bob

❖ First five object oriented design principles

❖ Make it easy to write maintainable, extendable and testable code


Principles - SOLID
Software SOLID principles tell developers or engineers how:
❖ To arrange our functions and data structures into classes, and
❖ Those classes are related and interconnected
Goals:
❖ Torate change
❖ Easy to understand software structures
❖ Software structures that are the basis of components that can be used in many software
systems
List:
Single Responsibility Principle(SRP), Open-Closed Principle, Liskov Substitution Principle,
Interface Segregation Principle, Dependency Inversion Principle
Evaluating the Complexity of Software
Applications - The SOLID Principles
● Single Responsibility Principle

❖ Every class should have only one responsibility

❖ Responsibility = reason to change the class

❖ Results in short components or classes


Evaluating the Complexity of Software
Applications - The SOLID Principles
● Open/close principle

❖ Should be open for extension

❖ Close for modification

❖ Add new features using inheritance


but shouldn’t change the existing class
Evaluating the Complexity of Software
Applications - The SOLID Principles
● Liskov's substitution principle

❖ A method that takes class Y as parameter


Must be able to work with any subclass of Y
Evaluating the Complexity of Software
Applications - The SOLID Principles
● Interface segregation principle

❖ Complex interfaces should be split

❖ Complex interfaces make it harder to extend smaller parts of our system


Evaluating the Complexity of Software
Applications - The SOLID Principles
● Dependency inversion principle

❖ No hidden dependencies

❖ Let the calling class create the dependency


Instead of letting the class itself create the dependency
SOLID Principles

“Long lived software ALWAYS has legacy code and without well structured

architecture, the technical debt will always grow”


Software Design Patterns
Solutions to general problems. Singular software development approach to
software problem solving.
Proven and implemented in many software frameworks. Laravel, Ruby on Rails,
etc.
Used by experienced object oriented software developers.
Types or Categories
❖ Structural -
❖ Creational - Builder, Singleton, Factory,
❖ Behavioral
Software Architectural Patterns
❖ Design principles and patterns - are where software architectural patterns are
built upon.
❖ Examples
➢ MVC – Model View Controller
➢ MVP – Model View Presenter
➢ MVI - Model View Intent?
➢ MVVM – Model View ViewModel
Introduction to Clean Architecture
❖ Separation of concerns, which is
attained through the separation of
the software layers/components
❖ It is defined by boundaries, that
define decoupled & independent
components making up the
software.
❖ Components: Database, UI,
Business Use Cases, Services etc


Why Clean Architecture?
❖ Mixed-up Layers
❖ No Independence
❖ Flexibility
❖ Better communication with
stakeholders
❖ Data Management

Clean Architecture - The Dependency Rule
❖ Source code dependencies must
point only inward, toward
higher-level policies
❖ Visualize Clean Architecture in
terms of MVVM or MVP or MVC
architectural patterns.
❖ Let us now put these rules and
thoughts about architecture
together into a case study
❖ put these rules and thoughts about
architecture together
❖ into a case study
Clean Architecture - Benefits
❖ Developing high quality of code
❖ Higher rates of dependency
❖ Organized work
❖ Separation of concerns
❖ Prioritization of main concerns
❖ put these rules and thoughts about
architecture together
❖ into a case study
Use Case - Video Sales (Adapted from reference book)
❖ Use Case Analysis
➢ The Product
■ What are your actors?
■ Use-Cases?
➢ Component Architecture - from actors and use-cases
❖ Code Organization - implementation (development)
➢ Package By Layer
➢ Package By Feature
➢ Package By Component


Assignment - Task 2
Use

❖ Paradigms, Patterns & Principles of Modern Software Development

Design your application using C4 Model to visualize your software architecture

Prototype - the application - Lab session


Summary
In Modern Mobile Software Development
❖ Paradigms
➢ Introduction to Functional Programming
■ Reactive Extensions
➢ Object Oriented Programming
■ Objects(Class), Abstraction, Inheritance - interfaces & abstract classes, Polymorphism,
Encapsulation
❖ Design Principles
❖ Design Patterns
➢ Structural, Creation, Behavioral
❖ Software Architecture Patterns - MVP, MVC, MVVM
❖ Introduction to Clean Architecture
References
❖ https://medium.com/educative/the-7-most-important-software-design-patterns-d60e5
46afb0e
❖ https://sourcemaking.com/design_patterns
❖ https://refactoring.guru/design-patterns/what-is-pattern
❖ https://medium.com/@mena.meseha/6-principles-of-software-design-3a8478954e1c
❖ https://www.oodesign.com/design-principles.html
❖ https://adevait.com/software/solid-design-principles-the-guide-to-becoming-better-de
velopers
❖ https://www.dotnettricks.com/learn/designpatterns/different-types-of-software-design
-principles
❖ https://sourcemaking.com/design_patterns
❖ https://www.wiley.com/en-am/Software+Paradigms-p-9780471483472

You might also like