LayeringPrinciples

MartinFowler の bliki より。

http://martinfowler.com/bliki/LayeringPrinciples.html

ここに、

Separate development teams by layer. 1/22

というのがある。数字は賛成1票反対22票という意味。

チームわけを「画面チーム」「Servletチーム(ってなに)」みたいに分割するのって、どーもうまくいかないと思っていたけど、こんなにはっきり反対!が多いとはちょっと意外。いや、そういうチーム分けばっかりやってたから、わりとふつーなのかと思っていたわけで。

他にも、

Layers should be agnostic of consumers (a layer shouldn't know who's on top of it.) 4/4
Prefer layers to interact only with adjacent layers. 4/4
Layers should only interact with adjacent layers. 2/3

これは賛成に入れたいところだけど、割れてるのね。たしかに理想的ではあるけど、現実には難しいことが多い。DBMSのテーブルの制約で例外が起きても、ビジネスロジックの中で例外が起きても、対応が同じだったりするし。

Every layer should have a secret. 3/2

これは意味がよく分からない。暗い過去とか?へそくりとか?と思ったら、

Layers should be shy about their internals. 8/0

こういう意味かしら。

Rethrow exceptions at layer boundaries. 0/15

これも意味がよくわからない。Exceptionをネストしまくる話かな。

末尾に、

A couple of people were surprised that principles that they had heard often 
(and disliked) were trashed in the voting. 
(Separate development teams by layer and Rethrow exceptions at layer boundaries.)

というコメントもあって、とても納得。