java 可伸缩阻塞队列实现
摘要:最近一年多写的最虐心的代码。必须好好复习java并发了。搞了一晚上终于测试都跑通过了,特此纪念,以资鼓励!import java.util.ArrayList;import java.util.List;import java.util.concurrent.ArrayBlockingQueue;i...
阅读全文
posted @
2015-07-05 07:05
xhan
阅读(1004)
推荐(0)
我也质疑下petshop
摘要:很多人都研究过petshop,我开始认识分层架构也是从研究这个petshop开始的。但是我发现很多人一谈三层架构就是petshop那一套东西。实体类,DAL,BLL那一套东西。首先我不否认petshop这个架构整体的设计的合理性。但是这个合理性也是在一定的项目环境下来说的。我觉得petshop这个架构只适合比较小的项目。系统的大部分需求只是对数据库的CRUD操作。而且业务逻辑变化变化可能性很小的情...
阅读全文
posted @
2009-06-10 23:10
xhan
阅读(823)
推荐(0)
4 、服务层
摘要:Service Layer by Randy Stafford Defines an application's boundary with a layer of services that establishes a set of available operations and coordinates the application's response in each operation. ...
阅读全文
posted @
2008-01-17 12:59
xhan
阅读(346)
推荐(0)
3、表模块
摘要:Table Module A single instance that handles the business logic for all rows in a database table or view. For a full description see P of EAA page 125 One of the key messages of object orientation...
阅读全文
posted @
2008-01-16 22:24
xhan
阅读(345)
推荐(0)
2、领域模型
摘要:Domain Model An object model of the domain that incorporates both behavior and data. For a full description see P of EAA page 116 At its worst business logic can be very complex. Rules and logic ...
阅读全文
posted @
2008-01-16 20:06
xhan
阅读(423)
推荐(0)
并发术语解释
摘要:更新丢失(Lost updates):例如:A程序员打开一个类文件,在A保存文件之前,B也打开了这个文件。A修改了代码文件的一个method1()方法,B修改了代码文件的method2()方法。然后B在A之前保存了文件。这样当A保存文件时候就会把B对method2()方法的修改该覆盖掉造成了B对文件更新的丢失! 不一直读(inconsistant read):发生在读取两个各自正确的数据,而他们却...
阅读全文
posted @
2008-01-15 20:28
xhan
阅读(275)
推荐(0)
1、Transaction Script(事务脚本)
摘要:领域逻辑模式(Domain Logic Patterns) 1、Transaction Script(事务脚本) Organizes business logic by procedures where each procedure handles a single request from the presentation. For a full description see P of EAA...
阅读全文
posted @
2008-01-15 11:39
xhan
阅读(874)
推荐(0)
Microsoft .NET Pet Shop 3.x: .NET Pet Shop 的设计模式与体系结构
摘要:http://www.microsoft.com/china/MSDN/library/enterprisedevelopment/builddistapp/Microsoft.NETPetShop3.0.mspx?mfr=true
阅读全文
posted @
2008-01-02 15:58
xhan
阅读(219)
推荐(0)