Thursday, May 10, 2012

Linguistic Determinism


... the notion of linguistic determinism ... the way we think about something is shaped by the vocabulary we have for talking about it .... changing the users’ conception of the domain may
prevent some intentions from arising at all.
http://hci.ucsd.edu/hollan/direct-manip.pdf

Coarse-grained vs. Fine-grained

Coarse-grained components exhibit loose coupling, whereas fine-grained components are often tightly coupled. For example, if recompiling both the consumer and the provider resolve some problem in the interaction, then the two components were tightly coupled.
 http://www.ibm.com/developerworks/webservices/library/ws-soa-granularity/

Sunday, May 6, 2012

Law of Demeter

When applied to object-oriented programs, the Law of Demeter can be more precisely called the “Law of Demeter for Functions/Methods” (LoD-F). In this case, an object A can request a service (call a method) of an object instance B, but object A cannot "reach through" object B to access yet another object, C, to request its services. Doing so would mean that object A implicitly requires greater knowledge of object B's internal structure. Instead, B's interface should be modified if necessary so it can directly serve object A's request, propagating it to any relevant subcomponents. Alternatively, A might have a direct reference to object C and make the request directly to that. If the law is followed, only object B knows its own internal structure.
 http://en.wikipedia.org/wiki/Law_of_Demeter

Bounded Contexts


People are talking about two entirely different things when they chat about a policy in the context of a general workflow versus a policy in the context of payroll auditing. If you use the same policy class, you're fattening the profile of that class and getting a long way from tried-and-true best practices such as the Single Responsibility Principle (SRP).
Systems that fail to isolate and insulate Bounded Contexts often slip into an architectural style (amusingly) called The Big Ball of Mud. ... 
When you use modules (or namespaces) to divide up your model, you really want to question whether you're dealing with a separate context. The cost of cleaving out another context is usually much higher: now you have two models, likely in two assemblies, that you need to connect with application services, controllers, and so on.

Tuesday, May 1, 2012

Interface vs. Implementation


The repository implementations can reference and implement all the interfaces they want, now that I picture it more. In fact, there's nothing stopping you from having one giant implementing class which implements all repository interfaces in every domain you have. It's kind of silly, but it's allowed. The abstractions and separation of concerns are in the interfaces. The implementation is of less concern because it should be disposable/replaceable. – David Mar 21 '11 at 22:37