design patterns - When NOT to use MVP/MVC? -
okay question find few proper arguments for/against.
i appreciate value these patterns provide testability , separation of concerns. in cases have sort of data store(s), presented user in different ways.
but consider application each model bound 1 view. example maybe audio format converter, small gui sitting on (a) big api(s) back-end. ui needs basic validation (for paths , formats), , rest left back-end.
would benefit of using 1 such pattern here justify code? personally, see unneeded overhead, may wrong, hence question. :-)
edit:
the example application wrote here seems have been distracting people main point of question. i'm asking when mvp/mvc not good. here's quote golden 4:
no discussion of how use design patterns complete without few words on how not use them. design patterns should not applied indiscriminately. achieve flexibility , variability introducing additional levels of indirection, , can complicate design and/or cost performance. design pattern should applied when flexibility affords needed.
and that's main point of question. couldn't find few words on how not use [mvc/mvp], question attempt that. said above, appreciate value provide, want know when horrid idea. no pattern way sure?
you might want read of answers question : reasons not use mvc architecture web application
furthermore, on this page can read this: (by reversing "why should i.." might ideas too)
choose mvc if . . .
you well-versed in architecture of mvc. if aren't comfortable how design controller, mvc isn't choice. want full control on html rendered in browser , can afford development time , overhead of own markup. need create efficient unit tests user interface without overhead of entire managed runtime, etc. - want full control on how urls formed.
choose web forms if . . .
- you not familiar designing mvc applications.
- you need minimize development time.
- you want feature-rich user-interface (such gridviews, etc.) display data rich interaction without substantial development investment.
- you invested in server controls, either own development or 3rd parties.
other useful explanation here : you should not use asp.net mvc if... , says, in short :
- you not comfortable polymorphism
- you aren’t willing build on top of framework
- you rely on 3rd party vendor controls lots of ui
- you averse using open-source libraries
Comments
Post a Comment