views:

51

answers:

3

My application downloads images from the web and encloses them in custom Image objects. Using my Image class I can extract particular data from the images. That data is eventually presented to the user.

With the model-view-controller paradigm in mind, can my Image class be considered a model class or a view class?

+1  A: 

It would be considered a model - a view is usually a UI template that a model is mapped to.

In a web-based MVC implementation the view is the HTML template into which the data from the model is populated for display.

Andrew Hare
Accepted Bal's answer because he's just starting out I think, but thanks anyway for your answer.
Rits
That was very nice... thanks :)
Bal
+1  A: 

You answered it yourself when you said "the data is eventually presented to the user". The model is the programmatic representation that you can modify/manipulate/extract data from. The view is the "presentation". Your image class "eventually" gets presented. That presentation is the view. The image class is the model.

Bal
+1  A: 

A ViewModel class should only contain properties and view spesific logic such as formatting, deciding which data should be visible and so on

TT