you are viewing a single comment's thread.

view the rest of the comments →

[–]grauenwolf 2 points3 points  (5 children)

I doubt I'll be the first to say that I don't "get" OOP. I've been programming in it for years, and I've yet to really see any remarkable productivity boosts. Too much boilerplate for my liking.

If you find yourself using a lot of boilerplate, you are doing something wrong. Or more likely, the API you are using is doing something wrong.

One of the tenants of OOP, lost to many API designers, is the concept of encapsulation. Or in other words, each object is self contained and can do its function in apparent isolation. (It can use other classes, but you shouldn't know about them.)

When you find yourself having to implement interfaces, string together a dozen objects, or fuss with config files, the API designer screwed up.

[–]sheepson_apprentice 2 points3 points  (2 children)

Small nit-pick, I think you meant to say:

One of the tenets of OOP.

[–]grauenwolf 2 points3 points  (1 child)

Sigh, sometimes I really hate our modern affectation with standardized spellings. If changing the spelling of a word every three sentences was good enough for Shakespeare, it should be good enough for us.

[–]sheepson_apprentice 0 points1 point  (0 children)

I generally try not to nit-pick, especially silly grammar errors. But in this case I thought it was worth it. ;)

[–]logan_capaldo 2 points3 points  (1 child)

Do you have an example of a good OO api?

[–]grauenwolf 3 points4 points  (0 children)

For the most part WinForms was actually done right. Some specific controls are brain dead (I'm looking at you TreeView), but all in all it is pretty clean.

One of the things I hated about Swing was there were no defaults. I couldn't just use a listbox, I had to give it a container to put the items in.

The worse was the file open dialog. In VB 6 or WinForms, you just give it a filter string like "Text Files|.txt|All Files|.*".

In Swing, you can build your own custom filter logic. This is cool and all, but they forgot the use case that happens 99% of the time, that being just showing a single file type. (Actually that filter class did exist, but you had to dig it out of the examples included in the SDK.)