I'm designing a client to the Tomtom WEBFLEET.connect API in PHP. (You can read more about the API through the full documentation here: ...
Lots of classes with only one single static method with same name as class - Code smell? [duplicate]
I'm trying to follow the single responsibility principle (SRP) in my applications. I have lots of CRUD classes I just name xxxxxManager. Following the SRP, I made 4 classes for each one : ...
To illustrate the question, let's say we have two programmers of comparable skill that both solve the same problem. The code they turn out has roughly the same lines of code, but one programmer uses 5 ...
Despite many years in IT, I still struggle with OO design. One particular problem I seem to keep ending up with is large classes, often containing many hundreds of lines of code. The OO world talks a ...
I'm designing an OO graph library and at the moment I'm trying to figure out the design for a GraphEdge class. I've added setters and getters for it's nodes, direction and weight. This seemes ...
Is it good to have an interface plenty of methods which belong to different concepts, just to preserve the Liskov's Principle?
I'm currently studying a course based on Software Design and I had a discussion in class with my professor and some classmates about a problem represented by the next scenario: Scenario Imagine ...
Architecture Best Practice (MVC): Repository Returns Object & Object Member Accessed Directly or Repository Returns Object Member
Architecturally speaking, which is the preferable approach (and why)? $validation_date = $users_repository->getUser($user_id)->validation_date; Seems to violate Law of Demeter by accessing ...
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? I believe there is no difference ...
I have objects which implement the interface BroadcastInterface, which represents a message that is to be broadcast to all users of a particular group. It has a setter and getter method for the ...
I've been reading Clean Code and various online articles about SOLID lately, and the more I read about it, the more I feel like I don't know anything. Let's say I'm building a web application using ...
Consider two UI designers who want to design "user attractive" designs. "User attraction" is a concept that is not objective and only resides in the mind of designers. Thus designer A could for ...