How to partition Mobile and Web app views & logic?

Whats the best way to develop a distinct subset of my overall webapp features in to the mobile version of my app, currently in meteor its super easy to use responsive css to alter the presentation of my views and IsCordover() in my logic to make inform decisions about the platform but that only gets you so far.

I think i’m asking for a way to have client code and views that are mobile only, in the same way that we have Server and Client folders, i’d love to have Client/Mobile folder too because my mobile apps are often not the same in terms of features as my web apps and responsive hacks don’t give me enough flexibility.

Currently to solve this problem i’m managing two codebases with shared server code, i have also looked at having a distinct server code base and client code bases but the Meteor workflow doesn’t really lend itself to that.

How are you guys handling this situation, or am i missing an important piece of the puzzle?

1 Like


We are also struggling with this and the best solution that we can come up with so far is to structure your views in a local meteor package and then use addFiles with either ‘web.cordova’, ‘web.browser’ or ‘web’ (can also be an array and used with api.use, api.imply, and api.export). With this solution your cordova views will not be in the browser build and browser view will not be in cordova build.

It only splits between cordova and the rest (mobile browsers and browsers) so still use responsive design to cater for mobile/tablet browsers.

Let me know if this works as have not yet implemented it :smile:


I’m also wondering about this, but I’d also love to have templates that are specific to screen size for mobile browsers…

this help?