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.
Design Patterns Copyright © Vyacheslav Mukhortov, Nikita Nyanchuk-Tatarskiy, Copyright © INTEKS LLC,
March Ron McFadyen1 Design Patterns In software engineering, a design pattern is a generally repeatable solution to a commonly-occurring problem.
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.
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,
Chapter 26 Applying Gang of Four Design Patterns 1CS6359 Fall 2012 John Cole.
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.
Design Pattern. The Observer Pattern The Observer Pattern defines a one-to-many dependency between objects so that when one object changes state, all.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
GoF Design Patterns (Ch. 26). GoF Design Patterns Adapter Factory Singleton Strategy Composite Façade Observer (Publish-Subscribe)
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Computing IV Singleton Pattern Xinwen Fu.
Object Oriented Software Engineering Chapter 16 and 17 review 2014/06/03.
GoF: Document Editor Example Rebecca Miller-Webster.
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.
CSC 480 Software Engineering Design With Patterns.
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.
Manali Joshi1 The Observer Design Pattern Presented By: Manali Joshi.
CS 210 Final Review November 28, CS 210 Adapter Pattern.
Using Software Design Patterns Bill Anderson. About me Fox developer since 1987 Fox developer since 1987 Program Director, Los Angeles Visual Foxpro Developers.
BEHAVIORAL PATTERNS 13-Sep-2012 Presenters Sanjeeb Kumar Nanda & Shankar Gogada.
CS212: Object Oriented Analysis and Design Lecture 39: Design Pattern-III.
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:
Five Minute Design Patterns Doug Marttila Forest and the Trees May 30, 2009 Template Factory Singleton Iterator Adapter Façade Observer Command Strategy.
Overview of Creational Patterns ©SoftMoore ConsultingSlide 1.
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.
Review of last class. Design patterns CreationalStructuralBehavioral Abstract Factory Builder Factory Singleton etc. Adapter Bridge Composite Decorator.
Patterns in programming
MPCS – Advanced java Programming
Gang of Four’s Design Patterns for Microservices
Common Design Patterns
Singleton Pattern Command Pattern
object oriented Principles of software design
Presented by Igor Ivković
Design Patterns in Operating Systems
GoF Design Patterns (Ch. 26). GoF Design Patterns Adapter Factory Singleton Strategy Composite Façade Observer (Publish-Subscribe)
Design Patterns - A few examples
Advanced Programming Behnam Hatami Fall 2017.
Design Patterns in Game Design
Chapter 9 Behavioral Design Patterns
The iterator and memento patterns
Design Patterns Difficult to describe abstractly Elements:
GoF Design Patterns (Ch. 26)
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

Observable 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.

ITERATOR PATTERN

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 which objects they are. When an object should be able to notify other objects without making assumptions about which objects they 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