开发者

Data access layer design pattern

I need to build a data access layer and I am looking for the right design pattern.

what I need is:

  1. object mapping: it shouldn't be too complicated and not generic.
  2. I have a lot of loo开发者_如何学Ck up tables and I need to a good way to load them. I don't care about starting time (when the program starts up), what I care is to minimizing the number of connections to the db and on the other hand not killing the virtual memory.
  3. relationships: I have a lot of connected objects which relate to each other and I need a generic way to load as much as relationships as I want.

Number 2(above) is most critical for me. Any suggestions?

Thanks


It looks like the Facade pattern could be used here.

and maybe the Singleton pattern too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜