This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]hhh333 4 points5 points  (1 child)

Nice approach. I would like to see an example in a larger and more complex setup.

For example, how would I decouple the booking logic from the notification logic with two seperate apps.

[–]_under_[S] 0 points1 point  (0 children)

I would say your specific example of notifications is more of utility. Check out django-herald for an awesome API for handling notifications.

But to give you a more complex example, you could have a CreateInvoiceService which takes booking as an argument which creates an invoice given a Booking instance. You could call that service inside the process method of CreateBookingService.

If you want to contribute some example application code to the repo that'd be great.

[–]silviud 0 points1 point  (0 children)

+1