Cordova is used to build hybrid applications, it uses a set of build tools to create native language output(apache ant, xcode, java etc.). Code once, deploy to many. There are so many articles out there on both sides of the argument, should I build native or hybrid.
Going native will have the drawback of having to almost completely rewrite for each OS, the obvious result will be longer dev time.
Hybrid will have loads more configuration and tweaking but can cut dev time by a lot.
For an absolute beginner I would suggest heading over to telerik and checking out there online hybrid builder. It's really easy to use, has a ton of great working examples and comes with a 30 day evaluation with full access to all of their services.
They also support and promote the new nativescript language which I think is something to consider, still young but looks amazing.
Plus their VisualStudio App builder plugin is really something special, and I would buy their service just for this great building tool alone.
So take some time and think on these...
- Decide what your application's needs are
- Decide what frameworks best solves your application needs
- Do research on how these frameworks integrate and compliment each other
Determine what frameworks you will be using with cordova, for instance if you are going to use ionic I suggest looking at Angular + firebase.
If you're trying to keep it clean, or using JQuery then you should start looking at yourweb storage solutions (localstorage, sqlite, webdb).
But with all of these you will probably end up having to use some sort of middleware likeNode + Express to build a RESTful API. It's never a bad idea to learn RESTful structure, as in my opinion this will just increase in importance as javascript becomes the preference for web applications and integration of new and old services.
There are also nosql DBs like MongoDB or Couch/pouchDB (Apache) If you are heading in the MeteorJS direction you will be using MongoDB, were as Couch/Pouch seem to be where real time sync storage is heading. Both have tons of great tutorials and functional material out there.
I also found some great frameworks like localForage that makes using localstorage incredible easy and gives you callbacks on stored data. The main planning point around local storage is that no one browser or device has a set storage size, but there are ways to determine size and availability.
These are just some of the things that I had to work with to get cordova applications up and running that integrates with Web APIs.
- If it complicates things, you probably don't need it.
- Modular is always better.
- And always, always, always check for device ready before you load anything else.
- document.addEventListener("deviceready", onDeviceReady, false);
- function onDeviceReady() {
- // Now safe to use device APIs
- }
I hope this helps, happy coding.
If you need help setting up your development environment check out this post.
Comments