Can There Be Too Much of a Good Thing?

Posted on Wed 16 March 2016 in Design Patterns

I recently worked on JavaFX UI code that was new to me. In order to extend the existing UI by a simple label, I needed access to a bean of the underlying data model. Much to my surprise, I had to dig deep to find it hidden under multiple layers of wrappers. This was the data structure:

A bean wrapped in a BeanWrapper wrapped in an ObjectProperty wrapped
in a WrapperPropertyProxy. Quite

Wow. Clearly, someone tried to satisfy their fetish for wrappers and indirection. I'm going show this image to the next computer science student I come across and ask them how many design (anti-)patterns they can see.