1

What combination of libraries/frameworks would perform best for an HTML5/CSS3/JS app with moving elements? I have definitely done my homework, but I am diving into a world I don't know very well... as far as performance goes at least. Are there principles I should understand before I manipulate, perform logic on and animate DOM elements?

I am going to use AngularJS if I can and should (i'm fairly familiar with the basics now), and my best research has pointed me towards Steroids.js. There are just so many libraries and PhoneGap-like frameworks! Here's what I have found...

In short, is there any sort of resource/documentation/reference or testing method of JavaScript load? Or is there any kind of simple answer to this (outside of giving up and learning Objective C, I would really like to be able to use the languages I already know. Thanks for the read :)

Community
  • 1
  • 1
Taylor Evanson
  • 384
  • 4
  • 16
  • If you are planning on using angular and cordova you should try out Ionic. http://ionicframework.com/ These guys are building an amazing framework for angular with cordova. My suggestion is to keep it simple, and iterate. I have been working with cordova for about 2 years and everytime I build an app I learn something new. The best way to go with animation is to have a light DOM and use as few libraries as possible. Ionic is putting in a lot of good work to make this possible. – Dawson Loudon Feb 21 '14 at 17:31
  • Everytime I read the phrase "Develop once, deploy everywhere." I start to develop a throbbing migraine ... I can't believe they put that on their /homepage/... – Jason M. Batchelor Feb 21 '14 at 17:34
  • Why is WebGL/Three.js on this list? – gman Feb 22 '14 at 04:33
  • three.js uses WebGL to live render on a element -- technically, DOM manipulation. Thanks for the help gman! – Taylor Evanson Feb 22 '14 at 04:37

1 Answers1

2

In the end, if you want more native functionality to be part of your app, you will have to learn at least two other languages outside of JS: ObjC and Android-flavored Java.

My experience with Cordova was enough to convince me that aiming for a perfectly native-feeling app with Cordova requires you to essentially rebuild a large amount of native functionality in JS, which places you firmly at the mercy of the web core that each OS uses and their limitations. Eventually, you will find yourself using so many libraries to emulate what you can do with the native languages, that the sheer weight of dependencies and their management can very quickly leave you trying to debug shadows.

Even then, there will be things that you have to find hacks for to get near-native functionality for, and performance will hardly ever be as good as a native-language app, especially if you have to load data or resources from outside your application.

My suggestion is that if you must use something like Cordova, give up on the idea that you're going to be creating a 100% native feeling app. If a UI element doesn't work like its native equivalent, don't spend a lot of time trying to force it to work counter to its web roots. Style it appropriately so that users aren't confused by it breaking native conventions, and move on. If you try to fix everything that looks like but acts not /quite/ right, you're going to find yourself in dependency hell and /still/ having to touch native (Java or ObjC) code to get the plugins to work right.

Jason M. Batchelor
  • 2,951
  • 16
  • 25
  • I agree. Eventually you will need to do something that there isn't a javascript library out there to accomplish and you have no idea how to write it yourself. You'll look back at the native SDK and find that it is already supported there. Depending on what you are doing, you sometimes need to be willing to compromise with these alternate frameworks/SDKs. They can work for most applications. Present information and edit it as well as tap into many media options. Know what you'll need for your project and make sure it is supported somehow in advance. – Martin Feb 21 '14 at 19:10
  • This is the most helpful answer I have gotten on StackOverflow, ever. I don't have a high reputation so no one will answer my long questions haha :) you gave me the push I needed, i'm going to learn Android-flavored Java. Thank you! – Taylor Evanson Feb 22 '14 at 01:46