Patterns in a Security Alarm System (SAS) AGENDA Domain Model Domain Model The Patterns The Patterns –Iterator –Observer –Abstract Factory –Singleton.

Slides:



Advertisements
Similar presentations
Design Patterns.
Advertisements

Creational Design Patterns. Creational DP: Abstracts the instantiation process Helps make a system independent of how objects are created, composed, represented.
Patterns in a Security Alarm System (SAS) AGENDA Domain Model Domain Model The Patterns The Patterns –Iterator –Observer –Abstract Factory –Singleton.
Behavioral Design Patterns May 5, 2015May 5, 2015May 5, 2015.
 Recent researches show that predicative programming can be used to specify OO concepts including classes, objects, interfaces, methods, single and multiple.
GoF Sections 2.7 – 2.9 More Fun with Lexi. Lexi Document Editor Lexi tasks discussed:  Document structure  Formatting  Embellishing the user interface.
Design Patterns Copyright © Vyacheslav Mukhortov, Nikita Nyanchuk-Tatarskiy, Copyright © INTEKS LLC,
Plab – Tirgul 12 Design Patterns
. Plab – Tirgul 12 Design Patterns. Design Patterns u The De-Facto Book on Design Patterns:
Iterators T.J. Niglio Computer & Systems Engineering Fall 2003 Software Design & Documentation Object Behavioral.
Patterns Lecture 2. Singleton Ensure a class only has one instance, and provide a global point of access to it.
CSE Software Engineering: Analysis and Design, 2002Lecture 7B.1 Software Engineering: Analysis and Design - CSE3308 Patterns CSE3308/DMS/2002/15.
Design Pattern Course Builder Pattern 1 Mahdieh Monzavi AmirKabir University of Technology, Department of Computer Engineering & Information Technology.
Design Patterns CS is not simply about programming
Design Patterns Examples in C++ Moshe Fresko Bar-Ilan University Object Oriented Programming
GoF Sections 2.7 – 2.9 More Fun with Lexi. Lexi Document Editor Lexi tasks discussed:  Document structure  Formatting  Embellishing the user interface.
ECE 355 Design Patterns Tutorial Part 2 (based on slides by Ali Razavi) Presented by Igor Ivković
1 Object Oriented Design & Patterns Part 1. 2 Design Patterns Derived from architectural patterns: –rules for design of buildings –describe common problems,
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Security Devices A modern security system, with its array of electronic components, is designed to sense, decide, and act. The security system senses events.
© SERG Software Design (OOD Patterns) Object-Oriented Design Patterns Topics in Object-Oriented Design Patterns Compliments of Spiros Mancoridis Material.
Linzhang Wang Dept. of Computer Sci&Tech, Nanjing University The Abstract Factory Pattern.
Country house Control Panel Glass break detector Hooter alarm Magnetic sensor Motion detector Security light.
Activated by the control panel, it gives a loud audio signal to alert that an intrusion has occurred.
Singleton Christopher Chiaverini Software Design & Documentation September 18, 2003.
BDP Behavioral Pattern. BDP-2 Behavioral Patters Concerned with algorithms & assignment of responsibilities Patterns of Communication between Objects.
Design Patterns.
CSE 332: Design Patterns (Part I) Introduction to Design Patterns Design patterns were mentioned several times so far –And the Singleton Pattern was discussed.
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
Software Components Creational Patterns.
GoF Design Patterns (Ch. 26). GoF Design Patterns Adapter Factory Singleton Strategy Composite Façade Observer (Publish-Subscribe)
Computing IV Singleton Pattern Xinwen Fu.
Object Oriented Software Engineering Chapter 16 and 17 review 2014/06/03.
CS 4233 Review Feb February Review2 Outline  Previous Business – My.wpi.edu contains all grades to date for course – Review and contact.
July 28, 2015IAT 2651 Design Patterns. “Gang of Four” July 28, 2015IAT 2652.
Behavioral Pattern: Iterator C h a p t e r 5 – P a g e 159 Software can become difficult to manage when a variety of different traversals of a variety.
Programmeerimine Delphi keskkonnas MTAT Programmeerimine Delphi keskkonnas MTAT Jelena Zaitseva
FACTORY METHOD. Design Pattern Space Purpose ScopeCreationalStructuralBehavioral ClassFactory MethodAdapterInterpreter Template Method ObjectAbstract.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
CS 210 Final Review November 28, CS 210 Adapter Pattern.
Design Patterns Introduction
Using Software Design Patterns Bill Anderson. About me Fox developer since 1987 Fox developer since 1987 Program Director, Los Angeles Visual Foxpro Developers.
CS212: Object Oriented Analysis and Design Lecture 39: Design Pattern-III.
Advanced Object-oriented Design Patterns Creational Design Patterns.
Example to motivate discussion We have two lists (of menu items) one implemented using ArrayList and another using Arrays. How does one work with these.
Singleton Pattern Presented By:- Navaneet Kumar ise
CS 210 Proxy Pattern Nov 16 th, RMI – A quick review A simple, easy to understand tutorial is located here:
Overview of Creational Patterns ©SoftMoore ConsultingSlide 1.
PROTOTYPE. Design Pattern Space Purpose ScopeCreationalStructuralBehavioral ClassFactory MethodAdapterInterpreter Template Method ObjectAbstract factory.
Design Patterns Creational Patterns. Abstract the instantiation process Help make the system independent of how its objects are created, composed and.
1 Iterator Pattern (A Behavioral Pattern) Prepared by: Neha Tomar.
Elements of LCG Architecture Application Architecture Blueprint RTAG 8 th June 2002 P. Mato / CERN.
Review of last class. Design patterns CreationalStructuralBehavioral Abstract Factory Builder Factory Singleton etc. Adapter Bridge Composite Decorator.
MPCS – Advanced java Programming
Gang of Four’s Design Patterns for Microservices
Common Design Patterns
Design Patterns Based on slides provided by Abbie Jarrett
Singleton Pattern Command Pattern
object oriented Principles of software design
Presented by Igor Ivković
Design Patterns - A few examples
Multiuser Protection and the Mediator Pattern
Chapter 9 Behavioral Design Patterns
The iterator and memento patterns
Design Patterns Difficult to describe abstractly Elements:
Introduction to Design Patterns
Presented by Igor Ivković
Software Design Lecture : 39.
Iterator Design Pattern Jim Fawcett CSE776 – Design Patterns Fall 2014
Presentation transcript:

Patterns in a Security Alarm System (SAS) AGENDA Domain Model Domain Model The Patterns The Patterns –Iterator –Observer –Abstract Factory –Singleton

Protected Item Sensor Observes Triggers Notifies Room Temp DoorWindow Break InThermostatMotion Detector Magnetic SwitchSmoke Sensor Open EventTemp EventBreak EventSmoke Event Monitoring Co.PoliceOwnerFire EVENT Attach(Observer) Detach(Observer) Notify() Trigger() Monitoring Authority Notify() Security Alarm System (SAS) Domain Model

ITERATOR PATTERN Applicability Access an aggregate object's contents without exposing its internal representation. Access an aggregate object's contents without exposing its internal representation. Support multiple traversals of aggregate objects. Support multiple traversals of aggregate objects.

Abstract List CreateIterator() Count() AppendItem() RemoveItem() ITERATOR PATTERN in SAS Sensor List Zone List Sensor Iterator First() Next() IsDone() CurrentItem() SensorIterator ZoneIterator Zone

Applicability When a change to one object requires changing others, and you don't know how many objects need to be changed. When a change to one object requires changing others, and you don't know how many objects need to be changed. When an object should be able to notify other objects without making assumptions about who these objects are. When an object should be able to notify other objects without making assumptions about who these objects are. OBSERVER PATTERN

EVENT Attach(Observer) Detach(Observer) Trigger() OBSERVER PATTERN in SAS Open EventTemp EventBreak EventSmoke Event Monitoring Co.PoliceOwnerFire observers for all o in observers o.Notify() Monitoring Authority Notify()

Applicability A system should be independent of how its products are created, composed, and represented. A system should be independent of how its products are created, composed, and represented. A system should be configured with one of multiple families of products. A system should be configured with one of multiple families of products. ABSTRACT FACTORY PATTERN

EVENT Attach(Observer) Detach(Observer) Trigger() ABSTRACT FACTORY PATTERN in SAS Open EventTemp EventBreak EventSmoke Event Sensor Break InThermostatMotion Detector Magnetic SwitchSmoke Sensor Sensor Factory CreateSensor() CreateEvent() Door Sensor Window Sensor

Applicability There must be exactly one instance of a class, and it must be accessible to clients from a well-known access point. There must be exactly one instance of a class, and it must be accessible to clients from a well-known access point. SINGLETON PATTERN

SAS > static getInstance() SINGLETON PATTERN in SAS return myInstance static myInstance