4,109 reputation
815
bio website
location
age
visits member for 4 years, 3 months
seen 6 hours ago

May
22
comment How do you avoid getters and setters?
@BenAaronson Yes, in the DDD sense which I think is the most common now. But you're right, according to Martin Fowler, "Early J2EE literature used the term value object to describe a different notion, what I call a Data Transfer Object. They have since changed their usage and use the term Transfer Object instead."
May
19
comment How do you avoid getters and setters?
@JacquesB A Value Object can have behavior and be more than a dumb data structure. It's an orthogonal concept.
Apr
24
comment Conceptual mismatch between DDD Application Services and REST API
I'm also not sure about the whole "user as a robot/state machine" thing. I think we should strive to make our user interfaces much more natural than that...
Apr
24
comment Conceptual mismatch between DDD Application Services and REST API
@CormacMulhall nice talk, very funny. I get the reasoning behind HTTP and resources being a different space than the domain, however this seems to conflict with the concept of task-based UI where the user's intent is precisely supposed to be captured at the Presentation level. I also wonder about the discoverability of such a system where a single visible resource can fan out to a multitude of domain operations.
Apr
10
comment Having Foreign Keys in Business Objects
Why ? DDD often has good design advice even if you don't adopt the full thing
Apr
10
answered Having Foreign Keys in Business Objects
Apr
2
comment Using static classes to define methods for handling POCO class objects
You may be confusing POCO with DTO. A POCO can have methods.
Apr
1
answered Domain Driven Design - designing Aggregate Roots
Mar
30
answered Many small requests vs. few large requests (API Design)
Mar
30
answered why do people do REST API's instead of DBAL's?
Mar
25
comment Implementing common logic in base class
As long as you stay in-memory and not I/O bound I'd say test it without mocking it, or if it's really too slow, put the test in a long-running test suite that is executed less frequently.
Mar
25
comment Implementing common logic in base class
Long-running to me usually means you have crossed an application seam and stepped into the realm of I/O bound modules such as data or file access, network, etc. Crossing that boundary means it should be in another, easily mockable class, not in a private method.
Mar
25
revised Implementing common logic in base class
deleted 2 characters in body
Mar
25
answered Implementing common logic in base class
Mar
25
revised Unit Testing and dependencies
deleted 1 character in body
Mar
25
answered Unit Testing and dependencies
Mar
25
comment Unit Testing and dependencies
I mostly only use Factories when the dependent object needs complete control over its dependency's "birth" time and finalization time. In which case you pass it a Factory instead of passing it the dependency per se. Another case might be when the eligible implementation for a given abstraction fluctuates over the course of application runtime, but that rarely happens in my experience.
Mar
25
comment Unit Testing and dependencies
In my experience, Factories are overkill most of the time, especially when you have a well-identified Composition Root, i.e. a single entry point where the whole object graph is assembled (it might use a DI container or not). In your example, that would be when the configuration value is read and the correct implementation chosen accordingly.
Mar
25
comment Unit Testing and dependencies
@JonRaynor what's the point of a Factory here ?
Mar
25
revised Understanding Bob Martin's Closed For Modification Explanation
added 7 characters in body