Mike Fechner
375 posts
Registered:
14 Sep 2016
Answered
12 May 2023
in reply to
Patrik Wikström
Link to this post
Architecture choices.
There's a school of thought saying that a Business Entity should never call into another Business Entity.
When a request requires data from multiple Business Entities, that should be coordinated by a Business Task. And if that combined data needs to be exposed for instance to a JSDO read request, then the Business Tasks needs to implement the IBusinessEntity Interface.
Another school of though says that during a read request it's o.k. to call other Business Entities from a Business Entity.
But what when an update to one table needs to trigger an update in a table that's part of another Business Entity? In that case again, a BT could implement IBusinessEntity:SaveChanges() and coordinate the SaveChanges in the two BE's in response to the JSDO updateData request.
But again another school of though says, that in those cases, the first BE can coordinate the update in th second.
Each development team needs to define the architecture and standards they follow.