开发者

What is the "right" way to get a list(or more generically, just an object) available multiple places?

In a program that I'm responsible for, we want to start keeping track of milestones. These milestones are quite simple and consist of a unique identifier, the project they're assigned to, a description, and a date that they should be accomplished by (or not, if there's no concrete due date).

We use a slightly modified Model-View-Presenter architecture, and currently I'm passing this list around through the presenters, but it seems fairly clunky, so I was wondering:

What's the best way to make this list available to all the presenters/views that need it?

We're using VB.NET 3.5, and I was toying with the idea of making this a shared property of 开发者_运维百科the main presenter, but it does seem like that adds some unnecessary coupling.


I agree with Oded about keeping it as you have it, but if you insist on having it the way you describe, you could consider implementing it (the collection) as a singleton.

Have a read through this article

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜