Do We Need Design Patterns?


Do We Need Design Patterns?

In the previous week I have been asked “do we really need design patterns
when we write code?”. Since one of the first things that I wrote in my blog
was a design patterns series you probably would think that I answered SURE!
or other absolute answer.
That isn’t the case.
The question was raised since I saw that a developer tried to enforce a
design pattern (abstract factory) that wasn’t needed in some place in the
code. What I really believe in is that design patterns are guidelines
of how to build better object oriented design but…
sometime it is being abused like every other aspect in programming.
You don’t need to enforce a pattern in code if what you only need is very
simple implementation.
Yes, reusability, scalability and other phrases that are connected to design
patterns
are very important but so does simplicity or other
object oriented design principals like S.O.L.I.D.

In conclusion, we need design patterns but there are other things to consider
when you develop an application. To write it in other words –
When the only tool you have is a hammer, it is tempting to treat everything as
if it were a nail
” - Abraham Maslow.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值