只显示主题贴

The shop object is passed in the buy() method, so the buyer doesn't know the shop in its internal state. You have to pass this object in order to know to buy from where. Treat buyer as player in your context. Sorry, I didn't follow your context. The shop interface has nothing to do with the implem ...
  • 进入论坛 Java
assume you run everything in the same process, then do you ddd. So you ignore the network complexity first to see whether you can come up something.A good design should be able to sustain the changes when you add in the network factor.Buyer{    private CashAccount account;   ...
  • 进入论坛 Java
1. Context definition is more like a hashmap, in my experience, this is very harmful when this appears in an interface. The reason is that at runtime, any key/value pair could be there and thus it breaks your encapsulation. With large set of data, this kind of runtime interface pencentration makes d ...
  • 进入论坛 Java
1. Guice doesn't have AOP and J2EE abstraction, so it has a long way to catch up. A simple IoC container is just not useful enough these days. There are a lot of accumulation of experience and abstraction built into the Spring, Guice will have a very long way to catch up. One Bob is not enough for t ...
  • 进入论坛 Java
lihy70 写道jellyfish 写道1. Obviously, there is a performance issue. 你指什么地方有性能问题? 我认为用这种方式会比传统的setter和getter快。 引用 2. There is a type cast issue when dealing with complex object structures. 不明白你说的type cast是指什么情况下的。 如果仅是指‘从复杂结构对象里存取属性值’,这里根本没有什么type cast问题。 引用 3. There will be a lot of runtime instabil ...
  • 进入论坛 Java
1. Obviously, there is a performance issue.2. There is a type cast issue when dealing with complex object structures.3. There will be a lot of runtime instability problems, i.e., data driven problems. This caused a major interface leak, i.e., the data driven behavior is leaked through interface and ...
  • 进入论坛 Java
OneEyeWolf 写道Lucas Lee 写道OneEyeWolf 写道Lucas Lee 写道我个人感觉这样的缓存似乎不会对整体性能有很大的提升. 缓存对于内存的需求倒不是关键. 需要lz实际做出来后仔细测试一下.  对于整体性能当然有很大的提升了,压力测试时,单个订单页面的频繁的load,对于数据库的压力很小,如果没有缓存,一个订单有8个子对象,加载订单页面时,相当于几十条SQL,DBA肯定要发通报的。 看起来你做过性能测试了. 能否发一下稍微详细点的性能测试对比数据? sorry, 测试不是俺做的,load runner的测试脚本,也不在我的机子,所以暂时不能提供。 对于这样 ...
  • 进入论坛 Java
江南白衣 写道jellyfish 写道I've been using tangosol for about 2 years. pretty stable. My total cache mem for cache servers is somewhere between 2.5G to 16G. Depend on the os you are running, a single cache server is limited. I am using 2.5G per server. The performance is fast if the config is right. tango ...
  • 进入论坛 Java
I've been using tangosol for about 2 years. pretty stable. My total cache mem for cache servers is somewhere between 2.5G to 16G. Depend on the os you are running, a single cache server is limited. I am using 2.5G per server. The performance is fast if the config is right.I talked with both gemfire ...
  • 进入论坛 Java
dlee 写道to jellyfish,江南白衣: 好的,我下一个定语:RPC和分布式对象这两种架构风格完全不适合面向Internet的Web应用,REST是专门为这样一类场景而量身定制的。任何一种架构风格都有它的一组基本的假设和约束,因此并不存在一种普适的“银弹”风格,REST当然也不是一种银弹风格。但是对于Internet和Web来说,REST是极其重要的,它已经足以涵盖一大批应用类型了。而来自Web开发领域的一些技术也会逐渐渗透并影响企业应用的开发(否则当年C/S结构的企业应用就没有必要向B/S结构大迁移了,在很多老一点的朋友看来完全是一次盲动),所以我相信Ajax、Ruby on Ra ...
  • 进入论坛 Java