14 May 2013 08:13
DOM and Database
j.vieten <j.vieten <at> yahoo.de>
2013-05-14 06:13:45 GMT
2013-05-14 06:13:45 GMT
Hello, I am very new to DDD... Many examples I have seen so far more or less reconstruct their Domain Object Model (DOM) on every service call. In the following "persistence" could be Hibernate or even just jdbc So the flow is 1) service call A 2) "persistence" goes to DB and constructs the needed DOM 3) DOM returns result to service A 4) service call B 5) "persistance" goes to DB and constructs again the needed DOM 6) DOM returns result to service B ... But I would much prefer the following: 1) At the beginning of my application I construct a DOM which can answer all server requests. 2) service call A 3) DOM returns result to service A 4)service call B 5) DOM returns result to service B .... Since in most of the examples I `ve seen the first approach seems to be mostly used.... Is there something wrong with using the second approach together with a persistence framework? Or is it just not practical for a enterprise application? ------------------------------------
Regards
Mirko
------------------------------------
RSS Feed