<i>The fact that today we know more than yesterday is good news about today, not bad news about yesterday - Ilja Preuss</i>
Kyle Brown, IBM Fellow, CTO for the IBM CIO Office, Author of Cloud Application Architecture Patterns, The Cloud Adoption Playbook, and many more. See my homepage at http://www.kyle-brown.com/ for the latest updates.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
<i>The fact that today we know more than yesterday is good news about today, not bad news about yesterday - Ilja Preuss</i>
Originally posted by Prasma Kankut:
Thanks Kyle and Ilja (how to pronounce it - Ilja or Ilya?)
See, how many times I have read about polymorphism, but couldn't realize that I can use it here. When will I grow-up? Shame on me
![]()
Is my understaning right or wrong?
#1. Is it okay to create more and more number of classes? Won't it make things complex? (sorry if this sounds silly, but I'm pretty new to OO)
#2. In the initial example, I talked about a single attribute. What if there are many such attributes in a same class?
For example, say there is another attribute validationPeriod.
If validationPeriod is "UNLIMITED",
don't use the endDate.
Else, use both startDate and endDate
Should I follow same suggestion and create another class ValidationType? (See #1 again)
#3. Kyle suggested something about the Strategy pattern. I tried to understand it by searching in Google, but all the examples given there uses Swings. Since I'm not familiar with Swings, I couldn't understand what they are talking about![]()
Could you please explain how to use that pattern in the above example. Feel free to make your assumptions regarding the complete details of the class, if required.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
<i>The fact that today we know more than yesterday is good news about today, not bad news about yesterday - Ilja Preuss</i>
Originally posted by Prasma Kankut:
Ilja Preuss: I am not sure - how do you pronounce Ilya?
In German, Ja is pronounced as Ya, Joern as Yoern and so on. So, I thought your name should be pronounced with the 'J' sounding as 'Y'.
Ilya - Il as in ill and ya as in Yard :roll:
Ilja Preuss: Don't be ashamed - you just grow a little bit again. "The fact that today we know more than yesterday is good news about today, not bad news about yesterday."
Thanks. I got a signature![]()
Ilja Preuss: Right, I think.
You think? :roll:
Does it mean
a) There are many ways to do this. To you it looks ok, but others might think otherwise.
b) You are not sure whether this is the right way to do
c) You can tell for sure, only when you get the overall picture (meaning, there isn't much info to come to a conclusion)?
Ilja Preuss: Not necessarily. In fact, if done right it is a very powerfull technique to decouple your design, and thereby reduce complexity.
Okay. This mis-understaning looks a common problem with many novice. I'm not alone.
And thanks for the links. My Favorites list keeps growing!
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |