Coffka
Coffka

Reputation: 759

Model-View-Presenter. Model is a list - Is it right architectural decision?

Let me show you an abstract example: I have a weather machine which can produce different type of weathers: snow (falling snowflakes), rain, etc...

Every snowflake or raindrop is a view: so i have many views.

Because I want unique algorithm of falling, every snowflake or raindrop has its own instance of class. That's why in my opinion model must be a list of snowflakes/raindrops.

Presenter receive events of wind changing, falling speed changing and change model properties.

Is it right architectural decision?

Upvotes: 0

Views: 230

Answers (1)

Nick Ramirez
Nick Ramirez

Reputation: 483

I am no expert on animation and graphics, but using instances of classes for every rain drop is going to eat up a lot of memory and possibly not be very fast. MVP doesn't sound like the right fit for graphics programming. Have you considering using something like XNA?

Upvotes: 1

Related Questions