Picon

How to model questionaire



Hello I am working on a Insurance Product. The challenge I am facing is on how to model the requirement related to Proposal. While creating the Proposal we ask lot of questions like 

  • Are any proposals for Life Assurance on your life pending with Professional Life Assurance Limited or any other insurer ?
  • Your heart circulation or blood vessels (e.g. rheumatic fever, heart murmur, chest pains, palpitations, blood pressure, stroke varicose veins etc.)?

I was thinking of a Proposal Aggregate and one of the associated value object would be an Enum to represent the fixed set of questions that are asked? Is there any other better way to model this.



__._,_.___
Posted by: raja_navy <at> yahoo.com



__,_._,___
Picon

DRY and cross domain logic

We have a discussion in my current project group about the following:
- There are two bounded context.
- In each bounded context there is an person-alike entity, in one BC it is Client in the other it is Patient,
mostly with their own business logic and methods specific to their roles.
- However, at some point Patient requires some determining logic that is implemented in Client. For
simplicity let's assume both have a date-of-birth and the to-be-called logic is calculateAge().

This is not something that can be done with events, and because of DRY you do not want to implement
calculateAge() twice. What is the best option to calculate the age of a patient? Client and Patient share a
unique id, so Patient knows which Client to get. (N.B. I seek a conceptual solution, not one specific to the
calculate age problem.)

Tom

------------------------------------
Posted by: Tom Eugelink <tbee <at> tbee.org>
------------------------------------

------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/domaindrivendesign/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/domaindrivendesign/join
    (Yahoo! ID required)

<*> To change settings via email:
    domaindrivendesign-digest <at> yahoogroups.com 
    domaindrivendesign-fullfeatured <at> yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    domaindrivendesign-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Picon

Should I put this Invariant within a domain service or aggregate itself?



I'm working on a side project to learn and apply DDD within the "Daily Deal' domain. In my purchasing context, i have an invariant where a user can only purchase 'x' amount of deals per deal.

so it seems wasteful for my deal aggregate to load all purchases from all users just to check and see how many times (if any) the user has purchased this deal. I see two ways i could go about this.

1. Put this logic within a domain service which would allow a pre-condition to already have been met when the Purchase method on the Deal aggregate is invoked.

2. My repository implementation could always populate the purchases collection of the deal for the purchasing user. hmm...not sure about this one.

any guidance would be great! 


__._,_.___
Posted by: Marco Paul <mpaul31 <at> gmail.com>



__,_._,___
Picon

Should an application service handles the orchestration of dispatching domain events?



for example, let's say I have a Customer object with a ChangeAddress method in which returns a CustomAddressChanged event.

Should the application service have the knowledge to go ahead an put the event on the message bus, maybe send an e-mail to the user, hand it off to an in-process handler OR should the app service just go ahead and use some domain service to dispatch the event and whatever handlers are listening can do what it needs to do?






__._,_.___
Posted by: Marco Paul <mpaul31 <at> gmail.com>



__,_._,___
Picon

How far do we take exposing aggregate internals?

When trying to keep our aggregates internal structure encapsulated from clients (app services for
example) does this imply not exposing properties holding value types and all behavior methods and domain
events lean with only primitive types? 

Sent from my iPhone

------------------------------------
Posted by: Marco Paul <mpaul31 <at> gmail.com>
------------------------------------

------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/domaindrivendesign/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/domaindrivendesign/join
    (Yahoo! ID required)

<*> To change settings via email:
    domaindrivendesign-digest <at> yahoogroups.com 
    domaindrivendesign-fullfeatured <at> yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    domaindrivendesign-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Picon

Consensus between DDD and Enterprise Architecture



In literature (blogs, articles, books on Enterprise Architecture...), it seems there is a real (and exclusive) appliance of SOA in EA. If we consider DDD and SOA share common architecture principles but differ on many others, what is the place for DDD in the EA discipline ? As microservices are getting so much hype, what are the key points to promote DDD to CIO ?


Thanks,

Rénald



__._,_.___
Posted by: =?UTF-8?Q?R=C3=A9nald_VENANT=2DVALERY?= <r.venant.valery <at> gmail.com>



__,_._,___
Picon

Domain-drive-design vs. Command pattern — mutually exclusive?



tl;dr:
I like the Command-pattern's small, focussed classes such as SetProjectAsActiveCommand but I also DDD's approach of making models responsible for their own core business functions, such as calling Project::setAsActive()Can the 2 ideas work together, or are they mutually exclusive architectures?
/ tl;dr

I've been working on a project for the last few months in which we've been using the Command pattern, which has classes like ProposeNewProjectCommandSetProjectAsActiveCommand, and AddCommentToProjectCommand, all of which are handled by a command bus. These classes tend to be fairly small and focussed, doing only one thing.

Recently I've been reading about Domain-Driven-Design (DDD) and I gather that that approach relies more heavily on the Models doing work themselves, so the commands above might be replaced with Organisation::proposeNewProject()Project::setAsActive(), and Project::addComment().

Having these methods on Models means they can act as 'aggregate roots' (eg. in the examples above, Project is responsible for creating its own comments).

Whilst I really like the idea of making my Entities have more responsibility for their core business functions I'm also concerned that my Models could get really, really big with lots of methods on them relating to the various things the application can do.

Is there a way to have the small, focussed classes of the Command pattern whilst still making Models first-class citizens responsible for their key business functionality like in DDD? Or a way to tackle the potential large-model problem?

Or, alternatively, should I just pick one pattern and use it exclusively?

Thanks in advance for any insight you can give,
Harrison

PS. I've never actually worked on an application which uses DDD, so I apologise if this is an incredibly naïve question.




__._,_.___
Posted by: harrisonbro <at> gmail.com



__,_._,___
Picon

Domain-Driven Design Europe conference in 2016



Hi everybody :-)


I thought you might like to know we're organising a Domain-Driven Design conference in Brussels, Belgium, January 28-29, 2016. 

Eric Evans, the author o f the original DDD book, is our first confirmed speaker. We'll have two days of talks and workshops about modelling, design, analysis, CQRS/ES, architecture, visualization, and more! 

We've currently got an Early Supporter ticket price going, EUR 375 instead of EUR 549, until the end of May. You're not only getting full access to two days of awesome talks and workshops, but you'd also be helping us launch a new conference :-)


cheers,
Mathi as

ps If you have a user group or meetup, ping us at contact <at>  dddeurope.com to get some swag. 




__._,_.___
Posted by: mathias <at> verraes.net



__,_._,___
Picon

Exceptions in event handlers



How should one handle exceptions in events handlers when doing DDD?


As a very simplistic example I want Aggregate2 to react to events raised byAggregate1. However Aggregate2 may throw an exception during the event processing and the system is now in an invalid state.


I think I read somewhere that a compensating command should be issued; however, doesn't that lead to scattered compensating command all over the code base?


Moreover, Aggregate2 may be in another bounded context and may now it needs to know how to issue a command to another BC to fix its error (which may also fail :D)


Is there a practical way to handle errors in event handlers?



__._,_.___
Posted by: songoko20000 <at> yahoo.com



__,_._,___
Picon

Performance of aggregates in the database



I've managed to finish up benchmark of Revenj framework. It's available at: https://github.com/ngs-doo/dal-benchmark


I think DDD people might find it interesting since it talks to "Relational database" in non-conventional way and proves that DDD can be practiced without friction outside of JSON DB.


It also shows how framework can be faster than manual coding of SQL.


If you have questions or comments, let me know.


Regards,

Rikard

 



__._,_.___
Posted by: rikard <at> ngs.hr



__,_._,___
Picon

From UI to Commands - how?



Hi


How do you map UI Changes to commands in your DDD application ?


With a typical web UI having a bunch of input fields the User needs to set, its tempting to just have a CRUD like Update Action on your resource oriented backend endpoint. (Who says it should be resource oriented btw)


http Put myApi/MyResource/resourceId


This would lead to a myAggregateRoot.Update method getting called.


As you may know this looses the intent o the user  and creates an somewhat anemic domain model. We don't capture the behavior which forms our ubiquitous language.


Say the user wants to

1. Add subcontent to MYResource

2. Activate myResource


that would correspond to


myAggregateRoot.Add(newSubContent)

and 

myAggregateRoot.Activate()


I see two ways to accomplish this


UI makes multiple requests


1  http Post myApi/MyResource/resourceId/Content

2  http Post myApi/MyResource/resourceId/Activation


Currently my UI would have multiple tasks/actions on one single page. two requests seems like

doing a chatty implementation. when actions could be batched and send in one request.

Of cause UI could be split up so each page only deals with a single task / action.


OR


put an update as a list of user activities (commands) to

http Put myApi/MyResource/resourceId/

or

http Post myApi/MyResource/resourceId/changes


the changes could have a json format like


{

 updates:[

{

id : 2324234234,

occurred : some date,

name : AddContent

data : {

content goes here

}


},

{

id : 2324234234,

occurred : some date,

name : Activate

data : {}

}


}

]

}



this could be mapped to commands in the application layer in a generic way.

But it would require the UI guys to work in a different way.


What do you think ?


Cheers  Christian






p>






__._,_.___
Posted by: chr.j.johansen <at> gmail.com



__,_._,___

Gmane