張凱迪(KD Chang)
台灣大學,主修經濟學,臺大資管所。服務過上市電子公司、人工智慧新創公司、全球前三大瀏覽器製造商和電子商務平台,也曾參與數個組織的創辦。夢想是做出人們想用的產品和辦一所心目中理想的學校。
KD Chang
iOS
Android
Hybrid
Write Once, Run Everywhere !
Write Once, Bug Everywhere !
Hybrid Mobile App
Mobile UI
JS Framework
Device Library
Database(Restful)
// 安裝 ionic, cordova, Node.js 4
$ npm install -g cordova ionic
// init project
$ ionic start myApp tabs
$ cd myApp
// add platform
$ ionic platform add ios
// build app
$ ionic build ios
// emulate, run app
$ ionic emulate ios
$ ionic run ios
1. Good community and ecosystem
2. Native UI component, Good performance!
3. Learn once, write everywhere!
4. Code reuse, from the Web
$ npm install -g react-native-cli
$ react-native init AwesomeProject
// iOS
var React = require('react-native');
var { TabBarIOS, NavigatorIOS } = React;
var App = React.createClass({
render: function() {
return (
<TabBarIOS>
<TabBarIOS.Item title="React Native" selected={true}>
<NavigatorIOS initialRoute={{ title: 'React Native' }} />
</TabBarIOS.Item>
</TabBarIOS>
);
},
});
// Android
var React = require('react-native');
var { DrawerLayoutAndroid, ProgressBarAndroid } = React;
var App = React.createClass({
render: function() {
return (
<DrawerLayoutAndroid
renderNavigationView={() => <Text>React Native</Text>}>
<ProgressBarAndroid />
</DrawerLayoutAndroid>
);
},
});
By 張凱迪(KD Chang)
Ionic(Angular) Hybrid App vs React Native Mobile App Intro
台灣大學,主修經濟學,臺大資管所。服務過上市電子公司、人工智慧新創公司、全球前三大瀏覽器製造商和電子商務平台,也曾參與數個組織的創辦。夢想是做出人們想用的產品和辦一所心目中理想的學校。