netanelgilad / meteor-ionic-example

An example app using urigo:ionic package for simple app development with the ionic framwork on meteor.
72 stars 21 forks source link

Cordova #1

Closed niallobrien closed 9 years ago

niallobrien commented 9 years ago

Hi, great project by the way - please keep up the great work. I'm just wondering if you've any examples of using ngCordova. Would this be straightforward when integrating with Meteor?

netanelgilad commented 9 years ago

Thanks. I'll be looking into it, seems interesting. I'm also working on the angular-meteor project with @urigo so it seems pretty relevant.

rubytastic commented 9 years ago

Nice work, test this out soon! This is compatible with the latest Meteor?

Would it be interested to take a look at the meteor boilerplate with routing and views and create a working example based on that?

Seems like the way to go to have MVC with meteor and ionic views

Urigo commented 9 years ago

@rubytastic yes it is compatible, you can start with the angular-meteor package tutorial. We hope to add a Cordova/PhoneGap chapter next week

niallobrien commented 9 years ago

The more I play with Ionic Framework and Angular, the more I question the use of Meteor in general as opposed to the MEAN stack (mean.io, meanjs.org, Angular Fullstack - Yeoman generator)? What about you guys?

Urigo commented 9 years ago

@niallobrien my reasons:

  1. DDP+LiveQuery+Tracker - I think it is so much better then REST
  2. Meteor's PhoneGap support in installation (command line)
  3. Meteor's hot code push that saves you from going through the app store for application updates
  4. accounts
  5. Minimongo for out of the box local storage caching

For me, that is more than enough, but if you choose not to use Meteor and go with regular REST stack I would suggest hapi.js instead of express, I think it's way more modern and better and even npm chose it for their own new site

niallobrien commented 9 years ago

All valid points for sure, however:

  1. 3rd parties can't easily consume your data.
  2. Ionic makes this easy too.
  3. Not as straightforward as Meteor, but possible: http://blog.peterkim.co/tutorial-how-to-add-onthefly-updates-to-a-hybrid-app
  4. Always a PITA, even with passport.js strategies.
  5. Local storage isn't so bad, but not automagic.

My concerns with Meteor backing an Ionic app: Scaling Meteor is not as straightforward as a typical MEAN stack setup. It seems that you have to slowly break apart a Meteor app. I'm not sure how you can deploy a Meteor client to a CDN. How do you version your Meteor "API"? With a REST API, I can run multiple versions and respond to client API version requests via headers. Job queues. And how does Meteor compare to Firebase for the same purposes? Yes, Firebase costs money but so would Meteor at the same scale. Meteor allows for server side code, sure but a single node Modulous instance could handle any server side logic required (transactional email, image processing etc.) and use Firebase as a job queue. Just weighing up the pros & cons and am struggling to see the immediate benefits to Meteor other than fast prototyping.

netanelgilad commented 9 years ago

And back to the original question... :P @niallobrien Check out the latest commit. I added an example with ngCordova using the datePicker. I thought it may not work as ngCordova docs state that it needs to be loaded before cordova.js and that can't be done with meteor (yet.. an issue may be in order), but ngCordova seems to work fine even if it's loaded after cordova.js (which makes sense, cause ngCordova is just a set of angular modules for cordova).

niallobrien commented 9 years ago

Thanks, yeah I agree, your understanding of the load order seems right to me.

netanelgilad commented 9 years ago

I'm closing this issue. If any thing arises relating to ngCordova, open another issue or write up here.