I have a modal component that is being used to display a form for the user. This modal accepts three parameters: is_visible (if the modal is shown), t ...
I have a modal component that is being used to display a form for the user. This modal accepts three parameters: is_visible (if the modal is shown), t ...
this demostrates the whole in BAD and GOOD usage. The doItBAD() is bad, because passing an object is an unnecessary knowledge for the function but ...
Please have a look at following piece of code: We found that most of the consumers first call IsCultureSupported to validate if their culture is su ...
I'm trying to follow some of the more current design principles including SOLID and Domain Driven Design. My question is around how people handle "Ini ...
I understand that many design principles conflict with each other in some cases . So, we have to weigh them and see which one is more beneficial. Till ...
Please tell me if I'm applying the Tell, dont't ask principle in right way in this example. I have two classes, CalculationResults has a function cal ...
Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. Alec Sharp When we are using the Fact ...
I have two classes, Parser and Item. The Parser class parses some structured document and returns Item-objects if you call something like Parser::GetI ...
I have tried to raise event in cSharp to notify code change in my application in order to have tellDontAsk scenario. I have simple class that impleme ...
Having two classes like this: Where the related subscription determines if the Site is active or not, I use the method hostname_active? both as a c ...
Here's the thing. I have a button that, depending on the scenario, will behave, look and have different text. Here's how it, roughly, looks like at th ...
I've got a case where "Tell, don't Ask" seems to conflict with the "Single responsibility" principle. I've looked at other discussions on the subject ...
Trying to keep with pragmatic programming principles, I'm trying to decide on how to handle user password changes based on the "Tell, Don't Ask" princ ...
Question How do I adhere to the "Tell, Don't Ask" principle when performing a function involving multiple objects. Example - Generating a Report I ...
I think the issue is explained best with an example. I like this pattern, because it's very cohesive. Action interfaces are paired with their Servi ...
I have a factory class that creates an object based on a parameter it receives. The parameter is an identifier that tells it which object it should cr ...
I want to print a description of a warrior to the console that will include the warrior's strength and the warrior's weapon in the form This <descr ...
In this simple example (ofcourse my real world problem is a tad more complex, although the basics are the same), how do I enforce tell dont ask to the ...
How would you adhere to the "Tell, don't ask" principle (henceforth "the principle") in the following simple scenario? In a Tetris game, I have Board, ...
If I don't want to expose the state of my object, but I still need to display it (in HTML, XML or JSON let's say), how would I go about doing that in ...