+ All Categories
Home > Documents > Design Patterns I - mathcs.emory.edu · Design Patterns I Encapsulation,Observer,andDecorator...

Design Patterns I - mathcs.emory.edu · Design Patterns I Encapsulation,Observer,andDecorator...

Date post: 13-Nov-2018
Category:
Upload: voxuyen
View: 217 times
Download: 0 times
Share this document with a friend
35
Design Patterns I Encapsulation, Observer, and Decorator CS 370 SE Practicum, Cengiz Günay (Some slides courtesy of Eugene Agichtein and the Internets) CS 370, Günay (Emory) Design Patterns I Spring 2014 1/9
Transcript

Design Patterns IEncapsulation, Observer, and Decorator

CS 370 SE Practicum, Cengiz Günay

(Some slides courtesy of Eugene Agichtein and the Internets)

CS 370, Günay (Emory) Design Patterns I Spring 2014 1 / 9

Agenda

Upcoming project milestones:

Today: setup a meeting with Bob to get help about your progress4/3 get ready to deploy!4/10 in-class demo and functional prototype opens for testing

Today:

Some design patterns you can use. . .

CS 370, Günay (Emory) Design Patterns I Spring 2014 2 / 9

Agenda

Upcoming project milestones:

Today: setup a meeting with Bob to get help about your progress4/3 get ready to deploy!4/10 in-class demo and functional prototype opens for testing

Today:

Some design patterns you can use. . .

CS 370, Günay (Emory) Design Patterns I Spring 2014 2 / 9

Patterns in Software Engineering

Don’t reinvent the wheel!Re-use existing patterns!

CS 370, Günay (Emory) Design Patterns I Spring 2014 3 / 9

Patterns in Software Engineering

Don’t reinvent the wheel!Re-use existing patterns!

CS 370, Günay (Emory) Design Patterns I Spring 2014 3 / 9

Entry/Exit Surveys

Exit survey: Version controlWhat’s the difference between centralized and distributed VCs? Whichone is better and why?Does version control help you recover from a situation where youdeleted some files by mistake? If so, explain how.

Entry survey: Design PatternsHow do you design software? What are some components that needdesigning in your project?What kind of patterns can be reused during the design of yourproject? If possible, give some examples.

CS 370, Günay (Emory) Design Patterns I Spring 2014 4 / 9

UML Cont'd: Use Cases & Stories

• Sequence diagrams:• http://www.uml-diagrams.org/sequence-diagrams-examples.html

• Use case diagrams:http://www.agilemodeling.com/artifacts/useCaseDiagram.htm

• Use case tips: http://www.andrew.cmu.edu/course/90-754/umlucdfaq.html

Example: SimUDuck

Recap: Strategy Pattern

Your class hierarchies?

Need some volunteersTell us about your project classes:

1 Uses inheritance for what?2 Would encapsulation be useful?

CS 370, Günay (Emory) Design Patterns I Spring 2014 6 / 9

Your class hierarchies?

Need some volunteersTell us about your project classes:

1 Uses inheritance for what?

2 Would encapsulation be useful?

CS 370, Günay (Emory) Design Patterns I Spring 2014 6 / 9

Your class hierarchies?

Need some volunteersTell us about your project classes:

1 Uses inheritance for what?2 Would encapsulation be useful?

CS 370, Günay (Emory) Design Patterns I Spring 2014 6 / 9

Example of the observer pattern!

Example of the observer pattern!

Observer Pattern

Observer Pattern

Observer Pattern

Observer Pattern Defined

Java Observable

Observer pattern in your project?

Can you think of a place that will be useful in your project?

I User notificationI LikesI Button press in games

CS 370, Günay (Emory) Design Patterns I Spring 2014 8 / 9

Observer pattern in your project?

Can you think of a place that will be useful in your project?I User notificationI LikesI Button press in games

CS 370, Günay (Emory) Design Patterns I Spring 2014 8 / 9

Decorator Pattern

Next week

Scrum now!Next week: Javascript

CS 370, Günay (Emory) Design Patterns I Spring 2014 9 / 9


Recommended