Skip to content

Repeatedly looping over same Records property in Domain class #332

Answered by wimvelzeboer
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jens-dazn,

Great to hear that you are also adopting the Enterprise patterns! In my company I hear your question often from people who are just starting to learn the framework. It is indeed true that you would want to create two separate methods iterating over all the records of the domain. Each method is just only changing their own field.
And yes, this indeed would look like a kinda CPU expensive way of doing things.

But, if the goal was to write very fast software, then we all would have been writing in Assembly code. Then you will spend a huge amount of your own CPU (your own brain :-P ) to read it. So, we need to compromise.
Since your salary is in most cases more expensive than b…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Answer selected
Comment options

You must be logged in to vote
1 reply
@wimvelzeboer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants