flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Arno" <da...@davidarno.org>
Subject RE: Overly large classes (was Flex incubation on Apache as Opensource)
Date Sun, 15 Jan 2012 21:01:18 GMT
> From: Jeffry Houser [mailto:jeffry@dot-com-it.com] 
> 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.


View raw message