c# - MVP - Should a Presenter have one overall model or multiple models? -


i using mvp structure project in c#. had imodel interface contained crud operations, have since split number of model interfaces (e.g. inotebookmodel, icategorymodel, iitemmodel etc.) each contain crud operations.

would better have overall model has crud methods delegate appropriate specific models (e.g. create(string type)) or holds references each specific model in presenter?

if having multiple models bad way it, how can pass down appropriate parameters model objects can created/updated? each object requires different information.

having different models not bad way it.

this surely make design more complex increase app's maintainability. if you're building app needs evolutionary in future upgrades, seperate model several models. in case want add different entity app.

maybe books assigned persons, add ipersonmodel interface , 3 other interfaces (inotebookmodel, icategorymodel, iitemmodel) remain intact.

however, if application simple , want favour rapid developement centralize model 1 big model. careful, if app gets bigger, model gets more , more complex since handle app's responsabilities , have explode many several ones.

so seperate responsabilities, 1 of solids. can go further , take @ this: http://en.wikipedia.org/wiki/solid_(object-oriented_design)


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -