综合编程

JS Plugin Load Issue

微信扫一扫,分享到朋友圈

JS Plugin Load Issue
0

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 :)

Problem courtesy of: Taylor Evanson

Solution

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.

Solution courtesy of: Jason M. Batchelor

Discussion

There is currently no discussion for this recipe.

This recipe can be found in it’s original form on Stack Over Flow
.

阅读原文...


CSS3 Recipes

新研究发现数百种医疗方法和程序根本无效

上一篇

上海加紧推进5G网络部署 已建2000多个5G基站

下一篇

您也可能喜欢

评论已经被关闭。

插入图片
JS Plugin Load Issue

长按储存图像,分享给朋友