object-oriented programming and design1 object-oriented programming and design ralph johnson...

9
Object-oriented programming and design 1 Object-Oriented Programming and Design Ralph Johnson [email protected]

Upload: shawn-riley

Post on 23-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Object-oriented programming and design 1

Object-Oriented Programming and Design

Ralph Johnson [email protected]

Page 2: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Object-oriented programming and design 2

Goals: to learn

Principles Patterns Practices

“Object think” Frameworks / Design for reuse Reflection - using objects to implement

language

Page 3: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Object-oriented programming and design 3

History of Objects

Simula’67 Smalltalk 72,74,76,78,80 1985 C++ (Objective C, Object Pascal) 1986 OOPSLA 1990 COM, CORBA 1994 Design Patterns 1995 Java 2001 .NET

Page 4: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Object-oriented programming and design 4

Design Principles

Code to an interface rather than to an implementation Encapsulate what varies Open-closed Principle: Classes should be open to

extension and closed to modification Don’t Repeat Yourself (DRY) Single Responsibility Principle Liskov Substitution Principle: Subtypes must be

substitutable for their base types

Page 5: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Object-oriented programming and design 5

Smalltalk

Extreme object-oriented language Live objects Readable library Strong culture Influencial, unknown Fun!

Page 6: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Object-oriented programming and design 6

From Smalltalk

WIMP - Windows, Mice, Pointing Model/View/Controller Browsers CRC cards eXtreme Programming Automated refactoring tools

Page 7: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Smalltalk family tree Smalltalk-80

ObjectWorks ->VisualWorks 1, 2, 3, 5, 7.0-7.6 Squeak

• -> Squeak 4.1• -> Pharo• -> CUIS

Gemstone VisualAge for Smalltalk Smalltalk X, Smalltalk Agents, Dolphin

Object-oriented programming and design 7

Page 8: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Object-oriented programming and design 8

The class First month is Smalltalk Homework, often several per week Second half of the semester is group project Reading and writing patterns

Pharo By Example. Design Patterns Domain-Driven Design

Page 9: Object-oriented programming and design1 Object-Oriented Programming and Design Ralph Johnson rjohnson@illinois.edu

Object-oriented programming and design 9

Before next time

Get Pharo By Example www.pharobyexample.org

Read first three chapters, and follow along with Pharo

Get Pharo http://pharo-project.org Watch “Growing a Language” by Guy

Steele at http://video.google.com/videoplay?docid=-8860158196198824415#