Looking for the right terminology for presenters, decorators, exhibits, POROs

I’m looking for the least confusing and most standard terms to describe:

  1. Draper Decorators (decorators or presenters)
  • delegates to the model
  • extension of model for presentation logic, can generate HTML or whatever the views want.
  1. A PORO that encapsulates code such that uses the context of the request, along with the model, so that
  • the view and controller have minimal logic
  • no presentation code in the model
  • doesn’t delegate all methods to the model, so probably presenter and decorator don’t work for this one.
  1. A PORO that handles the interaction between models for a given purpose, which I’d call a Service Object.

And then there are Exhibitors, which I’m not sure are worth bringing into the mix of terminology.

Any advice on the most standard and least confusing names.

This article sums up some of the discussion based on Advi’s Objects on Rails book: Exhibit vs Presenter :: Mike Pack Development

Thanks.

I think these terms get a little interchangeable, and there’s disagreement about what exactly is what.

You’re way ahead of the game for making use of these patterns.

A lot of times we use the wrong name for a patten in ruby… I’m not really sure if its important, but if you do care, read the gang of four book . . .

For #2, I’ve settled on the term Presenter. I’m interested in clarity, not some conformity with an abstruse book published 20 years ago in 1994.

1 Like