> From: Jeffry Houser [mailto:[email protected]] > Sent: 15 January 2012 19:54 > I'm curious as to what your suggestions would be simplifying something like this? > [Or ignoring my commercial component, the Flex List class] I'd prefer not to comment on your commercial creations Jeffry, but I'll comment on List.
The class does many things: it's a container; it displays the contents of a data provider; it supports scrolling; it supports item renderers; it supports dragging & dropping; it supports single selections; it supports multiple selections; it supports item editing etc. Classes should be single purpose. Therefore the List class should be a compositional class that is composed of IDataProviderSupport, IScrollSupport, IDragAndDropSupport etc and the functionality that is currently in List should be in classes that implement those interfaces. That way, the currently overly-large, over-complex, unfocused class could be broken up into a large number of properly focused, smaller classes. David.
