10,400 reputation
42056
bio website
location
age
visits member for 3 years, 1 month
seen 14 hours ago

Apr
14
reviewed Close Is Object Oriented Design necessary when building Symfony web apps?
Apr
14
reviewed Leave Open Torvalds' quote about good programmer
Apr
14
reviewed Leave Open Should we design programs to randomly kill themselves?
Apr
3
comment Observer pattern: “Web of observers” - Is this ever in use?
Mediator isn't the same as what you are suggesting, but relevant.
Apr
3
comment Observer pattern: “Web of observers” - Is this ever in use?
programmers.stackexchange.com/questions/134432/…. stackoverflow.com/questions/9226479/mediator-vs-observer
Mar
27
answered Programmer-to-Programmer, what would you ask?
Mar
24
answered mysql, store a single piece of data per row
Mar
14
comment Understanding dependency injection
@JBRWilkinson I mean a class that implements an interface. I should make that clearer. However, the point is that a large app will have classes with dependencies that in turn have dependencies that in turn have dependencies... Setting it all up manually in the Main method is the result of doing lots of constructor injection.
Mar
13
answered Understanding dependency injection
Mar
10
answered How to keep track of links pointing to existing web applications in an Intranet?
Mar
7
comment How do I deal with global variables in existing legacy code (or, what's better, global hell or pattern hell)?
@ArthurChamz - Your question wasn't primarily about DI vs. a registry, which is another whole discussion. I was suggesting a method compatible with either. I guess I would say constructor DI if the dependency is always needed, parameter DI if it's optional, and Registry if it's too hard to refactor into DI (it might be hard to find a good place to wire all the dependencies up if this is happening deep in a large code base (which yours isn't really)). I agree on avoiding Singletons.
Mar
7
answered How do I deal with global variables in existing legacy code (or, what's better, global hell or pattern hell)?
Feb
25
answered Unit Testing with an Optimization Problem
Feb
25
reviewed Leave Open Preparing yourself for Code challenges
Feb
25
reviewed Close What is the advantage of wrapping exceptions
Feb
20
comment Coarse-grained views on server vs fine-grained views assembled on client vs fine-grained views with batching
I actually don't especially want an API that supports external as well as internal clients "But we have no reasonable current expectation that someone without access to the server would want to write another UI.", but it isn't unreasonable for an answer to discuss that. But it's hard to know which parts of the answer you think do apply to the question asked.
Feb
20
asked Coarse-grained views on server vs fine-grained views assembled on client vs fine-grained views with batching
Feb
18
answered Call the database every time, or create an object in memory, and if so, how and how often to update?
Feb
5
comment Meaningful names in weakly typed language like JS
There is always: function getBoxText(searchBox /*element*/) {
Jan
30
comment DI or Factory Pattern ? Both ? or a different apprach?
DI when you know at compile time what specific classes you want. Factory if you won't know until run-time.