Skip to main content
added 385 characters in body
Source Link
Doc Brown
  • 214k
  • 34
  • 394
  • 603

Those two things do not much have in common, except the fact that also in the Service Layer pattern some kind of "events" may be involved. But that is also where commonalities end.

  • in the "Service Layer pattern", there are different layers calling each other and triggering some system change. But the calls are not necessarily "captured in event objects", nor are the calls necessarily stored anywhere.

  • in Event Sourcing, there is not necessarily a result notification back to the caller, that is not part of the pattern

Actually, one way of implementing Event sourcing is to let the service layer take the UI calls, encapsulate them in event objects and feed them to the event queue. The service layer can also try to generate an appropriate result notification for the UI. So these two patterns can work perfectly together, but mostly because they are orthogonal.

Those two things do not much have in common, except the fact that also in the Service Layer pattern some kind of "events" may be involved. But that is also where commonalities end.

  • in the "Service Layer pattern", there are different layers calling each other and triggering some system change. But the calls are not necessarily "captured in event objects", nor are the calls necessarily stored anywhere.

  • in Event Sourcing, there is not necessarily a result notification to the caller

Those two things do not much have in common, except the fact that also in the Service Layer pattern some kind of "events" may be involved. But that is where commonalities end.

  • in the "Service Layer pattern", there are different layers calling each other and triggering some system change. But the calls are not necessarily "captured in event objects", nor are the calls necessarily stored anywhere.

  • in Event Sourcing, there is not necessarily a result notification back to the caller, that is not part of the pattern

Actually, one way of implementing Event sourcing is to let the service layer take the UI calls, encapsulate them in event objects and feed them to the event queue. The service layer can also try to generate an appropriate result notification for the UI. So these two patterns can work perfectly together, but mostly because they are orthogonal.

Source Link
Doc Brown
  • 214k
  • 34
  • 394
  • 603

Those two things do not much have in common, except the fact that also in the Service Layer pattern some kind of "events" may be involved. But that is also where commonalities end.

  • in the "Service Layer pattern", there are different layers calling each other and triggering some system change. But the calls are not necessarily "captured in event objects", nor are the calls necessarily stored anywhere.

  • in Event Sourcing, there is not necessarily a result notification to the caller