473,714 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is/is not considered to be good OO programming

Several months ago I started a thread with the title "What is/is not
considered to be good OO programming" which started a long and
interesting discussion.

I have condensed the arguments into a single article which can be
viewed at
http://www.tonymarston.net/php-mysql/good-bad-oop.html

I fully expect this to be the start of another flame war, so sharpen
your knives and get stuck in!

Tony (you do it your way and I'll do it better) Marston
http://www.tonymarston.net/
Jul 17 '05 #1
52 6428
On 3 Dec 2003 05:30:25 -0800, to**@marston-home.demon.co.u k (Tony
Marston) wrote:
Several months ago I started a thread with the title "What is/is not
considered to be good OO programming" which started a long and
interesting discussion.

I have condensed the arguments into a single article which can be
viewed at
http://www.tonymarston.net/php-mysql/good-bad-oop.html


Thats great. I'll be reading it after my holiday and possibly contact
you by email, if you don't mind.

Jochen
--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #2
Tony Marston wrote:
Several months ago I started a thread with the title "What is/is not
considered to be good OO programming" which started a long and
interesting discussion.

I have condensed the arguments into a single article which can be
viewed at
http://www.tonymarston.net/php-mysql/good-bad-oop.html

I fully expect this to be the start of another flame war, so sharpen
your knives and get stuck in!

Tony (you do it your way and I'll do it better) Marston
http://www.tonymarston.net/


Hey that's a really well written (or put together) document. I'll be
saving that for good use.

Jul 17 '05 #3
Tony Marston:
Several months ago I started a thread with the title "What is/is not
considered to be good OO programming" which started a long and
interesting discussion.

I have condensed the arguments into a single article which can be
viewed at
http://www.tonymarston.net/php-mysql/good-bad-oop.html

I fully expect this to be the start of another flame war, so sharpen
your knives and get stuck in!

Tony (you do it your way and I'll do it better) Marston
http://www.tonymarston.net/


I just think it's funny that you still don't understand object composition.
In your article you write: "How do you share code in OO systems? Through
inheritance.", not even mentioning object composition. Object composition
was also the crux of my argument, i.e.: where you see only inheritance, I
see inheritance and composition. From this we can only deduce that you in
fact did not properly understand my argument. That doesn't make the
discussion any easier.

But then again, most beginners in OOP face this particular problem, they
overuse inheritance because that's usually the first thing they learn, and
once they get the hang of it, they won't let go.

André næss
Jul 17 '05 #4
André Næss wrote:
Tony Marston:

I have condensed the arguments into a single article which can be
viewed at
http://www.tonymarston.net/php-mysql/good-bad-oop.html


I just think it's funny that you still don't understand object
composition. In your article you write: "How do you share code in OO
systems? Through inheritance.", not even mentioning object
composition. Object composition was also the crux of my argument,
i.e.: where you see only inheritance, I see inheritance and
composition. From this we can only deduce that you in fact did not
properly understand my argument. That doesn't make the discussion any
easier.


I was thinking the same. I saw the article, looked for "compositio n",
couldn't find it, and went away.

--
Google Blogoscoped
http://blog.outer-court.com
Jul 17 '05 #5
André Næss <an************ *********@ifi.u io.no> wrote in message news:<bq******* ***@maud.ifi.ui o.no>...
Tony Marston:
Several months ago I started a thread with the title "What is/is not
considered to be good OO programming" which started a long and
interesting discussion.

I have condensed the arguments into a single article which can be
viewed at
http://www.tonymarston.net/php-mysql/good-bad-oop.html

I fully expect this to be the start of another flame war, so sharpen
your knives and get stuck in!

Tony (you do it your way and I'll do it better) Marston
http://www.tonymarston.net/
I just think it's funny that you still don't understand object composition.
In your article you write: "How do you share code in OO systems? Through
inheritance.", not even mentioning object composition.


Because I have looked at definitions and examples of object
composition and deduced that it would serve no useful purpose in my
infrastructure.

To quote one reference: http://www.eagle-software.com/object.htm

"Object composition allows you to group components together, creating
a new component."

I do not see where I can use this technique, or what advantage it
would bring, therefore I am not going to waste any time on it.

To quote another reference:
http://brighton.ncsa.uiuc.edu/~prajlich/T/node14.html

"The disadvantage of object composition is that the behavior of the
system may be harder to understand just by looking at the source code.
A system using object composition may be very dynamic in nature so it
may require running the system to get a deeper understanding of how
the different objects cooperate."

As I do not like writing complicated software that is difficult to
understand this whole idea sounds like a no-no to me. I prefer to
follow the KISS principle.

From the same article:

"Most designers overuse inheritance, resulting in large inheritance
hierarchies that can become hard to deal with."

If you look at my code you will see that I do not have a large
inheritance hierarchy. I have just one superclass and one layer of
subclass, therefore you cannot say that I am overusing inheritance.

Object composition
was also the crux of my argument, i.e.: where you see only inheritance, I
see inheritance and composition. From this we can only deduce that you in
fact did not properly understand my argument.
You argument is irrelevant as it serves no useful purpose when
discussing a single abstract class.

Tony Marston
http://www.tonymarston.net/
That doesn't make the discussion any easier. But then again, most beginners
in OOP face this particular problem, they overuse inheritance because that's
usually the first thing they learn, and once they get the hang of it, they
won't let go.

André næss

Jul 17 '05 #6
"Philipp Lenssen" <in**@outer-court.com> wrote in message news:<bq******* ******@ID-203055.news.uni-berlin.de>...
André Næss wrote:
Tony Marston:


I have condensed the arguments into a single article which can be
viewed at
http://www.tonymarston.net/php-mysql/good-bad-oop.html


I just think it's funny that you still don't understand object
composition. In your article you write: "How do you share code in OO
systems? Through inheritance.", not even mentioning object
composition. Object composition was also the crux of my argument,
i.e.: where you see only inheritance, I see inheritance and
composition. From this we can only deduce that you in fact did not
properly understand my argument. That doesn't make the discussion any
easier.


I was thinking the same. I saw the article, looked for "compositio n",
couldn't find it, and went away.


Just for you I have added a section on object composition. I hope you like it.

http://www.tonymarston.net/php-mysql...tml#2003-12-05

Kiss, kiss

Tony Marston
http://www.tonymarston.net/
Jul 17 '05 #7
Tony Marston:
Object composition
was also the crux of my argument, i.e.: where you see only inheritance, I
see inheritance and composition. From this we can only deduce that you in
fact did not properly understand my argument.


You argument is irrelevant as it serves no useful purpose when
discussing a single abstract class.


I wasn't discussing a single abstract class. I was discussing a solution to
a problem. The single abstract class and proliferation of new classes is
*your* solution. I tried to argue that a different, and IMO better approach
was possible. You didn't bother to learn about object composition until
*now*, yet you disagreed with my idea of using it in your case. In other
words, you had decided that your solution *is* the best even before you
started the discussion, despite the fact that you did not know much about
OO.

André Næss
Jul 17 '05 #8
"Tony Marston" <to**@marston-home.demon.co.u k> wrote in message
news:75******** *************** ***@posting.goo gle.com...
"Philipp Lenssen" <in**@outer-court.com> wrote in message news:<bq******* ******@ID-203055.news.uni-berlin.de>...
André Næss wrote:
Tony Marston:

>
> I have condensed the arguments into a single article which can be
> viewed at
> http://www.tonymarston.net/php-mysql/good-bad-oop.html
>


I just think it's funny that you still don't understand object
composition. In your article you write: "How do you share code in OO
systems? Through inheritance.", not even mentioning object
composition. Object composition was also the crux of my argument,
i.e.: where you see only inheritance, I see inheritance and
composition. From this we can only deduce that you in fact did not
properly understand my argument. That doesn't make the discussion any
easier.


I was thinking the same. I saw the article, looked for "compositio n",
couldn't find it, and went away.


Just for you I have added a section on object composition. I hope you like

it.
http://www.tonymarston.net/php-mysql...tml#2003-12-05

Kiss, kiss

Tony Marston
http://www.tonymarston.net/


Tony,
A trifle defensive <grin>, but wholly correct. As another 25+ programmer, I
can state without too much fear of contradiction that the customer pays me
to solve his problem, not to write code which meets the approval of the
paradigm police.
More power to you, you rabid radical you!
Cheers,
Doug Hutcheson
Jul 17 '05 #9
Doug Hutcheson wrote:
"Tony Marston" <to**@marston-home.demon.co.u k> wrote in message
news:75******** *************** ***@posting.goo gle.com...
<snip>

http://www.tonymarston.net/php-mysql...tml#2003-12-05


<snip>
Tony,
A trifle defensive <grin>, but wholly correct. As another 25+ programmer,
I can state without too much fear of contradiction that the customer pays
me to solve his problem, not to write code which meets the approval of the
paradigm police.
More power to you, you rabid radical you!
Cheers,
Doug Hutcheson


Wow, it's come back to life again!

Asbestos manufacturers everywhere must be looking forwards
to this one!

;p

Matt
Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
2814
by: darwinist | last post by:
What PHP Represents There is no shortage of complaints one could make about php as a language, and although the list does shrink with each release, some of them are inherent to the origins and development process of this, the most popular of the web-based, server-side, glue-languages. That said, most descriptions of what is good about php, fail to do it justice. Although they are generally enthusiastic and sometimes fanatical, no...
65
5372
by: perseus | last post by:
I think that everyone who told me that my question is irrelevant, in particular Mr. David White, is being absolutely ridiculous. Obviously, most of you up here behave like the owners of the C++ language. A C++ interface installation IS ABOUT THE C++ LANGUAGE! The language does not possess the ability to handle even simple file directory manipulation. Those wise people that created it did not take care of it. So, BOOST is a portable...
125
14779
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
8
4049
by: Hermawih | last post by:
Hello , I want your opinion about this . In order to say it clearly , I think I have to describe it in long sentences . I could consider myself as Intermediate/Advance Access Developer ; Intermediate/Advanced Database designer . Because of the requirements , I must create Web Application . Access Pages is not suitable for that so I think about learning VB Net / ASP Net . I am
28
2720
by: Vishal Naidu | last post by:
i m new to the C world... i ve been told by my instructors not to use goto stmt.. but no one could give me a satisfactory answer as to why it is so.. plz help me out of this dilemma, coz i use a lot of goto in my codes....
669
26007
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic paper written on this subject. On the Expressive Power of Programming Languages, by Matthias Felleisen, 1990. http://www.ccs.neu.edu/home/cobbe/pl-seminar-jr/notes/2003-sep-26/expressive-slides.pdf
6
2550
by: TB | last post by:
Hi Everyone on comp.lang.c++: I am thinking about learning a programming language and I want to decide whether it is worthwhile spending my time learning the C++ programming language. I am a starting C++ programmer. By that I mean that I have written one small application in C++ on a real job that required some modular programming. I am also familiar with the Object-Oriented Programming techniques although I haven't used them...
8
2004
by: clintonG | last post by:
Every single time neophytes or converts ask about naming and style conventions what are they told by the majority consensus? The answer is "do what you prefer but do so consistently" right? Yes, that's right, that's exactly what is said. People joining a team of developers are also encouraged to cooperate with their peers and adopt what has already been established right? Yes, that's exactly what is encouraged. Teamwork and cooperation...
31
2586
by: Mason | last post by:
I've been working to become competent at making websites. My learning path has been: html -css- paintshop pro -javascript -php/mysql I'm getting somewhat proficient at php/mysql (although I have plenty to learn - I haven't even started on gd library) and want to think about my next step. Any suggestions?
0
8815
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8713
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9318
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9187
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7960
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5961
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2113
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.