Git Product home page Git Product logo

meteorrider's Introduction

MeteorRider

An approach for integrating PhoneGap/Cordova + Meteor (telling PhoneGap where to get content from, letting Meteor hijack your PhoneGap app's HTML/CSS/JS)

NOTE: This is perhaps the "simplest" approach as of right now... but I have noticed when using PhoneGap plugins some complications with this approach and am in fact using the "iframe" appraoch from @raix for larger projects.

For more info, a comparison of approaches

That said, this remains a very fast and simple approach - keeping it an option makes sense.

Installation / Usage

There are only a couple of files, and you can choose to manage them however you like... but here's a quick set of commands to get you going...

cp pathtoyourphonegap/../
git clone <git-url>
cp pathtoyourphonegap/assets/www/index.html pathtoyourphonegap/assets/www/index_old.html
cp MeteorRider/www/index.html pathtoyourphonegap/assets/www/index.html
cp MeteorRider/www/js/* pathtoyourphonegap/assets/www/js/

Configuration

Edit your index.html file.

Put in whatever "loading" code you want. (note: we may provide a means of caching a loaded Meteor app page, for a future release)

edit the JS object __MeteorRiderConfig__ and most importantly the meteorUrl property - it should be the full URL to your meteor app, and it should not have a trailing slash.

Note: phonegap has to be able to find that URL, so if you are running a local development Meteor application, it has to be available on your LAN, and PhoneGap has to be able to route to it.

Configuration for PhoneGap

In the PhoneGap configuration, you will have to allow access to the Meteor app url/domain. Refer to the configuration documentation for your version of PhoneGap.

Roadmap / Goals

The main goal is to provide a simple, fast, and standardized way to connect PhoneGap to Meteor. The combination is very powerful, and there are a few approaches for this, but our aim is to be the best.

Goals:

  • PhoneGap version agnostic
  • Meteor version agnostic
  • Device agnostic (Android and iOS only ones experiemented with)
  • Minimal configuration / setup

Tasks:

  • standarize the JS and tighten it up
  • remove the temp hack for loading the '/' url -- figure out how to trigger that without the hack
  • invesigate loading just the HEAD data from the AJAX reques
  • invesigate loading the JS files (from Meteor) via AJAX so that we know when completed and could trigger callbacks
  • make the meteorUrl strip tailing slahes, so config doesn't matter
  • implement a custom event for "MeteorRiderFinished"
  • implement a warning/alerting system for device/connection state (PhoneGap version dependancies?)
  • we may provide a means of caching a loaded Meteor app's HTML, and using that as a loading page.
  • we may provide a means of setting up an "offline" page

Authors / Acknowledgements

This is the "Option 3" approach I've been thinking about for a while.

Inspiration and collaboration from:

I'd like to thank both of them for communicating with me while figuring out what my options were and for collaboration on this project.

Background:

http://prezi.com/ig9gjm11mwsi/from-zero-to-mobile-web-app-in-sixty-minutes/

http://zeroasterisk.com/2013/08/22/meteor-phonegapcordova-roundup-fall-2013/

meteorrider's People

Contributors

zeroasterisk avatar

Watchers

Rafael Beckel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.