SADP PPTs of all modules - Shanthi D.L_compressed.pdf

ronaldwangdra23 8 views 20 slides Oct 19, 2025
Slide 1
Slide 1 of 20
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20

About This Presentation

XXXXXX


Slide Content

BMS Institute of Technology and MgmtDepartment of ISE
SOFTWARE ARCHITECTURE AND
DESIGN PATTERNS/17IS72

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Course Outcomes
CO1Understandthebasicconceptstoidentifystate&behaviourofreal
worldobjects.
CO2ApplyObjectOrientedAnalysisandDesignconceptstosolve
complexproblems.
CO3ConstructvariousUMLmodelsusingtheappropriatenotationfor
specificproblemcontext.
CO4DesignmodelstoShowtheimportanceofsystemsanalysisand
designinsolvingcomplexproblemsusingcasestudies.
CO5StudyofPatternOrientedapproachforrealworldproblems.
COS/P
OS
Program Outcomes
PO1
PO
2
PO
3
PO
4
PO5PO6PO7PO8PO9PO10PO11PO12PSO1 PSO2
CO1 3 --- - - - - - - - - - -
CO2 3 --- - - - - - - - - - -
CO3 -3-- - - - - - - - - 2 -
CO4 --3 - - - - - - - - 3 -
CO5 --3 - - - - - - - - - -

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Syllabus and Text Books
Module-1:Introduction:whatisadesignpattern?Describingdesign
patterns,thecatalogofdesignpattern,organizingthecatalog,how
designpatternssolvedesignproblems,howtoselectadesignpattern,
howtouseadesignpattern.Whatisobject-orienteddevelopment?,
keyconceptsofobjectorienteddesignotherrelatedconcepts,benefits
anddrawbacksoftheparadigm
Module-2:AnalysisaSystem:overviewoftheanalysisphase,stage1:
gatheringtherequirementsfunctionalrequirementsspecification,
definingconceptualclassesandrelationships,usingtheknowledgeof
thedomain.DesignandImplementation,discussionsandfurther
reading.
Module-3: Design Pattern Catalog: Structural patterns, Adapter,
bridge, composite, decorator, facade, flyweight, proxy.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Module-4:InteractivesystemsandtheMVCarchitecture:Introduction,The
MVCarchitecturalpattern,analyzingasimpledrawingprogram,designingthe
system,designingofthesubsystems,gettingintoimplementation,
implementingundooperation,drawingincompleteitems,addinganew
feature,patternbasedsolutions.
Module-5: DesigningwithDistributedObjects:Clientserversystem,java
remotemethodinvocation,implementinganobjectorientedsystemonthe
web(discussionsandfurtherreading)anoteoninputandoutput,selection
statements,loopsarrays.
Text Books:
1.Object-oriented analysis, design and implementation, brahma dathan,
sarnathrammath, universities press,2013
2.Design patterns, erichgamma, Richard helan, Ralph johman, john vlissides
,PEARSON Publication,2013.
Reference Books:
1.Frank Bachmann, RegineMeunier, Hans Rohnert “Pattern Oriented Software
Architecture” –Volume 1, 1996.
2.William J Brown et al., "Anti-Patterns: Refactoring Software, Architectures
and Projects in Crisis", John Wiley, 1998.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Module-1 : Introduction
What Is a Design Pattern?
ChristopherAlexandersays:
“Eachpatterndescribesaproblemwhichoccursoverandover
againinourenvironment,andthendescribesthecoreofthe
solutiontothatproblem,insuchawaythatyoucanusethis
solutionamilliontimesover,withouteverdoingthesame
thingtwice.”
Borrowed from Civil and Electrical Engineering domains.
A technique to repeat designer success.
A (Problem, Solution) pair

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Essential Elements
A pattern has four essential elements:
The pattern namethat we use to describe a design
problem,
The problemthat describes when to apply the pattern,
The solutionthat describes the elements that make up
the design, and
The consequencesthat are the results and trade-offs of
applying the pattern.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Design Patterns Are Not About Design
•Design patterns are not about designs such as linked lists and
hash tables that can be encoded in classes and reused as is.
•Design patterns are not complex, domain-specific designs for an
entire application or subsystem.
•One person's pattern can be another person's primitive building
block.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
What is and isn’t a design pattern
The design patterns are descriptions of communicating
objects and classes that are customized to solve a general
design problem in a particular context.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
What is and isn’t a design pattern
•A design pattern names, abstracts, and identifies the key aspects
of a common design structure that make it useful for creating a
reusable object-oriented design.
•The design pattern identifies the participating classes and
instances, their roles and collaborations, and the distribution of
responsibilities.
•Each design pattern focuses on a particular object-oriented
design problem or issue.
•It describes when it applies, whether it can be applied in view of
other design constraints, and the consequences and trade-offs
of its use.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
What is and isn’t a design pattern
•Althoughdesignpatternsdescribeobject-orienteddesigns,they
arebasedonpracticalsolutionsthathavebeenimplementedin
mainstreamobject-orientedprogramminglanguageslike
SmalltalkandC++ratherthanprocedurallanguages(Pascal,C,
Ada)ormoredynamicobject-orientedlanguages(CLOS,Dylan,
Self)
•Thechoiceofprogramminglanguageisimportantbecauseit
influencesone'spointofview.Ourpatternsassume
Smalltalk/C++-levellanguagefeatures,andthatchoice
determineswhatcanandcannotbeimplementedeasily.
•Wemighthaveincludeddesignpatternscalled"Inheritance",
"Encapsulation,"and"Polymorphism."

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Design Patterns in Smalltalk MVC
The Model/View/Controller (MVC) triad of classes is used to build
user interfaces in Smalltalk-80. MVC consists of three kinds of
objects
1.Modelis the application object,
2.Viewis its screen presentation,
3.Controllerdefines the way the user interface reacts to user
input.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
MVC decouples them to increase flexibility and
reuse.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
MVC decouples them to increase flexibility and
reuse.
1.MVC decouples views and models by establishing a
subscribe/notify protocol between them.
2.A view must ensure that its appearance reflects the state of the
model.
3.Whenever the model's data changes, the model notifies views that
depend on it.
4.In response, each view gets an opportunity to update itself.
5.This approach lets you attach multiple views to a model to provide
different presentations.
6.We can also create new views for a model without rewriting it.
7.The model contains some data values, and the views defining a
spreadsheet, histogram, and pie chart display these data in various
ways.
8.The model communicates with its views when its values change,
and the views communicate with the model to access these values.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Describing Design Patterns
Describingthedesignpatternsingraphical
notations,simplycapturetheendproductofthe
designprocessasrelationshipsbetweenclassesand
objects.
•In order to reuse the design, one must record
decisions, alternatives and trade-offs.
•Also need some concrete examples,
•Describe design pattern using consistent
format.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
A common way to describe a design pattern is the
use of the following template:
1.Pattern Name and Classification
2.Intent
3.Also Known As
4.Motivation (Problem, Context)
5.Applicability (Solution)
6.Structure (a detailed specification of structural aspects)
7.Participants, Collaborations (Dynamics)
8.Implementation
9.Sample code
10.Known Uses
11.Consequences
12.Related patterns

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
The Catalog of Design Patterns (23 patterns)
Pattern Name purpose
Abstract Factory
(87)
Provide an interface for creating families of related or
dependent objects without specifying their concrete classes.
Adapter ( 139 )•Convert the interface of a class into another interface
clients expect.
•Lets classes work together with incompatible interfaces.
Bridge(1 51) •Decouple an abstraction from its implementation so that
the two can vary independently.
Builder (97) •Separate the construction of a complex object from its
representation
•So that the same construction process can create different
representations.
Chain of
Responsibility
(223)
•Avoid coupling the sender of a request to its receiver by
giving more than one object a chance to handle the
request.
•Chain the receiving objects and pass the request along the
chain until an object handles it.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Pattern Name purpose
Command ( 233)•Encapsulate a request as an object,
•Lets you parameterize clients with different requests,
queue or log requests, and support undoable operations.
Composite( 163)•Compose objects into tree structures to represent part-
whole hierarchies.
•Lets clients treat individual objects and compositions of
objects uniformly.
Decorator( 175 )•Attach additional responsibilities to an object dynamically.
•Provide a flexible alternative to sub classing for extending
functionality.
Facade( 185 ) •Provide a unified interface to a set of interfaces in a
subsystem.
•Defines a higher-level interface that makes the subsystem
easier to use.
Factory Method
(107)
•Define an interface for creating an object,
•But let sub classes decide which class to instantiate.
•Lets a class defer instantiation to subclasses.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Pattern Name purpose
Flyweight (195 )•Use sharing to support large numbers of fine-grained objects
efficiently.
Interpreter
(243)
•Given a language, define a representation for its grammar
along with an interpreter that uses the representation to
interpret sentences in the language.
Iterator (257)•Provide a way to access the elements of an aggregate object
sequentially without exposing its underlying representation.
Mediator (273)•Define an object that encapsulates how a set of objects
interact.
•Promotes loose coupling by keeping objects from referring to
each other explicitly,
•It lets you vary their interaction independently.
Memento ( 283)•Without violating encapsulation, capture and externalize an
object's internal state
•so that the object can be restored to this state later.
Observer (293)•Define a one-to-many dependency between objects so that
when one object changes state, all its dependents are
notified and updated automatically.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
Prototype
( 117 )
•Specify the kinds of objects to create using a prototypical instance,
•Create new objects by copying this prototype.
Proxy
(207)
•Provide a surrogate or placeholder for another object to control access
to it.
Singleton
(127 )
•Ensure a class only has one instance, and provide a global point of
access to it.
State
(305)
•Allow an object to alter its behavior when its internal state changes.
•The object will appear to change its class.
Strategy
(315)
•Define a family of algorithms, encapsulate each one, and make them
interchangeable.
•Lets the algorithm vary independently from clients that use it.
Template
Method
(325)
•Define the skeleton of an algorithm in an operation, deferring some
steps to subclasses.
•Lets subclasses redefine certain steps of an algorithm without
changing the algorithm 's structure.
Visitor
(331)
•Represent an operation to be performed on the elements of an object
structure.
•Lets you define a new operation without changing the classes of the
elements on which it operates.

BMS Institute of Technology and MgmtDepartment of ISEDepartment of ISE BMS Institute of Technology and Mgmt
The Catalog of Design Patterns
Design patterns vary in their granularity and level of abstraction. All
these patterns can be organized into catalog:
Tags