如何克服反模式“大泥泥”? [英] How to overcome the anti-pattern "Big Ball of Mud"?

查看:138
本文介绍了如何克服反模式“大泥泥”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么原因使计算机程序变成大泥泥球?有可能从这种反模式中恢复吗?是否有可以应用的重构方法?

解决方案

一大泥泥通常发生因为以下之一: / p>


  • 需求更改 - 您构建了一套需求的解决方案,随着时间的推移,现在,您可能会喜欢不同的观众,他们希望使用具有略微不同要求的同一产品。您将这些要求烘焙到相同的产品中,最终使用BBOM。


  • 开发人员更改 - 原始产品已被由具有某些设计和架构假设的一组开发人员创建,这对于接管产品进行维护或进一步开发的全新开发人员并不完全明了。新开发人员做出自己的假设,随着时间的推移,产品会降解成一堆不可维护的垃圾。


  • 无效开发者(他们不知道反模式),管理(太苛刻,缺乏产品知识)或用户(他们真的不知道他们需要什么)。这很难解决。




有时,最好的解决方案只是重写符合新要求的应用程序。但这通常是最糟糕的情况。繁琐的解决方案是停止所有的新开发,首先写一套测试,然后重新设计和重新构建整个解决方案。这可能需要几年的时间,具体取决于产品的尺寸。


What causes a computer program to turn into a Big Ball of Mud? Is it possible to recover from this anti-pattern? Are there proven refactoring methods that can be applied?

解决方案

A Big Ball Of Mud normally occurs because of one of the following:

  • Change of Requirements - You architect a solution with one set of requirements, which over time change and now, you are probably catering to a different audience who wants to use the same product with slightly different requirements. You bake those requirements into the same product and you end up with a BBOM.

  • Change of Developers - The original product has been created by one set of developers with certain design and architectural assumptions which are not entirely evident to a whole new set of developers who 'take over' the product for maintainence or further development. The new developers make their own assumptions and over time, the product degrades into a pile of unmaintainable junk.

  • Incompetency - of the developers (they are unaware of anti-patterns), the management (too demanding, lack of knowledge of the product) or the users (they don't really know what they need). This is hard to solve.

Sometimes, the best solution is simply to rewrite the application catering to the new requirements. But this is normally the worst case scenario. The cumbersome solution is to stop all new development, start by writing a set of tests and then redesign and rearchitect the whole solution. This could take years, depending on the size of the product, though.

这篇关于如何克服反模式“大泥泥”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆