JAVA
soso_gong
这个作者很懒,什么都没留下…
展开
-
Bad Smells in Code
1.Duplicated Code Same expression in two methods of the same class: Extract Method Same expression in two sibling subclass:Extract Method ,then Pull Up Field Duplicated code in two unrelated原创 2005-03-22 10:55:00 · 658 阅读 · 0 评论 -
J2EE的13种核心技术(二)
来源:UML软件工程组织Java Naming and Directory Interface (JNDI)JNDI API被用于执行名字和目录服务。它提供了一致的模型来存取和操作企业级的资源如DNS和LDAP,本地文件系统,后者在应用服务器中的对象。在JNDI中,在目录结构中的每一个结点称为context。每一个JNDI名字都是相对于context的。这里没有绝对名字的概念存在。对一个应用来说,原创 2005-03-22 19:07:00 · 725 阅读 · 0 评论 -
J2EE的13种核心技术(一)
来源:UML软件工程组织Java最初是在浏览器和客户端机器中粉墨登场的。当时,很多人质疑它是否适合做服务器端的开发。现在,随着对Java2平台企业版(J2EE)第三方支持的增多,Java被广泛接纳为开发企业级服务器端解决方案的首选平台之一。J2EE平台由一整套服务(Services)、应用程序接口(APIs)和协议构成,它对开发基于Web的多层应用提供了功能支持。在本文中我将解释支撑J2EE的13原创 2005-03-22 19:04:00 · 835 阅读 · 0 评论 -
Refactoring Notes-Refactoring Methods
1.Extract Method Turn the fragment into a method whose name explains the purpose of the method.Before: void printOwing(){ Enumeration e =orders.elements(); double outstanding=0; //print原创 2005-03-21 20:00:00 · 546 阅读 · 0 评论 -
Refactoring Notes-Refactoring Methods(3)
5.Introduce Explaining Variable If you have a complicated expression,put the result of the expression, or parts of the expression , in a temporary variable with a name that explains the purpose.原创 2005-03-23 15:09:00 · 586 阅读 · 0 评论 -
Refactoring Notes-Refactoring Methods(2)
2.Inline MethodUser Inline Method when someone is using too much indirection and it seems that every method does simple delegation to another mehtod.Before:int getRating(){ return (moreThanFiveLateDel原创 2005-03-22 20:11:00 · 907 阅读 · 0 评论