J2EE Technich
jsp,jdbc,ejb,spring,hibernate,etc
Mediator 設(shè)計(jì)模式
摘要: 這個(gè)模式一直沒(méi)有好好的理解。最近作IM 相關(guān)的應(yīng)用,才明白了。
就是兩個(gè)人之間要溝通,不是直接,而是通過(guò) mediator.
也就是 ,不是
user1.sendMessage(user2,"some message");
而是
user1.getMediator().sendMessage("user2","some message");
有什么好處呢:
職責(zé)分離:mediator 完成自己該承擔(dān)的職責(zé)。
mediator 也可以搞這搞那。
插一段實(shí)際代碼: 閱讀全文
就是兩個(gè)人之間要溝通,不是直接,而是通過(guò) mediator.
也就是 ,不是
user1.sendMessage(user2,"some message");
而是
user1.getMediator().sendMessage("user2","some message");
有什么好處呢:
職責(zé)分離:mediator 完成自己該承擔(dān)的職責(zé)。
mediator 也可以搞這搞那。
插一段實(shí)際代碼: 閱讀全文
推薦一篇 StAX and WoodStox 的介紹文章,英文
摘要: StAX the odds with Woodstox
剛讀了,感覺(jué)不錯(cuò)。
Over a decade into XML evolution, however, these parsing technologies are slowly showing their age, requiring bypasses and optimizations to overcome their well-known limitations. StAX, or Streaming API for XML, is the new-age XML parser that offers the best features of the existing models, and at the same time provides high performance and efficient access to the underlyi 閱讀全文
剛讀了,感覺(jué)不錯(cuò)。
Over a decade into XML evolution, however, these parsing technologies are slowly showing their age, requiring bypasses and optimizations to overcome their well-known limitations. StAX, or Streaming API for XML, is the new-age XML parser that offers the best features of the existing models, and at the same time provides high performance and efficient access to the underlyi 閱讀全文
posted @ 2007-07-23 10:36 西津渡| 編輯