Tuesday, September 19, 2006

OO is for suckers

Im trying to read up on .NET Forms and how they work with .NET 2.0. Im reading a quite good book "Programming Microsoft Windows Forms" by Charles Petzhold. It's a Microsoft Press book. This evening I read something that I though was quite strange. The below quote is from page 167, when the author talks about creating controls in DLLs.

"We haven't been worrying much about making classes public. It's really only an issue when you're putting classes in a DLL."

So, making classes public, private, protected, package (or whaterver its named in C#) is only good when packaging everything in a DLL. I thought it was good OO to make certain classes private, public, etc. Perhaps I was wrong to put classes in different namespaces/packages so classes cant access every other class in a project. But the good thing is that I've been enlighted, and only bother with OO when packaging everything in a DLL.

BTW, I know Im nitpicking, but I thought it was fun :)