EDIT: I guess the origin of my writers block in doing something in OO is that I don't really feel like I'm handling real data. I feel like I'm defining and declaring spaces as I see fit, thus leading me down the path of this pseudo/pretend file-system while ignoring the platform I'm really working on. Please prove me wrong.
Ask HN: can you summarize OO for me in 64 words or less?
1–10 of 76 posts
Re: Ask HN: can you summarize OO for me in 64 words or less?
#2How else would you write software with modular and re-usable components?
Re: Ask HN: can you summarize OO for me in 64 words or less?
#3(I'm not trying to sound condescending, so bear with me) How else would you write software with modular and re-usable components?
Re: Ask HN: can you summarize OO for me in 64 words or less?
#4Re: Ask HN: can you summarize OO for me in 64 words or less?
#5^ 64 words.
Re: Ask HN: can you summarize OO for me in 64 words or less?
#6edit: I assumed that the vast majority of languages typically used in web development incorporated some OO features. I'm interested in what is familiar to you; perhaps that will help people describe something that means something to you.
Your question is sort of odd.
Re: Ask HN: can you summarize OO for me in 64 words or less?
#7OO property 2: You've got a cookie cutter and dough. The Cookie Cutter is the constructor, it makes a object the shape of the cookie cutter insides. It looks like the shape of the cookie cutter, it smells like that shape, it _is_ that shape; but it's only really a copy of that. Which is why people have issues with "equals." Equals can refer either to having the same value, or actually being the same object.
There are other really nice analogies (is-a vs has-a and children vs people), but I hope that my analogies make sense to y'all!
EDIT: the above is 181 words, sorry :-(
Re: Ask HN: can you summarize OO for me in 64 words or less?
#8(I'm not trying to sound condescending, so bear with me) How else would you write software with modular and re-usable components?
modular and re-usable components is not really OO specific tho.
But seriously, if you had to write software that abstracts complexity (good), has modular components (good) and let's you attack specific problems one at a time, how would you do it? If you don't think these are worthwhile tenets of software engineering, what are, in your opinion?
Re: Ask HN: can you summarize OO for me in 64 words or less?
#9Take a real world model and simulate it with some OO code in your favorite language.
For instance, model an elevator system in a large apartment complex. Model the buttons, the elevators, the call buttons, the system the decides what elevator goes to which floor, etc. Those are all objects interacting with each other in some form.
You can't hardly screw up. Mastering OO takes many years, so just get out there and starting hacking around.
BTW, you can read all you want about driving a car, but until you sit down in the driver's seat, it isn't going to "click".
Re: Ask HN: can you summarize OO for me in 64 words or less?
#10Bonus analogy:
The web itself is object-oriented. You ask a server to return a resource for a given URL; what server it is (Apache; IIS) and how the content is generated (static page; CGI; PHP) is unnecessary for the conversation.