Nimble Coder

Adventures in Nimble Coding
posts - 77, comments - 56, trackbacks - 1

Object-oriented focus compared to design structure

The ChevelleI just read a blog complaining about the systematic abuse of object-oriented programming and it reminds me of my complaint about the teaching of object-oriented programming. The typical object-oriented tutorial will define a vehicle class then create two or three derived classes such as a car, truck, and/or motorcycle (example 1 and example 2). This instruction is useful purely on the theoretical level but fails to actually teach the student how to use polymorphism, inheritance, and encapsulation.

The issue is far more than object-oriented programming, but rather code structure and layout and design patterns. The most useful exercises in learning how to structure software design in my opinion is the classic "undo" implementation and an automation interface. Unfortunately these in today's web-based focus, these real-world examples are normally only relevant to traditional applications. The key to the exercise is figuring out how to design the controller to store the actions and then undo the actions when necessary. It is a related exercise to design the controller to automate the actions. These exercises can be tricky (especially the first time the developer implements them) but they are not necessarily difficult. They are simply great learning experiences that should a part of the programming learning process.

Print | posted on Wednesday, November 28, 2007 12:06 AM | Filed Under [ Design ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 1 and 1 and type the answer here:

Powered by: