I strongly recommend annotations of the Domain objects as the persistence mechanism. OK, there will be a connection between the pure domain and the persistent...
... One question is, where do you draw the line when it comes to domain object metadata. For example, where do you put the labels to be shown in forms for a...
Thank you all for you insights. I'm still considering the DAO though, I implemented the generic DAO as illustrated by Java Persistence With Hibernate, and it...
I speficially did not put in a Matching(ICriteria criteria) method in my IRepository interface. Instead, I allow for the interface to be extended in the...
On Sun, Jun 1, 2008 at 6:43 AM, Rickard Öberg <rickardoberg@...> ... It's this sort of thing that keeps me using the external Hibernate XML files. I...
Geoffrey Wiseman wrote: "It's this sort of thing that keeps me using the external Hibernate XML files. I just find it clutters the domain class, and I worry...
... I should add that I often begin my lectures by saying sorry for XDoclet ... workaround for bad design patterns... oh well.. Anyway, it seems to me that...
Hi, I've been exploring Spring.net recently and one thing that sticks out to me is the call to GetObject(). It got wondering, are people in practice using...
Hi Aeden, Typically, you won't see any calls whatsoever to GetObject() (or getBean() for those on the Java side) within your domain or service layers. In the...
On Mon, Jun 2, 2008 at 1:43 AM, Rickard Öberg <rickardoberg@...> ... This might be an area where having source code as a predominantly text artifact is...
I have some specifications, CompanyCreditCardSpecification and DuplicateCreditCardSpecification that take a credit card number to determine if it meets certain...
Jesse, I've run into similar problems. My approach was to let the specification do what it needed to do, giving it all the information it needed through its ...
Thanks bill. It feels natural; I just wanted to see what others are doing in these scenarios. Have you ever used a factory creating your specifications? ...
It seems to me like the specification should be responsible for knowing boundary values. If you pass boundary values in via the constructor, then the...
True and I suppose you could have a specification that contains the boundary information within itself. I've done this as well but sometimes your specification...
For me, my specification classes are so small and simple I don't need a factory. There's an IsSatisifedBy method and that's about it. I have a blog post here...
Sorry, that blog post was referring to using the Strategy pattern to replace ugly enums. However in the end, somewhere, I shifted to using an ISpecification to...
Hi to all, I have developed and tested my web service using JPA annotations to map my domain model to the JPA ORM framework. Everything works fine. Now...
Thanks for the links Bill. Those posts are great examples of refactoring. The main reason I was asking if used a specification factory was to determine how...
Pat, that does seem to make sense if you can pre determine the boundary values. What would you do if the boundary values are dynamic or must be retrieved from...
Jesse, Why would you mock specifications? They're domain concepts so you would end up doing state based testing against them, just like an entity. I don't see ...
I would want to mock them so that I can test the behavior of a test class when the specification IsSatisifed or isn't satisfied without having to worry about...
I agree with this. If you have some logic that depends on calling isSatisfied, you'll want to mock out that call to isolate your tests from changes to the...
I suppose you have a reason for moving the OR-mapping from annotations to a mapping file. But I cannot find it, so please tell me. (I am working with similar...
Hi Tomas, The reasons for removing the ORM annotations from the service business entities is to ease service upgrade and migrations. The service is for an SOA...
I was not clear on how replacing the Delivery History collection with a query solve the problem. This is on page 177 in the DDD book. I appreciate an little...
I would like to answer the following question: " However, even if the pure dao operations belong with the domain logic, where do they fit in? Should the...
... Well, if you have a domain concept for "a bunch of Employees", why not introduce that as an Employees domain object? I've been starting to use this idea of...
Is there any reasonable way (that can be reommended as a best practise from a pragmatical point of view) to avoid typechecking and downcasting when subclasses...