How is information hiding different from information shyness - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

How is information hiding different from information shyness

Description:

Shyness: hide a concern (e.g., structure) Protect Against Changes. ... the observation that traditional black-box composition is not restricting enough. ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 10
Provided by: Karl157
Learn more at: http://www.ccs.neu.edu
Category:

less

Transcript and Presenter's Notes

Title: How is information hiding different from information shyness


1
How is information hiding different from
information shyness
  • CACM May 1972 A technique for the specification
    of software modules Hide implementation data
    structures.
  • Later CACM Dec. 1972 Secret design decision
    which a module hides from all the others.
  • Shyness hide a concern (e.g., structure)

2
Protect Against Changes.
  • Protection against changes in data representation
    and interfaces. Traditional technique
    information-hiding is good to protect against
    changes in data representation. Does not help
    with changes to interfaces.
  • Need more than information hiding to protect
    against interface changes restriction through
    shy programming, called Adaptive Programming (AP).

Implementation
Interface
Client
Shy Programming
Representation Independence
Information Hiding
3
Strengthening Information Hiding?
may change in limits
may change
Implementation
Interface
Client
Shy Programming
Representation Independence
Information Hiding
4
Problem with Information Hiding
  • Shy Programming builds on the observation that
    traditional black-box composition is not
    restricting enough. We use the slogan
    information hiding is not hiding enough. Blackbox
    composition isolates the implementation from the
    interface, but does not decouple the interface
    from its clients.

5
Cover unimportant parts of the interface
  • To permit interfaces to evolve, self-discipline
    is required to prevent from programming
    extensively against the interface. Certain parts
    of the interface are best left as if they were
    covered.

Implementation
Interface
Client
Representation Independence
Shy Programming
Information Hiding
6
Shy Programming Adaptive Programming
  • This disciplined programming is referred to as
    shy programming. Shy programming lets the
    program recover from (or adapt to) interface
    changes. Shy programming is also called Adaptive
    Programming (AP). This is similar to the shyness
    metaphor in the Law of Demeter (LoD) structure
    evolves over time, thus communicate with just a
    subset of the visible objects.

7
Decoupling of Interface
  • We summarize the commonalities and differences
    between black-box composition and Shy Programming
    into two principles.
  • Representation-Independence Principle the
    representation of objects can be changed without
    affecting clients.
  • Shy-Programming Principle the interface of
    objects can be changed within certain limits
    without affecting clients.
  • It is important to notice that the
    Shy-Programming Principle builds on top of the
    Black-Box principle.

8
Layers
  • The interface of one layer becomes representation
    for the next layer.

9
are the program (a,b) is the abstraction
axb
Write a Comment
User Comments (0)
About PowerShow.com