What Goes Wrong with Language Definitions and How to Improve the Situation
Ionic best practices
1. Ionic Coding Standards.
The purpose of the Ionic coding standards document istocreate abaseline for collaboration andreview within various aspects of the HTML project and
this document will helpdevelopers tounderstand how he/she canwrite better code, sothat other developers canbetter understand it.
Do’s
Ready with prerequisite:
Weneed tohave Node.js and Git installed inorder toinstall both Ionic
andCordova. Ifyou're awebdeveloper chances are that you already
have these tools installed. Ifnot, just visit the aforementioned
websites andinstall them.
Prepare your local development:
For Android you needtoinstall Java andAndroid SDK. For iOSyou
need tohave aMAC withXcode.
.
Choose ionic version wisely:
Before start ionic coding check withteam regarding angular version.
Know platforms and versions will you support:
For the most part, it istrivial to support iOS6, iOS7, and iOS8, and
Android 4.4 (KitKat, version 19), with Cordova-blessed andthird-party
plugins, andmodern-browser-friendly HTML5 andCSS3. Asanaside,
both the Facebook andTwitter iOSapps only support iOS6andlater.
It isnot aseasytosupport iOS5 and earlier asthese versions have
been deprecated inCordova asofversion 3.5.
Know what form factors will you consider:
Willyou support only mobile phone or tablet form-factors, or provide
aresponsive, universal experience? This question candramatically
change your designer, developer, and tester resource requirements
for agiven project. Justas eachplatform and platform version will
introduce anextra level of effort, each form-factor/breakpoint setting
will introduce anewlevel of effort for designers and developers.
Understand build process:
It’s important tounderstand the concept ofthe Ionic build process
andthe reason why this process isrequired. The build process takes
the code from the app/ folder andcreates builds for allplatforms
which have been added toyour project inwww/build/. (Configuration
Files,Hooks Folder andResources Folder…).
Test your app different ways:
Test your appusing with the helpof ionic-lab, Simulators andReal
Timedevices.
Enable Native Scrolling:
Native Scrolling allows Ionic tolistentoscrolling events onsupported
web views. It makes Pull toRefresh.
Add Crosswalk for Android:
Every Android version runs adifferent WebView. The performance is
different across devices, andit canbe reallybadonthe oldAndroid
devices. Toget the sameexperience withfluidity andresponsiveness
onevery Android device, you caninstall Crosswalk. It basicallyembeds
the latest Chromium browser intoyour application
Don’ts
Don't use Cordova unstable plugins
Don't make data-tap-disabled tag false:-it breaks
touch/mouse events for 3rd party library (such asamap
widget).
Don't use unstable release of node
Don’t use older version Cordova
Don't use older Ionic CLI.
Don’t store sensitive data inlocal storage.