Chapter 5: Bend or Break.  Write “shy” code.  Limits Visibility  Organize code into modules  Eliminates Unnecessary Interactions  Limit the number.

Slides:



Advertisements
Similar presentations
Executional Architecture
Advertisements

Quality of a Class Abstraction: Coupling & Cohesion Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Structured Design. 2 Design Quality – Simplicity “There are two ways of constructing a software design: One is to make it so simple that there are obviously.
Introduction to push technology © 2009 Research In Motion Limited.
Reza Gorgan Mohammadi AmirKabir University of Technology, Department of Computer Engineering & Information Technology Advanced design.
Slides prepared by Rose Williams, Binghamton University Chapter 17 Swing I.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Module: Definition ● A logical collection of related program entities ● Not necessarily a physical concept, e.g., file, function, class, package ● Often.
Ceng Operating Systems Chapter 2.5 : Threads Process concept  Process scheduling  Interprocess communication  Deadlocks  Threads.
1 Working with Classes Chapter 6. 2 Class definition A class is a collection of data and routines that share a well-defined responsibility or provide.
Oakkar Fall The Need for Decision Engine Automate business processes Implement complex business decision logic Separation of rules and process Business.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
The Design Discipline.
Systems Analysis and Design in a Changing World, Fifth Edition
Workflow Management Chris A. Mattmann OODT Component Working Group.
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
INTRODUCTION TO PROGRAMMING STRUCTURE Chapter 4 1.
1 COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating.
1 CMPT 275 High Level Design Phase Architecture. Janice Regan, Objectives of Design  The design phase takes the results of the requirements analysis.
Surveys on Steroids New Uses for Kinetic Survey  10 years at Kinetic Data  Phone:  Derick Larson.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 1 DATABASE SYSTEMS (Cont’d) Instructor Ms. Arwa Binsaleh.
1 CSBP430 – Database Systems Chapter 1: Databases and Database Users Mamoun Awad College of Information Technology United Arab Emirates University
CSE 303 – Software Design and Architecture
Design Patterns Part two. Structural Patterns Concerned with how classes and objects are composed to form larger structures Concerned with how classes.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
SOFTWARE DESIGN Design Concepts Design is a meaningful engineering representation of something that is to be built It can be traced to a customer’s requirements.
SE: CHAPTER 7 Writing The Program
FlexElink Winter presentation 26 February 2002 Flexible linking (and formatting) management software Hector Sanchez Universitat Jaume I Ing. Informatica.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Coupling & Cohesion CMSC 201- Fall '11. Vocabulary Routine- A programming unit that performs a task, such as a function, procedure, method, or main class.
Coupling Cohesion Chandan R. Rupakheti Steve Chenoweth (Chapter 18)
1 Threads Chapter 11 from the book: Inter-process Communications in Linux: The Nooks & Crannies by John Shapley Gray Publisher: Prentice Hall Pub Date:
Structural Design Patterns
Introduction to Java Beans CIS 421 Web-based Java Programming.
Enterprise Integration Patterns CS3300 Fall 2015.
1 CMPT 275 High Level Design Phase Modularization.
Model View Controller MVC Web Software Architecture.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
OO Methodology Elaboration Iteration 2 - Design Patterns -
Designing Classes. Software changes Software is not like a novel that is written once and then remains unchanged. Software is extended, corrected, maintained,
Slide 1 ApacheCon 2011 > Doreen Seider> Using OSGi to Build Better Software > Using OSGi to Build Better Software Lessons from a Telemedicine.
1 Chapter 2.5 : Threads Process concept  Process concept  Process scheduling  Process scheduling  Interprocess communication  Interprocess communication.
Introduction to Object-Oriented Programming Lesson 2.
Or how to work smarter when building solutions.  2:30 – 3:30 Mondays – focus on problem solving (with some terminology thrown in upon occasion)  All.
Lecture 4 Page 1 CS 111 Online Modularity and Virtualization CS 111 On-Line MS Program Operating Systems Peter Reiher.
Lecture VIII: Software Architecture
Ted Faison - GSAW Indefinitely Evolvable Architectures: Event-Based Systems Ted Faison Faison Computing Inc.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Functions in C++ Top Down Design with Functions. Top-down Design Big picture first broken down into smaller pieces.
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
The Observer Design Pattern Author :Erich Gamma, et al. Source :Elements of Reusable Object-Oriented Software Speaker : Chiao-Ping Chang Advisor : Ku-Yaw.
LECTURE 19 Subroutines and Parameter Passing. ABSTRACTION Recall: Abstraction is the process by which we can hide larger or more complex code fragments.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
Lecture 1 Page 1 CS 111 Summer 2013 Important OS Properties For real operating systems built and used by real people Differs depending on who you are talking.
The Structuring of Systems Using Upcalls By David D. Clark Presented by Samuel Moffatt.
Modularity Most useful abstractions an OS wants to offer can’t be directly realized by hardware Modularity is one technique the OS uses to provide better.
Copyright © Jim Fawcett Spring 2017
Observer Design Pattern
What is an Architecture?
C# Event Processing Model
Introduction and Overview
What is an Architecture?
TECHNICAL PAPER PRESENTATION By: Srihitha Yerabaka
Presentation transcript:

Chapter 5: Bend or Break

 Write “shy” code.  Limits Visibility  Organize code into modules  Eliminates Unnecessary Interactions  Limit the number of calls to other modules

 “We do not want the object to give us a third-party object that we have to deal with to get the required service”  When we need a service it should be preformed on our behalf.  Bad: public void plotDate(Date aDate, Selection aSelection) { TimeZone tz = aSelection.getRecorder().getLocation().getTimeZone();... }  Good: public void plotDate(Date aDate, TimeZone aTz) {... } plotDate(someDate, someSelection.getTimeZone());

 In large projects, the command linking a unit test is longer than the unit test.  “Simple” Changes to one module propagate through unrelated modules.  The developers are afraid to change code because they aren't sure what will be affected.

 Any method of an object should only call methods belonging to:  Itself  Parameters passed to it  Object it created  Directly held component objects (c.print();) ‏

 Changes to details cause problems  So: Get the details out of the code!

 Tip: Configure, don’t integrate.  Use metadata to get configuration data OUT of the code body.

 “Data about data”  Any data that describes the application  Generally, used at runtime  Examples  Windows.ini files  X11

 Program for the general case  Keep specifics outside the main code base  Many benefits*  Leave the details out, so easier to change

 Application:  Find what changes most, and attempt to code your program in such a way that you can change the metadata to adapt.  Don’t write dodo code

This isTemporalCoupling Decouple temporally by allowing for concurrency Standard CouplingContent

 Analyze workflow for concurrency  You already do it normally  Design using services  Independent  Concurrent  Consistent interfaces

 Taking advantage of temporal decoupling makes programs easier to write.  Use queues to decouple tasks.  Multiple threads can feed off the queues.  The hungry consumer model replaces the central scheduler with multiple independent consumer tasks

 Always design for Concurrency  Considering time ordered can lead to cleaner and more maintainable interfaces.  Promotes interfaces without bugs and surprises.

 Modules accomplish well-defined responsibilities  Once those are created, how will they communicate?  Events signal other modules that “something interesting happens.”

 Objects should only receive events they need  There should only be one publisher to send events.  Subscribers need only to register with the publisher to receive event notifications.

 Separate views from models.  Provides flexibility  Allows from non traditional multiple controllers.  Model. Abstract data model representing the target object.  View. It Subscribes to changes in the model and logical events from the controller.  Controller. A way to control the view and provide the model with new data. It publishes events to the model and view.

 Listeners and event generators still have some knowledge of each other: They must agree on common interface definitions.  There even more are ways of reducing coupling.  Web applications

 Shared memory space  Originally intended for AI systems  Allows for a totally decoupled system  Content coupling  Temporal coupling  Single, consistent interface