Python simulation-scripts architecture
Situation:
I’ve some scripts that simulate user-activity on desktop. Therefore I’ve defined a few cases (workflows) and implemented them in Python. I’ve also written some classes for interacting with the users’ software (e.g. web browser etc.).
Replacing Multiple Inhertance with delegation
I was going through “Object Oriented Modelling and Design” by James Rumbaugh et al and it said that in languages where multiple inheritance is not supported like Java three mechanisms can be used as workarounds
Is STL implemented with OO?
There are several design patterns like Adaptor, Iterator implemented in STL.
Does multiple inheritance violate Single Responsibility Principle?
If you have a class which inherits from two distinct classes, does not this mean that your subclass automatically does (at least) 2 things, one from each superclass?
Pass ID or Object?
When providing a business logic method to get a domain entity, should the parameter accept an object or an ID? For example, should we do this:
What are the problems which I will face if all the classes I use are loosely coupled
Loosely coupled classes gives flexibility. If I understand it right, Event flow, Observer Pattern and Design Patterns like MVC focus on loose coupling. So in this context I am aiming towards making a project where all the classes are loosely coupled.
How to split large, tightly coupled classes?
I have some huge classes of more than 2k lines of code (and growing) that I would like to refactor if possible, to have some more light and clean design.
Is it good/safe OOP practice to have a method whose only purpose is to send/retrieve data from another class?
I have a class that performs basic MySQL operations. This is all in PHP.
How are entities with an identity and a mutable persistent state modelled in a functional programming language?
In an answer to this question (written by Pete) there are some considerations about OOP versus FP. In particular, it is suggested that FP languages are not very suitable for modelling (persistent) objects that have an identity and a mutable state.
What do you call an interface with no defining methods used as property setters
In ASP.NET and C# I’ve ran across this before. Your class needs to implement interface ISomething
in order for something in the super class to supply something to you.