Design Patterns Summer Course 2009-2010 - Session#1
-
Upload
muhamad-hesham -
Category
Technology
-
view
461 -
download
0
description
Transcript of Design Patterns Summer Course 2009-2010 - Session#1
![Page 1: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/1.jpg)
![Page 2: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/2.jpg)
Session # 1Ahmed Safwat
Muhamad HeshamAbdelrahman Al-Ogail
![Page 3: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/3.jpg)
Where are we? Someone has already solved your problems! History of design patterns. Why design patterns? How to start ? Road Map. Introduction to session’s project. Why all of this?
![Page 4: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/4.jpg)
Where are we
Start
• A small program to save customer information on MS DOS
Last Decade
• Each Bank has a system connected to the internet so that you can access your account from any branch
Now
• A full automation banking all around the world with secure payments over the internet, trading in stock markets, money withdrawal from any ATM in the world
Software Scale and Size
![Page 5: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/5.jpg)
Where are we
“While component technology was a great framework for reuse, Developers didn’t put the effort into making sure the components themselves were actually designer for reuse”MS Architecture Journal Motivation
Service Based Computing {SOA}
![Page 6: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/6.jpg)
Where are we
Global architecture
Enterprise architecture
System architecture
Application architecture
Macro-architecture
Micro-architecture
Objects
The seven layers of architecture
ORB
OO architecture
Frameworks
Subsystem
Design patterns
OO programming
![Page 7: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/7.jpg)
Where are we
1. Make sure your software does what
customer wants it to do
Great Software
![Page 8: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/8.jpg)
Where are we
1. Make sure your software does what
customer wants it to do
Great Software
2. Apply basic OO princibles to add
more flexibility
![Page 9: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/9.jpg)
Where are we
1. Make sure your software does what
customer wants it to do
Great Software
2. Apply basic OO princibles to add
more flexibility
3. Strive for maintainability and
reusable design
![Page 10: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/10.jpg)
What is Design Patterns
•Pattern: A solution to a problem in a context.
•Well-structured object-oriented systems have recurring patterns ofclasses and objects
• old men always know a solution
Problem
Context
Forces
Solution
Benefits Related patterns consequences
Someone has already solved your problems
![Page 11: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/11.jpg)
1987 - Cunningham and Beck used Alexander’s ideas to develop a small pattern language for Smalltalk
1990 - The Gang of Four (Gamma, Helm, Johnson and Vlissides) begin work compiling a catalog of design patterns
1991 - Bruce Anderson gives first Patterns Workshop at OOPSLA
1993 - Kent Beck and Grady Booch sponsor the first meeting of what is now known as the Hillside Group
1994 - First Pattern Languages of Programs (PLoP) conference
1995 - The Gang of Four (GoF) publish the Design Patterns book
![Page 12: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/12.jpg)
Why Design Patterns? Job Requirements
![Page 13: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/13.jpg)
Why Design Patterns
•"Designing object-oriented software is hard and designing reusable object-oriented software is even harder." - Erich Gamma
•Knowledge of the patterns that have worked in the past allows a designer to be more productive and the resulting designs to be more flexible and reusable
This can be you
Run successful projects
Is willing to teach others
Has the respect of her
peers
Is an important part of the
development community
Earn A lot of money
This Can Be YOU
![Page 14: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/14.jpg)
How does it work?
![Page 15: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/15.jpg)
How does it work?
Here is my game. Change the game theme Here is the game assets. I will come by tommorow.
![Page 16: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/16.jpg)
Who Wins ?
VS
![Page 17: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/17.jpg)
He won
Abdelrahman wins
But …………….2al by2oly
design patterns
![Page 18: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/18.jpg)
Guess what?
“The one constant in software development”
![Page 19: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/19.jpg)
Guess what?
“The one constant in software development”
CHANGE
![Page 20: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/20.jpg)
Never Stop Changing his mind
My sons likes different themes.
My sons want to be able to change theme while playing.
Change it Today.
Our Clients
![Page 21: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/21.jpg)
AGAIN
VS
![Page 22: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/22.jpg)
Who wins
MEEEEEEEEEEEEEEEEE
![Page 23: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/23.jpg)
Conclusion
Zikas MuhamadWhy did I win ?• Genius ?
• Super speed writer ?
• Teneeen ?!
![Page 24: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/24.jpg)
How to start?
Acceptance Recognition Initialization
there is a slow induction period after we’ve read about a pattern followed by the proverbial “Aha!” when we see how we can apply them in our work
![Page 25: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/25.jpg)
Road Map
How to read patterns?
Classifications pattern
Some GOF patterns Factory. Singleton. Adapter. Façade. Command. Observer. State. Mediator. Composite.
We’ll Study:
1. Factory.
2. Singleton.
3. Observer.
4. State.
Our Sessions Content
![Page 26: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/26.jpg)
Road Map
We’ve non-patterned feature. CHANGE. Let’s Google it. Pattern it! CHANGE. Conclusion. Break. Pattern details.
Session’s Approach
![Page 27: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/27.jpg)
Session’s Project
Learning through Game Programming
Why Game Programming ?
![Page 28: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/28.jpg)
Session’s Project
Learning through Game Programming
Why Game Programming ?
1.Fun & Interesting
OOD & Design patterns in action
![Page 29: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/29.jpg)
Session’s Project Platformer Skeleton
Main Actors • Level• Player• Enemy• Gem
![Page 30: Design Patterns Summer Course 2009-2010 - Session#1](https://reader034.fdocuments.us/reader034/viewer/2022051610/5484e099b47959050d8b4d16/html5/thumbnails/30.jpg)
Finally
Where are our scientists? HF & DS authors. Taha & Elmasri. Previous:
▪ Algorithm, Algebra, 1,2,3, Camera, NASA.
Hospital. Nueclar scientist. Stat.
What about efforts? Thomas Edison. Reading books. Ebn Makhld. Quotes.
“No pain, no gain”Anonymous.
”ال ُيستطاع العلم براحة الجسم“يحى بن كثير
“My inventions comes from 2% inspiration and 98% of efforts”Thomas Edison.
“Science is what we understand well enough to explain to a computer. Art is everything else we do”Donald Knuth.
Why all of this?