A plugin framework based on composition, interfaces and annotations.
A lot of plugin types and plugin implementations can be found in renderkit.
A good start is to use this in combination with entdisp and/or listformat, which make some of the renderkit plugins available in views and other places in Drupal.