Isn’t MVC anti OOP?
The main idea behind OOP is to unify data and behavior in a single entity – the object. In procedural programming there is data and separately algorithms modifying the data.
How to implement isValid correctly?
I’m trying to provide a mechanism for validating my object like this:
Why am I seeing so many instantiable classes without state?
I’m seeing a lot of instantiable classes in the C++ and Java world that don’t have any state.
Validation and Error Generation when using the Data Mapper Pattern
I am working on saving state of an object to a database using the data mapper pattern, but I am looking for suggestions/guidance on the validation and error message generation step (step 4 below). Here are the general steps as I see them for doing this:
Help to understand the abstract factory pattern
I’m learning the 23 design patterns of the GoF.
Looking for some OO design advice
I’m developing an app that will be used to open and close valves in an industrial environment, and was thinking of something simple like this:-
Object behaviour or separate class?
When it comes to OO database access you see two common approaches – the first is to provide a class (say “Customer”) with methods such as Retrieve(), Update(), Delete(), etc. The other is to keep the Customer class fairly lightweight (essentially just properties) and perform the database access elsewhere, e.g. using a repository.
Something similar to Objective-C categories in other languages?
I understand Objective-C categories and how they become useful, but I always have a hard time explaining the concept to other programmers that are not familiar with Objective C.
How to verify the Liskov substitution principle in an inheritance hierarchy?
Inspired by this answer:
What can go wrong if the Liskov substitution principle is violated?
I was following this highly voted question on possible violation of Liskov Substitution principle. I know what the Liskov Substitution principle is, but what is still not clear in my mind is what might go wrong if I as a developer do not think about the principle while writing object-oriented code.