asp.net mvc - Can .NET Web Api serve both Web and Mobile apps? -
i'm starting on new application , looking build reusable middle tier can serve both web , mobile app. build web app (running on desktop browsers) first native mobile apps (running on ios , android).
my question should build our middle tier using web api throughout entire application? great if can have our web views use custom view models , our mobile apps use json values. there give here best of both?
is valid scenario/common scenario modern applications? advice appreciated.
mattdavey's answer spot on. wanted add few more things think when trying create cross channel reusable services. reusable services across channels (web, mobile, desktop etc) subjective , hotly debated. on surface looks pretty straight forward. same business capability exposed via different view interfaces/devices. business functionality shouldn't change @ right? well, same capability offered devices regardless of form factor? not. e.g. if have 10 column grid bunch of user controls, expose same thing smaller devices? goes beyond view paradigms. e.g. allow phone users submit sensitive transactions (for e.g. financial transactions) ?
you make services highly configurable various channels, lot of customizations make services difficult maintain , brittle. not saying not possible, saying have seen in enterprises.
key think through user flow on smaller form factors , try sense of business capabilities translate across channels, , won't. besides that, using json common format mid tier idea.
Comments
Post a Comment