Don’t put view != null checks in your Presenters

In my opinion. If the result is important, we should save it somewhere anyway, no matter the view is null or not, and this should be something done in the domain layer, not the presenter. One way to avoid null check is to create a dummy view that implement the view interface. You can throw exception in the implementation if you want. But in my opinion I would rather treat the empty view as a normal state. It is certainly possible that when the presenter receive a event from the domain layer and view doesn’t exist anymore. It’s not a bug but rather a case that MAY need to be handled.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.