Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7589453 建立时间:2006年5月29日 |

| |
[设计模式]单例模式陷阱 软件技术
lhwork 发表于 2006/8/26 13:05:02 |
今天去jdon,看了它的设计研究栏目,bang有几篇评论单例模式的文章,声称“Singleton is evil”(见http://www.jdon.com/jive/article.jsp?forum=91&thread=17578),并且引用几篇外文页面佐证自己的观点,其中有一篇文章更是说,单例不仅不是一种模式,而是一种反模式。 下面我谈谈我对单例模式的看法。逐一分析单例模式的陷阱,帮助大家正确使用单例模式。 (1) 陷阱一:调用函数的性能瓶颈 在c++中,单例只有一种实现 |
|
[Prototype(Ajax)]prototype.js开发笔记 软件技术
lhwork 发表于 2006/8/25 10:56:54 |
覆盖版本 1.3.11. Prototype是什么?或许你还没有用过它, prototype.js 是一个由Sam
Stephenson写的JavaScript包。这个构思奇妙编写良好的一段兼容标准的一段代码将承担创造胖客户端, 高交互性WEB应用程序的重担。轻松加入Web
2.0特性。如果你最近 |
|
[Grails]Grails 软件技术
lhwork 发表于 2006/8/24 9:54:46 |
下载安装
准备
使用Grails前,您需要如下步骤:
安装java1.4或更高版本,并设置JAVA_HOME到安装路径。
步骤
[下载] Grails最近发布版本解压文件到选择路径设置环境变量GRAILS_HOME,指向解压后文件路径。(如 Windows上C:\grails 、Unix上 ~/grails )添加Grails中的bin目录到PATH环境变量 (如 Windows上 %GRAILS_HOME%\bin 、 Unix上$GRAILS_HOME/bin)在命令行输入"grails",若显示出帮助信息,您就可以使用Grails了。
|
|
[Java Open Source]谈谈Grails,以及Ruby on rails  软件技术
lhwork 发表于 2006/8/24 9:49:34 |
Grails顾名思义groovy on rails,一个用groovy模仿Ruby on
rails的project,昨天刚刚发布了0.1版本,0.2版本正在紧锣密鼓的开发中。今天花了点时间看了看grails的文档,基本上完全模仿
ruby on rails的开发模式和架构。grails底层实际上使用的是Hibernate3.1/Spring IoC/Spring
MVC/Sitemesh/Dynamic Tag/AJAX(prototype, rico,
YAHOO.js)这样的架构,但是通过groovy对底层进行了封装,提供了简单的,高度近似rails的编程模型,同时使用annotation和
CoC方式消除了XML配置文件的存在。
Groovy了解了一下,最近三个月开发变得非常活跃,似乎要在JavaOne上面有所动作。目前来说,grails还比较初级,还需要耐心等候项目的成熟和完善,不过我个人对grails的编程方式相当感兴趣,愿意去尝试grails。
另外一个感 |
|
[Hibernate]EJB3.0 many-to-many relation in action 软件技术
lhwork 发表于 2006/8/23 16:52:30 |
Recently, I have made a demo application with EJB3.0 for an in-house presentation about the new EJB version. I used the OracleToplink-based implementation in the JDeveloper 10.1.3 EA release (so not the final release) and the OC4J 10.1.3 DP4
container for the run-time environment. The demo showed the attendance
how you easily u |
|
[Apache(jakarta)]用Commons-Email来发邮件 软件技术
lhwork 发表于 2006/8/23 9:54:20 |
Commons-Email项目旨在提供邮件发送的API,它是在JavaMail API的基础上构建的。
Some of the mail classes that are provided are as follows:
SimpleEmail - This class is used to send basic text based emails. MultiPartEmail - This class is used to send multipart messages. This allows a text message with attachments either inline or attached. HtmlEmail
- This class is used to send HTML formatted emails. It has all of the
capabilities |
|
[算法]html代码过滤 软件技术
lhwork 发表于 2006/8/23 9:46:26 |
/** * This method takes a string which may contain HTML tags (ie, <b>, * <table>, etc) and converts the '<'' and '>' characters to * their HTML escape sequences. * * @param input the text to be converted. * @return the input string with the characters '<' and '>' replaced< |
|
|