James Watson
Posts: 2024
Nickname: watson
Registered: Sep, 2005
|
|
Re: Gavin King: In Defence of the RDBMS
|
Posted: Jun 1, 2007 6:14 AM
|
|
> > If I dig out a hole for a swimming pool with a > > teaspoon, I may create a hole with exact dimensions > > required. In that context, the hole is not wrong. But > > I'd still be an idiot. It was the wrong choice, > > regardless of whether the outcome was correct. > > You can dig a hole with a teaspoon, a shovel, or a > mechanical digger. You may use one or more diggers (people > or machines). The choices depend on your budget, your > timescale, or other constraints. What happens if you > cannot get you mechanical digger to the site where the > hole needs to be?
You use a shovel, not a spoon.
> Regardless of how you actally do it, if the object of the > exersize is to dig a hole of certain dimensions, to budget > and within timescale, and you actually achieve that, then > you are not wrong. Your methods may not have been the most > efficient, but that is irrelevant. At the end of the day > it is the result that counts, not the elegance of your > implementation.
Tell that to the person paying for the labor.
> > I agree that OOP can provide maintenance benefits (when > > done properly) but it can also provide benefits > up-front. > > It's often much easier to create correct code with OO > > O off-the-bat, in my experience. > > Define "properly". There is no single, universally > accepted description of what "proper/pure/real" OO really > is.
I never said there was. But a lot of things are very nearly universally understood to not be OO, even by those who disagree about what OO is.
> > Since you are not being harsh, I'll say what I believe > we > > are both thinking. If someone thinks that any code > that > > uses Objects and classes is OO, then that person > probably > > doesn't really understand OO. > > The definition of Object Oriented Programming is simple > and straightforward - it is programming which is oriented > around objects, thus taking advantage of Encapsulation, > Polymorphism, and Inheritance to increase code reuse and > decrease code maintenance. Therefore, if I write software > that uses classes, objects, encapsulation, inheritance and > polymorphism then that *IS* OOP whether you like it or > not. The style may not be to your liking but that is > irrelevant.
You did not say that before. You said code that uses Objects and classes is inherently OO. This is not true.
> My personal style is to use one class per database table, > and to avoid OR mappers like the plague. I also use one > DAO per DBMS, not one per table, and I use a data > dictionary instead of Activerecord. So, if that is > different from *your* personal style, would you consider > it to be *wrong*?
No. I've seen the one-table->one class approach cause a project to nearly fail but I won't say it's not OO.
|
|