Design pattern or code smell, denormalised data as a result of functional decomposition

会有一股神秘感。 提交于 2019-12-04 18:45:58

Functional decomp is a bad design strategy.

Think of trying to build a kitchen blender using functional decomp. To whip, mix, stir and blend, you'd have four bowls, four motors, four blades, four switches, four power supplies and four bases to hold each "function".

Functional decomp is for analysis of requirements. It isn't for design.

After your analysis pass you have to do a synthesis pass to assemble common components, common framework elements, and a common data model. You should wind up with a single data model supporting multiple functions.

I think it depends - doesn't SOA basically mean functional decomp.?

Problem is when different functions need access to the same data, that probably is a smell that somethings wrong. Perhaps there needs to be another function to handle access to the common data, or perhaps functionl decomposition is the wrong answer in this case.

If you were trying to scale a kitchen up to a food manufacturing plant then it might make sense to have separate vats for whipping, stirring and blending, with some sort of pipeline (or 'bus') that the vats "subscribe" to, but for a doesmetic blender it would make more sense to reuse the same bowl and have switchable attachments.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!