Computer Science 313 – Advanced Programming Topics.

Slides:



Advertisements
Similar presentations
Chapter 6 Writing a Program
Advertisements

Computer Science 313 – Advanced Programming Topics.
Arthur Fink Page 1 Notes on Designing User Interfaces for OpenEdge GUI for.NET Arthur Fink Arthur Fink Consulting © 2008 by Arthur Fink.
Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott.
Computer Science 313 – Advanced Programming Topics.
March R McFadyen1 Architecture Architecture involves the set of significant decisions about the organization of a software system, decisions.
Arthur Fink Page 1 Thinking about User Interface Design for OpenEdge GUI for.NET (or any other environment) by Arthur Fink
INTERPRETER Main Topics What is an Interpreter. Why should we learn about them.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
Patterns – Day 8 Adapter continued Facade Reminders: Faculty candidate talk Friday 4:20 PM O-267. Brian Postow: Games and Complexity Theory No class tomorrow.
Bridge The decoupling of abstraction and implementation.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Façade Pattern Jeff Schott CS590L Spring What is a façade? 1) The principal face or front of a building 2) A false, superficial, or artificial appearance.
Winter 2011ACS Ron McFadyen1 Façade A façade simplifies access to a related set of objects by providing one object that all objects outside the.
EGR 2201 Unit 7 Operational Amplifiers
Prototype Creational Design Pattern By Brian Cavanaugh September 22, 2003 Software, Design and Documentation.
Façade Design Pattern Source: Design Patterns – Elements of Reusable Object- Oriented Software; Gamma, et. al.
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
March R McFadyen1 Figure 30.2 Layers in NextGen They only have three layers in this architecture Each layer is shown as a UML Package No separate.
Computer Science 240 Principles of Software Design.
Computer Science 313 – Advanced Programming Topics.
1 Design and Integration: Part 1 Nuggets about Design vs Project Management.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Study Guide for Final Exam What Smart Students Know.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
Computer Science 313 – Advanced Programming Topics.
Prof. Hertz (as told by xkcd.com)‏. Computer Science 313 – Advanced Programming Topics.
Albert Einstein Two things are infinite: the universe & human stupidity; and I'm not sure about the universe.
CSC 313 – Advanced Programming Topics. Design Pattern Intent  Each design pattern is a tool  Like all tools, have reason for being.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
Question of the Day  On a game show you’re given the choice of three doors: Behind one door is a car; behind the others, goats. After you pick a door,
The Adapter Pattern SE-2811 Dr. Mark L. Hornick 1.
SE: CHAPTER 7 Writing The Program
Computer Science 313 – Advanced Programming Topics.
Facade Introduction. Intent Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the.
CSC 313 – Advanced Programming Topics. Decorator Pattern Intent.
CSC 395 – Software Engineering Lecture 14: Object-Oriented Analysis –or– Ripping the Band-Aid Off Quickly.
1 CMPT 275 High Level Design Phase Modularization.
CSC 313 – Advanced Programming Topics. What Is the Factory Method?  Creation details hidden by AbstractCreator  Does effective job of limiting concrete.
Week 9, Class 3: Model-View-Controller Today Happens-Before Adapter and Façade Pattern (high-level) Tuesday: Project code due, 11pm Wednesday: Quiz Choose.
Teaching Science with Interactive Notebooks. What are Interactive Science Notebooks? A thinking tool A place for students to organize what they have learned.
Software Design Patterns Curtsy: Fahad Hassan (TxLabs)
More Design Patterns From: Shalloway & Trott, Design Patterns Explained, 2 nd ed.
Software Design Chapter 11. Purposes of Design Design transforms the specification into a design. The end purpose of the design is to produce detail and.
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
Adapter and Façade Patterns By Wode Ni and Leonard Bacon-Shone.
Watching the movie the hard way…. Page 256 – Head First Design Patterns.
UML – What’s all the Fuss about? Simon Horwith CTO Etrilogy Ltd.
Bjarne Stroustrup I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my.
CS 350 – Software Design The Facade Pattern – Chapter 6 Many design patterns are catalogued in the “Gang of Four” text. I find their definitions not to.
Computer Science 313 – Advanced Programming Topics.
Dillon: CSE470: ANALYSIS1 Requirements l Specify functionality »model objects and resources »model behavior l Specify data interfaces »type, quantity,
Presented by FACADE PATTERN
Algorithms and Problem Solving
Slide design: Dr. Mark L. Hornick
Design Pattern: Facade
Unified Modeling Language
Advanced Compilers CMPSCI 710 Spring 2003 Lecture 1
Decorator Design Pattern
Figure 30.2 Layers in NextGen
Object Oriented Design Patterns - Structural Patterns
Why Object-oriented Programming?
Algorithms and Problem Solving
Software Design Principles
10. Façade Pattern SE2811 Software Component Design
defines a higher-level interface that makes a subsystem easier to use
Presentation transcript:

Computer Science 313 – Advanced Programming Topics

“In a Nutshell”  Commonly used English expression  Means “in a few words” or “briefly”  Summarizing idea with many details left out

“In a Nutshell”  Commonly used English expression  Means “in a few words” or “briefly”  Summarizing idea with many details left out I could be bounded in a nutshell, and count my selfe a King of infinite space.

“In a Nutshell”  Usage can be traced back to 1608  Even before Hamlet used it  Meaning has not changed in 400 years  Also became a verb in that time  “To nutshell” popularized by Mark Twain  Any questions about what it means?

“In a Nutshell”  Usage can be traced back to 1608  Even before Hamlet used it  Meaning has not changed in 400 years  Also became a verb in that time  “To nutshell” popularized by Mark Twain  Any questions about what it means?  W ILL SOMEONE EXPLAIN THIS TO O’R EILLY !

Big Picture for Façade  Provide simple interface to low-level functions  Create single class defining simple methods  May combine functionality of multiple instances  Façade makes client easier to write & use  Packages tricky parts into simple method(s)  Allows client to avoid working with many instances  Nothing should change in lower level classes hidden  Using the façade complex subsystem hidden usable  But still usable without going through façade

Real-Life is Hard  Real life is full of complex ideas & concepts  Filling out your tax forms every April  Rules for holding in (American) football  Explaining why the sky is blue  Appeal of soccer to billions worldwide

Real-Life is Hard  Often rely on simplicities to understand these  Filling out your tax forms every April “Politician got bribe contribution to create deduction”  Rules for holding in (American) football “Stay within the shoulder pads & don’t get caught”  Explaining why the sky is blue “Wavelengths not scattered by the atmosphere”  Appeal of soccer to billions worldwide “Excuse to drink beer & occasionally riot”

Real-Life Façade  Compiler is (real-life) example of façade  Typically we think of compiler as single system  Many complex systems combine to make compiler  Code divided into tokens by the parser  Lexigraphical analyzer computes tokens’ meanings  Analysis improved & simplified by optimizer  Code generator lowers & outputs result  Even so, many of these systems also façades:  Loop analyzer, SSA transform, peepholer in optimizer

Façades On Computers

Façade We Regularly Use  Usually do all interactions via simple interface  javac foo.java compiles class named foo  But can also access components directly  final & volatile provide details to optimizer  Can get instance of javax.tools.JavaCompiler

Façade We Regularly Use  Compilation easy because of this façade  Façade simplifies & allows messing with internals  All skill levels helped using the compiler  Beginner javac foo.java  Expert javac –g:none foo.java  Stupid javac –nowarn –Xprint foo.java

Façade versus Adapter  Façade and Adapter patterns very similar  Enable simplifying code to be used by client  Both patterns effectively hide subsystem details  1 or more instances behind exposed interface may/may not  Idealized UML class diagram may/may not differ  “What is the difference?” should be asked

Intent Crucial to Usage  Adapter makes existing code use interface  Original implementation hidden by pattern  Lets client code think class written for interface  Adapts existing code so it can work in other places  Façade used to create interface to use system  Original implementation hidden by pattern  Lets client write code as if design has simple interface  Provides a false front for use in another system

Clients of Façade & Adapter

Using Façade & Adapter FaçadeAdapter Yams \ Sweet Potatoes

Using Façade & Adapter FaçadeAdapter Yams Sweet Potatoes \ Sweet Potatoes Yams

Kissing Cousins of Patterns  Adapter & Façade also close to Decorator  Structural patterns that help simplify client code  Within each pattern, hide implementation details  Workings invisible to those outside pattern  Decorator has some important differences  Decorations invisible; adapter & façade not  Decorator requires specific class relationships  Interface unchanged by decorator pattern

For Next Class  Lab #6 due in one week  Do not leave labs to last second  Read pages 265 – 275 for Friday  What is the Principle of Least Knowledge?  How much of class already follows this principle?  What is the Law of Demeter?  Can we quantify this principle?