开发者

Gateway Patterns

I have a class for example called person and I have a method inside it开发者_JAVA百科 called GetPeople that returns a list of person objects. I doesn't necessarily go to a database to retrieve these , it can be xml, but is this the active record pattern. Should this be used or should I use a gateway pattern to retrieve all the person objects? How is this normally done or what is recommended. I don't know if it matters whether I'm getting them from a database or file or xml.


you can look at Repository pattern as well.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜