400 reputation
314
bio website dicasdotnet.blogspot.com
location
age
visits member for 4 years, 5 months
seen yesterday

2d
awarded  Popular Question
Apr
24
comment Why is a architecture with anemic models the JavaEE standard?
@YazadKhambata That comment was also for you, but I can mention 2 users at the same comment ;)
Apr
24
comment Why is a architecture with anemic models the JavaEE standard?
@RobertHarvey You would have anemic models in the "transfer layer", they would be DTOs or somethink else, so you can avoid the json/xml parsing issue, but I wouldn't call them "business model". Ideally I would map them to non-anemic-models in the boundaries and process this non-adnemic-model inside my system. What are your opinions about it?
Apr
24
comment Why is a architecture with anemic models the JavaEE standard?
Obviously this can be due to bad implementation of this pattern. However, I have the feeling that DDD makes separating methods in smaller parts that make sense easier and using polymorphy easier.
Apr
24
comment Why is a architecture with anemic models the JavaEE standard?
Great answer. Yes, DDD seems (I haven't used in a real project, but I would love to try) to have some extra work at some points, but my experience with services is that at some point they start to grow in size and complexity and are thus harder to reuse. I've found a service-architecture project that had many similar methods because they had small differences and merging them would result in a very complex service.
Apr
24
comment Why is a architecture with anemic models the JavaEE standard?
Hi James! I don't know if I missunderstood your answer, but when I talk about DDD I do not mean generating code from diagrams and so on, I mean Domain Driven Design, which hash a great book about it amazon.de/Domain-Driven-Design-Tackling-Complexity-Software/dp/… I haven't tried that in a real project, but it seems elegant to me at a first glance :)
Apr
24
comment Why is a architecture with anemic models the JavaEE standard?
That is true. I am (still) not following. It is pretty hard to find projects that use this kind of architecture :(
Apr
22
comment Why is a architecture with anemic models the JavaEE standard?
Hm, I understand. The problem now is that everybody continues doing the same thing because now "It is the standard" and that is sad :(
Apr
22
comment Why is a architecture with anemic models the JavaEE standard?
yes, it states that it is OK for many "simple applications". I would say that a JavaEE application would be usually not simple.
Apr
22
asked Why is a architecture with anemic models the JavaEE standard?
Mar
4
accepted Where should I place business logic validations?
Feb
27
accepted How to use unit tests when using BDD?
Feb
27
awarded  Curious
Feb
26
comment How to use unit tests when using BDD?
@DocBrown as far as I understood, BDD is a technique/methodology. This technique includes unit testing, but focused on the feature the method implements. I want to understand how do I write the "test definition" or the test itself to achieve this goal
Feb
26
comment How to use unit tests when using BDD?
Sorry, I dont get it. You mean I should mock the dispenser? How would I test it?
Feb
26
asked How to use unit tests when using BDD?
Jan
22
comment Where should I place business logic validations?
Ok, perfect. And the question is: how do I send the information about the result of the validation back to the caller?
Jan
22
comment Where should I place business logic validations?
So I would have a method public OperationModel createAccount() and this class OperationModel would have an attribute validationMessage, right? If I do that, for every model that is used in a method that contains has some sort of validation, I will have to take an approach like this, so operation models would end up with validation information and then in the controller I would have to check for something like an isValid property and errorMessage property. That seems interesting, but I have mixed feelings about have this isValid in a Domain Class, but as more as I write, the better it sounds
Jan
20
comment Where should I place business logic validations?
That is interesting and seems a very nice idea. Would you have an answer to the argument that there is still a business knowledge when the controller knows that he has to call that specific validator in order to call the "save" method after that?
Jan
20
comment Where should I place business logic validations?
Just let me know if I understood: you are telling me to use something like the Validator class from sprint (docs.spring.io/spring-framework/docs/2.5.x/api/org/…) and use it to check in the business layer, correct? But if the validation fails, how do I give this feedback to the caller so a message can be shown to the user?