xamarin - Why "removing any who's ViewModel PropertyType is an interface" when creating the MvvMCross View lookup table -
when creating default view lookup table in mvvmcross, there step "removing who's viewmodel propertytype interface". (http://slodge.blogspot.de/2013/01/overriding-view-lookup-convention-used.html) why step performed?
it's clear, can't instantiate interface, can navigate interface implementing viewmodels showviewmodel<imyviewmodel>()
, if write mvx.register<imyviewmodel, myviewmodel>()
. isn't view creator using di table?
when looking @ area of mvx
in 2013 didn't find users wanted hide each viewmodel
behind interfaces, , didn't come across users wanted navigate using interfaces.
instead users wanted:
- to navigate directly real
viewmodel
types - to use interfaces grouping viewmodel's - e.g.
irefreshableviewmodel
groupings.
in case interfaces used groupings - e.g. irefreshableviewmodel
quite common see base view
class implemented - , see have irefreshableviewmodel viewmodel
property. these views supposed removed in step mention.
because of this, didn't use interfaces default viewmodel navigation... , viewmodel's aren't in di/ioc/servicelocator lookup system.
however, did leave mvx open adjustment - it's in manifesto - if app wants navigate interfaces , if want views reference viewmodel interfaces instead of concrete classes, can absolutely - you'll need override setup steps put view-viewmodel lookup , viewmodel factory in place (there details on in wiki)
Comments
Post a Comment