J2EE Technich
jsp,jdbc,ejb,spring,hibernate,etc
Mediator 設計模式
摘要: 這個模式一直沒有好好的理解。最近作IM 相關的應用,才明白了。
就是兩個人之間要溝通,不是直接,而是通過 mediator.
也就是 ,不是
user1.sendMessage(user2,"some message");
而是
user1.getMediator().sendMessage("user2","some message");
有什么好處呢:
職責分離:mediator 完成自己該承擔的職責。
mediator 也可以搞這搞那。
插一段實際代碼: 閱讀全文
就是兩個人之間要溝通,不是直接,而是通過 mediator.
也就是 ,不是
user1.sendMessage(user2,"some message");
而是
user1.getMediator().sendMessage("user2","some message");
有什么好處呢:
職責分離:mediator 完成自己該承擔的職責。
mediator 也可以搞這搞那。
插一段實際代碼: 閱讀全文
推薦一篇 StAX and WoodStox 的介紹文章,英文
摘要: StAX the odds with Woodstox
剛讀了,感覺不錯。
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 閱讀全文
剛讀了,感覺不錯。
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 西津渡| 編輯