Problems of patterns Design patterns can be used as a ... - trese
Problems of patterns Design patterns can be used as a ... - trese
Problems of patterns Design patterns can be used as a ... - trese
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
<strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Methodological problems<br />
Programming problems<br />
Organizational problems<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Method problems<br />
<strong>Design</strong> <strong>patterns</strong> <strong>can</strong> <strong>be</strong> <strong>used</strong> <strong>as</strong> a means<br />
for high-level hacking<br />
These are my<br />
requirements..<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Which design pattern<br />
fits into the<br />
requirement<br />
specification?
<strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Method problems<br />
Integration <strong>of</strong> <strong>patterns</strong> with methods<br />
Methods introduce notation, rules and process,<br />
which <strong>can</strong> <strong>be</strong> applied to analyze and design systems.<br />
How <strong>can</strong> we identify <strong>patterns</strong> using object-oriented<br />
methods?<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Method problems<br />
When and how<br />
<strong>patterns</strong><br />
must <strong>be</strong> identified?<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
The Best<br />
Object-Oriented<br />
Method<br />
Current methods are not pattern-driven<br />
Methods may advise different structures than the<br />
pattern structure:<br />
SubComp<br />
SubComp<br />
Component<br />
SubComp<br />
SubComp<br />
TermComp<br />
analysis design<br />
composite<br />
pattern<br />
SubComp<br />
SubComp SubComp
<strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Method problems<br />
The change <strong>of</strong> context problem<br />
m(.)<br />
analysis design<br />
Different viewpoints may also require different<br />
structures<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
m(.) m(.)<br />
Method problems<br />
Most <strong>patterns</strong> are not generative<br />
How does it<br />
generate?<br />
Alexander:<br />
“..Each (generative) pattern is a rule<br />
which descri<strong>be</strong>s what you have to do to<br />
generate the entity which it defines.”<br />
??<br />
A design pattern
<strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Method problems<br />
Granularity <strong>of</strong> flexibility<br />
Every statement <strong>can</strong> <strong>be</strong> a part object!<br />
Pattern<br />
Machine<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Method problems<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
I just wanted<br />
to send a<br />
message<br />
Excessive num<strong>be</strong>r <strong>of</strong> similar <strong>patterns</strong><br />
Which pattern<br />
is most suitable<br />
for my problem?<br />
I have<br />
so many!<br />
Pattern provider
<strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Method problems<br />
How to Integrate design <strong>patterns</strong> to form<br />
systems <strong>of</strong> <strong>patterns</strong><br />
composite<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Program. problems<br />
observer<br />
mediator<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
iterator<br />
visitor<br />
Most <strong>patterns</strong> emph<strong>as</strong>ize adaptability.<br />
This is only one quality <strong>as</strong>pect!<br />
Multiple <strong>patterns</strong> <strong>can</strong> lead to large clusters <strong>of</strong> mutually<br />
dependent cl<strong>as</strong>ses: this <strong>can</strong> lead to programs that are<br />
difficult to manage<br />
mediator<br />
composite<br />
composite<br />
observer<br />
visitor<br />
iterator
<strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
Program. problems<br />
Recognition <strong>of</strong> <strong>patterns</strong> in programs<br />
With the present implementation style, <strong>patterns</strong> get lost<br />
during program coding: debugging and maintenance<br />
problems <strong>can</strong> <strong>be</strong> experienced in the later ph<strong>as</strong>es;<br />
cl<strong>as</strong>s Employee<br />
inherits from Person;<br />
Methods<br />
address(anAddress)<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
program. problems<br />
inheritance<br />
subtype-supertype<br />
checking<br />
supercl<strong>as</strong>s<br />
subcl<strong>as</strong>s<br />
Expression power<br />
polymorphic<br />
message<br />
p<strong>as</strong>sing<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
What kind <strong>of</strong><br />
pattern is this?<br />
Gamma <strong>patterns</strong> exploit the object-oriented model: they <strong>can</strong><br />
(do) not solve the modeling<br />
problems <strong>of</strong> the objectoriented<br />
model<br />
pattern catalog<br />
encapsulation<br />
objects
<strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
organiz. problems<br />
Supporting <strong>patterns</strong> in the organization<br />
Companies must learn to define,<br />
(re)use and manage their knowledge<br />
in a pattern format!<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
organiz. problems<br />
Patterns need time<br />
© Mehmet Aksit <strong>Problems</strong> <strong>of</strong> <strong>patterns</strong><br />
play with your <strong>patterns</strong><br />
in your own time<br />
Patterns must <strong>be</strong> b<strong>as</strong>ed on experience; to gain experience you<br />
have to apply object-oriented techniques; to apply objectoriented<br />
techniques you must have knowledge; to obtain<br />
knowledge you must have access to design <strong>patterns</strong>; but<br />
<strong>patterns</strong> must <strong>be</strong> b<strong>as</strong>ed on experience...;<br />
my<br />
<strong>patterns</strong>