poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58787] [In progress] Border Drawing utility that does not create unnecessary styles
Date Sun, 17 Jan 2016 17:51:55 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58787

--- Comment #8 from Javen O'Neal <onealj@apache.org> ---
In general, I prefer creating inheritable classes rather than util functions
because
* behavior can be overridden in an object-oriented way
* features are more discoverable through Javadocs. People have to know CellUtil
exists and contains some goodies. Util classes get disorganized, turning into a
junk drawer where it's hard to search through the class to find what you want.
Splitting up a util class solves the junk drawer problem but  invites the
Wall-e spork clarification problem: if a function could belong in either of two
util classes, which one does it go in, and if people expect it in the opposite
one, possibly creating a new function that duplicates functionality.

Util functions make sense in some situations: return the maximum row number for
sheets in a workbook, or return diff two workbooks, or interleave the rows of
two spreadsheets (where there isn't an implied directionality, so that object
and subject in `object.action(subject)` are swappable.

In general, having higher level data structures/class allows higher level
client code, and that is a good thing.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message