문제

I have a few (view) classes.

Table, Tree, PagingColumn, SelectionColumn, SparkLineColumn, TimeColumn.

currently they're flat under app/view like this:

app/view/Table
app/view/Tree
app/view/PagingColumn
...

I thought about restructuring it, because the Trees and Tables use the columns, but there are some columns, which only work in a tree, some who work in trees and tables and in the future there are probably some who only work in tables, I don't know.

My first idea was like this:

app/view/Table
app/view/Tree

app/view/column/PagingColumn
app/view/column/SelectionColumn
app/view/column/SparkLineColumn
app/view/column/TimeColumn

But since the SelectionColumn is explicitly for trees, I have the fear that future developers could get the idea of missuse them.

But how to restructure it probably?

Like this:

app/view/table/panel/Table

app/view/tree/panel/Tree
app/view/tree/column/PagingColumn
app/view/tree/column/SelectionColumn

app/view/column/SparkLineColumn
app/view/column/TimeColumn

Or like this:

app/view/Table
app/view/Tree

app/view/column/SparkLineColumn
app/view/column/TimeColumn

app/view/column/tree/PagingColumn
app/view/column/tree/SelectionColumn

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 softwareengineering.stackexchange
scroll top