What's inside the Model of the MVP-pattern

Posted by AlbersC under Design Pattern & Practices on 2/7/2012 | Points: 10 | Views : 1761 | Status : [Member] | Replies : 6
Hi everybody,
I'm starting to use the Model View Presenter pattern. I read quite a lot and I have seen some examples. What is not very clear to me is what the contents of the Model should be. In some articles/examples it seems that the Model is member of the Presentation layer and only contains the data of the View. In other articles/examples it seems that the Model is member of the Data layer and contains the data related to the underlying database. Can someone give me some advice in this or give me some good examples? Thanks a lot!

Best regards,

Corné Albers



Responses

Posted by: Blessyjees on: 2/7/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

Model contains the business logic and data base operations. i.e. this layer manipulate the data of the view.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

AlbersC, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: AlbersC on: 2/7/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Blessy,
Thanks for your quick reply. If I understand your answer correctly this means that it should contain only the data of the view and that the Model is part of the Presentation Layer?


Best regards,

Corné Albers

AlbersC, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 2/7/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

model is not the part of the presentation layer. Model is the combination of business layer and data access layer.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

AlbersC, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: AlbersC on: 2/7/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Blessy?,
Do you perhaps know where I can find a good example of this pattern, specially where I can find a good example of the implementation of the Model? Thanks for your help!

Best regards,

Corné Albers

AlbersC, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 2/7/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

Refer this link http://nomisit.wordpress.com/category/patterns/

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

AlbersC, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: AlbersC on: 2/8/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Blessy,
Thanks a lot for your help! Things become clearer for me now. Thanks again!

Best regards,

Corné Albers

AlbersC, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response