Problems With Presenters

Learn about problems we may face with the presenters.

We'll cover the following

Presenters breed inconsistency, which leads to three specific problems:

  • Adding a presenter pattern creates two ways to expose data to a view: a well-defined domain model, or a presenter that wraps one. This invariably leads to more inconsistencies because many developers, upon seeing two ways to do something, will introduce a third. The team has to be proactive about preventing a proliferation of presenter patterns from popping up.

  • When reading view code, it’s not easy to tell what sort of object we actually have. Is our @widget a Widget or a WidgetPresenter? Has our @widget instance been given new methods that only exist in a view? Is it missing methods a normal widget would have? These questions can be very hard to answer.

  • When creating or editing a new view, developers have to decide if they should make a presenter or not. Some will feel they always should (even if they don’t need it) because they might need it. Others won’t.

Get hands-on with 1200+ tech skills courses.