Hybrid

Evil or Angel

Created by Howard.Zuo / @leftstick

What is Hybrid?

In software engineering

Building GUI with web technology along with a native container, and allow it to access the wider functionality of the device and produce a more refined user experience

Why Hybrid is so popular?

  • More powerful than web. Possible to access low level functionality via native API
  • More flexible than native. Updates/refactor on UI is easy to achieve
  • Release cycle is shorter. No need to wait for approval from App Store
  • Development is more efficiency
  • Developer is easier to hire

Is Hybrid only for mobile?

No, basically desktop is covered as well.

What are the popular mobile solutions?

What are the popular desktop solutions?

How Hybrid works?

Render with web engine

Render with nativeUI

What shall we do today?

We are going to create few apps in next minutes

Try ionic


#install ionic and cordova

[sudo] npm install -g cordova ionic ios-sim
						

#create app via ionic generator

ionic start ionic-app sidemenu
						

#add platform support

cd ionic-app
ionic platform add ios
ionic platform add android
						

#compile source

ionic build [ios/android]
						

#debug

ionic emulate ios  --livereload #for ios
ionic run android  --livereload #for android
						

Try React Native


#install react-native

[sudo] npm install -g react-native-cli
						

#create app via react-native-cli

react-native init rnApp
						

#debug for ios

cd rnApp
open ios/rnApp.xcodeproj # open projcect via xcode
						

#debug for android

cd rnApp
react-native run-android
						

Try electron


#install generator-electron-naive

npm install -g generator-electron-naive #use sudo if you are on *nix OS
						

#create app via generator-electron-naive
yo electron-naive #answer following questions
						

Project generated!!!


#godo test-project

cd test-project #the name might be different in you case
						

#generator desktop executable app

npm start #the same as "gulp"
						

Executable app generated!!!

Try finding it at dist/v0.36.10/

Welcome to Hybrid world

- generator-electron-naive