banq
2005-11-02 12:22

框架是银弹吗?

今天在TSS看到一个老外Paul发言,他指责框架是银弹,意译:

所有这些框架都是银弹,很显然他们中没有一个会强大得充足或者持久(兔子尾巴长不了),讽刺的是:虽然他们号称减少复杂性,但是实际是相反(我以前从来不需要所有这些XML文件,复杂的ID和ORM工具),

有趣的是,在EJB突然出现以前,你并没有听到很多关于好的设计的讨论,开发者似乎被这些架构许偌的美景迷住了,无论如何,一旦你需要帮助时,你得迈出他们的盒子box,你迷失了。 这些天所有我听到是新语言,IDE工具,好像可以使编码简单。

不就是显示和数据层分离吗?这并不难,使用Jsp/Servlet/JDBC也可以实现,只是人们并没有很好地去设计,是设计问题,也没有工具来纠正这些设计问题。

All these frameworks seem like silver bullets and this is evidenced by the fact that none of them seem to have much staying power. The ironic thing is that instead of decreasing accidental complexity, they seem to increase it. (I never needed all these XML files, complex IDEs, and ORM tools before) It's funny that you don't hear much discussion about good design anymore ever since EJB's popped up. Developers seemed to be enamored with the paint-by-numbers approach towards design that these architectures seem to promise. However, once you have to step outside of their box you find that rather than helping you, they get in your way. All I seem to hear about nowadays are new languages, IDE's, tools, etc that are supposed to make coding easier. What happened to good design? It's amazing that a whole sub-industry has popped up to just replace the layer that places data in an HTML page and the layer that gets data from the database. It's not that hard. You're moving a value from one place to another. It doesn't require a new paradigm or a tool set beyond JSP's, Servlets, and JDBC. These are simple tools that do the job and they're appropriately simple for the simple problem they solve. I've found they only suck when people can't design properly, but no tool is going to fix that.

我的评论:最难的是最后一句:没有任何工具或框架来改正人们错误的设计,那么只有在编码之前,使用可配置性的框架来指导人们编程,引导他们走向正确的设计方向。就象为防止小树长歪,需要用杆子绑定扶持一样。

当然,逼迫使用框架的人就有满腹抱怨了,配置麻烦,所以,好的框架是既能达到引导好的设计目的,也要易于使用的优点。

banq
2006-02-10 12:10

相关讨论:

终于有人开始反感Java 1.5的Annotation了

http://www.jdon.com/jive/thread.jsp?forum=91&thread=22356

2Go 上一页 1 2