I just finished the Basic Tutorial of meteor because i want to use it for my Degree project and i tried the localmarket example and it have some of the functionalities that i want to implement, but the only thing that i didn’t understand is if i can have a “landing page” for web version and in the Mobile version the application itself ?
The thing is, i must have a web version with only a few functions of the mobile version (login to your account, see some basic info and edit some of it) and ofc the landing page. Is that possible?
Hmmm what i am doing now is write an meteor app for the web version i mean for the website and make another app that will have native feeling using famo.us, ionic etc and connect between them with DDP. this reduces the size of the app in the store.
mean while you can also try to compare
if(Meteor.isCordova)
// load templates for the mobile users if you want under same app
but the major problem will be the styles dependency between them and the mobile app becomes bit higher size.
I read about it in another question here in the forum, but, it will allow me to have like 2 complete different views (web/mobile) and share the server logic?
now i understand ! thank u so much !! I don’t care about the browser version because will be a responsive landing page ^^.
A off topic question, what happens when the mobile application don’t have internet connection? what happen to a logged user ? this session is lost? I’m asking coz at this moment i know that the mobile application only connect to a server don’t story anything (?) (i’m just learning so there’s a lot of things that i don’t understand)
Another solution is to create 2 separate Meteor apps. You can share server logic by symlinking the server folder between your projects. (ln -s ~/meteorapp1/server ~/meteorapp2/server)
once you connect with DDP we can call the methods through the DDP and subscribe them as well.
DDP is simple, lightweight and powerful
eg,
webversion=DDP.connect(‘webversionUrl’);
someCollection=new Mongo.Collection(‘collectionName’,webversion);
// Now we can subscribe the data as
webversion.subscribe(‘getData’,someparams);
after the subscription is ready() we will have the data fetched to the someCollection mongo Collection in client side of mobile app
similary for calling the method of the webversion we can write as
webversion.call(‘methodName’, someparams, callbackFunction);
My guess is that unless you check Meteor.isCordova in your router…then you have named templates with the same name in each of these files (my_template_cordova.html and my_template_browser.html). Is this the usecase? Well, the usecase of a very lazy person, such as myself
my_template_cordova.html (assuming I’m using meteroic:meteor-ionioc here):
Hi Sanjo,
I want to differentiate between mobile and desktop browsers since I want to include ionic only on mobile browsers and in cordova apps. Do you know how to distinguish between them?
something like web.cordova + web.mobile would be very useful!