SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
INTRO TO WEEX:
MOBILE APPS WITH VUEJS
@Rafael_Casuso
A B O U T M E
•CTO @StayApp
•CEO @SnowStormIO
•Organizer @VueJsMadrid,
@BotDevMad
•Software Engineer with +10 years
of experience leading teams and
developing.
•Software Architect looking for
revolutionary ways to change the
world.
•Specialties: JavaScript, NodeJS,
Conversational Intelligences.
2
WHAT IS WEEX?
+ INITIAL
OVERVIEW_
‣ FRAMEWORK TO DEVELOP MOBILE APPS WITH MODERN WEB SYNTAX
‣ ITS RENDER ENGINE IS DECOUPLED FROM SYNTAX
‣ IT SUPPORTS VUEJS AND RAX
JS BUNDLE_
‣ VUEJS-LIKE JAVASCRIPT APPLICATION IS COMPILED INTO A JS BUNDLE
‣ WEEX JS BUNDLE CAN BE DEPLOYED AND DISTRIBUTED AS STATIC RESOURCE
FUNDAMENTALS
+ INITIAL
WEEX SDK_
‣ A NATIVE MOBILE APP INCLUDES WEEXSDK
‣ WEEX SDK BUNDLES AND FETCH JS BUNDLE FROM WEBSERVER
‣ WEEX SDK RUNS A JAVASCRIPT ENGINE TO RUN JS BUNDLE
‣ WEEX JS BRIDGE EXPOSES AN API TO COMMUNICATE JS BUNDLE WITH
NATIVE SIDE FOR STORAGE, MESSAGING, ANIMATION, NETWORK
COMMUNICATIONS, ETC
ENGINES_
‣ JAVASCRIPT ENGINE RUNS JS BUNDLE AND SENDS INSTRUCTIONS TO
NATIVE RENDERERS
‣ JAVASCRIPTCORE IN IOS AND V8 IN ANDROID
‣ EACH WEEX APP GENERATES A JS BUNDLE BUT A SINGLE INSTANCE OF
JAVASCRIPT ENGINE IS USED FOR PERFORMANCE
‣ VUE RUNTIME IS INCLUDED AND NOT BUNDLED
DEVELOPMENT
+ MEDIUM
DEVELOPMENT_
‣ A WEEX APPLICATION TARGETS WEB, IOS AND ANDROID
‣ IT SUPPORTS VUEJS 2+ SINGLE FILE COMPONENTS SYNTAX
‣ IT USES NPM AS PACKAGE MANAGER
‣ IT USES WEBPACK AS BUNDLER
‣ SEPARATED BUNDLES FOR WEB AND MOBILE
‣ VUE-LOADER IS THE COMPILER OF VUE FILES TO WEB JS BUNDLE
‣ WEEX-LOADER IS THE COMPILER OF VUE FILES TO WEEX JS BUNDLE
WEEX COMPONENTS_
‣ INSIDE <TEMPLATE> YOU CAN ONLY
USE WEEX BUILT-IN COMPONENTS
AND YOUR CUSTOM COMPONENTS
‣ NOT ANY HTML TAG
‣ UNDER THE SCENE, WEEX USES
NATIVE WIDGETS FOR CONSISTENCY
‣ RENDERED INTO NATIVE VIEWS
STYLES_
‣ WEEX BOX MODEL IS BASED ON WEB BOX MODEL, SO THERE ARE
HEIGHT, WIDTH, MARGIN, PADDING AND BORDER PROPERTIES
‣ WEEX STYLE BOX MODEL SUPPORTS FLEXBOX FOR PAGE LAYOUT,
INCLUIDING CONTAINERS AND ITEMS
‣ POSITION BY DEFAULT IS RELATIVE
‣ TRANSITION AND TRANSFORM ARE SUPPORTED
‣ OVERFLOW IS HIDDEN BY DEFAULT
‣ SUPPORTS PSEUDO-CLASESS ACTIVE, FOCUS, DISABLED AND ENABLED
‣ CSS UNITS SUPPORTED ARE ONLY PXs, RELATIVE TO 750 WIDTH
WEEX MODULES_
‣ ALLOW ACCESS TO NON-UI
NATIVE FEATURES FROM VUE
FILES
‣ weex IS A GLOBAL OBJECT
AVAILABLE FROM VUE FILES
‣ weex.requireModule(‘MODUL
E_NAME’)
‣ EXAMPLE:

http://dotwe.org/vue/
6b7c6e5a9313ed426b5f9019f5394b75
WEEX VARIABLE_
‣ AVAILABLE AS GLOBAL THROUGH weex
‣ CONFIG EXPOSES ENVIRONMENT PROPERTIES
‣ SUPPORTS EVALUATES IF A COMPONENT OR MODULE IS SUPPORTED
NATIVE-TO-WEEX-TO-NATIVE COMMUNICATION_
‣ COMMUNICATIONS IS POWERFUL AND ASYNCHRONOUS THROUGH
MESSAGING
‣ NATIVE METHODS CAN TRIGGER AND RECEIVE MESSAGES WITH PAYLOAD
‣ JAVASCRIPT IN WEEX RECEIVE AND CAN TRIGGER EVENTS TROUGH THE
‘GLOBALEVENT’ MODULE
TOOLS_
‣ WEEX PLAYGROUND: http://dotwe.org/vue/
‣ WEEX PLAYGROUND APP: https://weex.incubator.apache.org/
tools/toolkit.html
‣ WEEX TOOLKIT: CLI FOR SCAFFOLDING AND UPDATE
‣ WEEX DEVTOOLS FOR INSPECT NATIVE DOM TREE, SET
BREAKPOINTS, SEE NETWORK REQUESTS INFO AND LOGS
‣ WEEX MARKETPLACE FOR COMPONENTS
SET UP
+ MEDIUM
BASIC SETUP_
‣ ANDROID STUDIO FOR NATIVE DEVELOPMENT AND LOGGING
‣ XCODE FOR NATIVE DEVELOPMENT AND LOGGING
‣ WEEX CLI (ALSO KNOWN AS WEEX-TOOLKIT)
‣ npm i -g weex-toolkit
‣ Create your application
‣ weex create your-application
PROJECT STRUCTURE_
‣ ANDROID AND IOS NATIVE
APPLICATIONS LIVE IN
PLATFORMS DIRECTORY
‣ IMPORTANT TO ADD TO
GITIGNORE ALL INTERNAL
MODULES DIRECTORIES AND
LOCAL CONFIGURATIONS
ADVANCED
+ ADVANCED
NAVIGATION_
‣ VUE ROUTER WORKS OUT-OF-THE-BOX
‣ MODE HAS TO BE ‘ABSTRACT’ WHICH IS DEFAULT IF NOT SET
‣ EASY FOR ROUTING WITH DEEP-LINKING
STATE MANAGEMENT_
‣ VUEX WORKS SEAMLESSLY OUT-OF-
THE-BOX
‣ RECOMMENDED SERVICES PATTERN
‣ REMEMBER TO USE ‘STREAM’ MODULE
INSTEAD OF AXIOS FOR NETWORK
COMMUNICATIONS
‣ STORE PERSISTENCE HAS TO BE
TREATED IN NATIVE
EXTENDING WEEX_
‣ PLUGINS ALLOW FUNCTIONALITIES OR COMPONENTS TO BE
DEVELOPED FOR ALL PLATFORMS SO THEY CAN BE DISTRIBUTED
‣ weex plugin create my-weex-plugin
‣ ALL MODULES, COMPONENTS AND ADAPTERS CAN BE EXTENDED FOR
WEB, IOS AND ANDROID PLATFORMS
‣ EVEN THE JS FRAMEWORK CAN BE EXTENDED TO SUPPORT MORE WEB
FRAMEWORKS
MOBILE TEAM
REVOLUTION
+ ADVANCED
MOBILE TEAM REVOLUTION_
‣ CONVERGE YOUR FRONT-END, IOS AND ANDROID TEAMS
‣ CONTINOUS TRAINING IN JAVASCRIPT, CSS & WEEX
THANK YOU

Contenu connexe

Tendances

Introduction to angular js july 6th 2014
Introduction to angular js   july 6th 2014Introduction to angular js   july 6th 2014
Introduction to angular js july 6th 2014
Simona Clapan
 
Tom Germeau: Mobile Apps: Finding the balance between performance and flexibi...
Tom Germeau: Mobile Apps: Finding the balance between performance and flexibi...Tom Germeau: Mobile Apps: Finding the balance between performance and flexibi...
Tom Germeau: Mobile Apps: Finding the balance between performance and flexibi...
Chartbeat
 

Tendances (20)

Vuejs for Angular developers
Vuejs for Angular developersVuejs for Angular developers
Vuejs for Angular developers
 
GWTcon 2015 - Best development practices for GWT web applications
GWTcon 2015 - Best development practices for GWT web applications GWTcon 2015 - Best development practices for GWT web applications
GWTcon 2015 - Best development practices for GWT web applications
 
Introduction to angular js july 6th 2014
Introduction to angular js   july 6th 2014Introduction to angular js   july 6th 2014
Introduction to angular js july 6th 2014
 
Developing advanced universal apps using html & js
Developing advanced universal apps using html & jsDeveloping advanced universal apps using html & js
Developing advanced universal apps using html & js
 
Tom Germeau: Mobile Apps: Finding the balance between performance and flexibi...
Tom Germeau: Mobile Apps: Finding the balance between performance and flexibi...Tom Germeau: Mobile Apps: Finding the balance between performance and flexibi...
Tom Germeau: Mobile Apps: Finding the balance between performance and flexibi...
 
First Step Into NodeJS World
First Step Into NodeJS WorldFirst Step Into NodeJS World
First Step Into NodeJS World
 
React vs-angular-mobile
React vs-angular-mobileReact vs-angular-mobile
React vs-angular-mobile
 
Front end microservices - October 2019
Front end microservices - October 2019Front end microservices - October 2019
Front end microservices - October 2019
 
MVP with GWT and GWTP
MVP with GWT and GWTPMVP with GWT and GWTP
MVP with GWT and GWTP
 
Building SPAs with AngularJS
Building SPAs with AngularJSBuilding SPAs with AngularJS
Building SPAs with AngularJS
 
Vue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrareVue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrare
 
Vue.js
Vue.jsVue.js
Vue.js
 
React vs angular (mobile first battle)
React vs angular (mobile first battle)React vs angular (mobile first battle)
React vs angular (mobile first battle)
 
Javascript MVVM with Vue.JS
Javascript MVVM with Vue.JSJavascript MVVM with Vue.JS
Javascript MVVM with Vue.JS
 
Refactoring to a Single Page Application
Refactoring to a Single Page ApplicationRefactoring to a Single Page Application
Refactoring to a Single Page Application
 
Vue.js for beginners
Vue.js for beginnersVue.js for beginners
Vue.js for beginners
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18
 
Starting with Reactjs
Starting with ReactjsStarting with Reactjs
Starting with Reactjs
 
Introducing PhoneGap to SproutCore 2
Introducing PhoneGap to SproutCore 2Introducing PhoneGap to SproutCore 2
Introducing PhoneGap to SproutCore 2
 

Similaire à Introduction to Weex: Mobile Apps with VueJS

Expose a Rest Service to the web within minutes with WSO2 App Factory
Expose a Rest Service to the web within minutes with WSO2 App Factory Expose a Rest Service to the web within minutes with WSO2 App Factory
Expose a Rest Service to the web within minutes with WSO2 App Factory
WSO2
 
SnapyX
SnapyXSnapyX
SnapyX
ekino
 
Building Rich Internet Applications Using Google Web Toolkit
Building Rich Internet Applications Using  Google Web ToolkitBuilding Rich Internet Applications Using  Google Web Toolkit
Building Rich Internet Applications Using Google Web Toolkit
rajivmordani
 

Similaire à Introduction to Weex: Mobile Apps with VueJS (20)

VueJS in Action
VueJS in ActionVueJS in Action
VueJS in Action
 
Expose a Rest Service to the web within minutes with WSO2 App Factory
Expose a Rest Service to the web within minutes with WSO2 App Factory Expose a Rest Service to the web within minutes with WSO2 App Factory
Expose a Rest Service to the web within minutes with WSO2 App Factory
 
001. Introduction about React
001. Introduction about React001. Introduction about React
001. Introduction about React
 
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014
NodeJS & Socket IO on Microsoft Azure Cloud Web Sites - DWX 2014
 
SnapyX
SnapyXSnapyX
SnapyX
 
SnapyX - ParisJS
SnapyX - ParisJSSnapyX - ParisJS
SnapyX - ParisJS
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript Widgets
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.js
 
Choosing your frontend web framework.pptx
Choosing your frontend web framework.pptxChoosing your frontend web framework.pptx
Choosing your frontend web framework.pptx
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript Widgets
 
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and KubernetesDevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
 
Installing Webpack with React JS from Scratch.pdf
Installing Webpack with React JS from Scratch.pdfInstalling Webpack with React JS from Scratch.pdf
Installing Webpack with React JS from Scratch.pdf
 
MeteorJS Session
MeteorJS SessionMeteorJS Session
MeteorJS Session
 
Introduction to VueJS for begginers with examples | Namspace IT
Introduction to VueJS for begginers with examples | Namspace ITIntroduction to VueJS for begginers with examples | Namspace IT
Introduction to VueJS for begginers with examples | Namspace IT
 
Building Rich Internet Applications Using Google Web Toolkit
Building Rich Internet Applications Using  Google Web ToolkitBuilding Rich Internet Applications Using  Google Web Toolkit
Building Rich Internet Applications Using Google Web Toolkit
 
DevOps LA Meetup Intro to Habitat
DevOps LA Meetup Intro to HabitatDevOps LA Meetup Intro to Habitat
DevOps LA Meetup Intro to Habitat
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
 
Integrating React.js Into a PHP Application: Dutch PHP 2019
Integrating React.js Into a PHP Application: Dutch PHP 2019Integrating React.js Into a PHP Application: Dutch PHP 2019
Integrating React.js Into a PHP Application: Dutch PHP 2019
 
Nuxeo Web Engine - Embedding GFv3
Nuxeo Web Engine - Embedding GFv3Nuxeo Web Engine - Embedding GFv3
Nuxeo Web Engine - Embedding GFv3
 

Plus de Rafael Casuso Romate

Plus de Rafael Casuso Romate (7)

Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend Developer
 
Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)Nuxt Avanzado (de Scaffolding a MVP)
Nuxt Avanzado (de Scaffolding a MVP)
 
The Core of Agile
The Core of AgileThe Core of Agile
The Core of Agile
 
Solid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJSSolid NodeJS with TypeScript, Jest & NestJS
Solid NodeJS with TypeScript, Jest & NestJS
 
The Voice Interface Revolution
The Voice Interface RevolutionThe Voice Interface Revolution
The Voice Interface Revolution
 
Google Assistant Revolution
Google Assistant RevolutionGoogle Assistant Revolution
Google Assistant Revolution
 
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8
 

Dernier

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Dernier (20)

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

Introduction to Weex: Mobile Apps with VueJS

  • 1. INTRO TO WEEX: MOBILE APPS WITH VUEJS
  • 2. @Rafael_Casuso A B O U T M E •CTO @StayApp •CEO @SnowStormIO •Organizer @VueJsMadrid, @BotDevMad •Software Engineer with +10 years of experience leading teams and developing. •Software Architect looking for revolutionary ways to change the world. •Specialties: JavaScript, NodeJS, Conversational Intelligences. 2
  • 3. WHAT IS WEEX? + INITIAL
  • 4. OVERVIEW_ ‣ FRAMEWORK TO DEVELOP MOBILE APPS WITH MODERN WEB SYNTAX ‣ ITS RENDER ENGINE IS DECOUPLED FROM SYNTAX ‣ IT SUPPORTS VUEJS AND RAX
  • 5. JS BUNDLE_ ‣ VUEJS-LIKE JAVASCRIPT APPLICATION IS COMPILED INTO A JS BUNDLE ‣ WEEX JS BUNDLE CAN BE DEPLOYED AND DISTRIBUTED AS STATIC RESOURCE
  • 7. WEEX SDK_ ‣ A NATIVE MOBILE APP INCLUDES WEEXSDK ‣ WEEX SDK BUNDLES AND FETCH JS BUNDLE FROM WEBSERVER ‣ WEEX SDK RUNS A JAVASCRIPT ENGINE TO RUN JS BUNDLE ‣ WEEX JS BRIDGE EXPOSES AN API TO COMMUNICATE JS BUNDLE WITH NATIVE SIDE FOR STORAGE, MESSAGING, ANIMATION, NETWORK COMMUNICATIONS, ETC
  • 8. ENGINES_ ‣ JAVASCRIPT ENGINE RUNS JS BUNDLE AND SENDS INSTRUCTIONS TO NATIVE RENDERERS ‣ JAVASCRIPTCORE IN IOS AND V8 IN ANDROID ‣ EACH WEEX APP GENERATES A JS BUNDLE BUT A SINGLE INSTANCE OF JAVASCRIPT ENGINE IS USED FOR PERFORMANCE ‣ VUE RUNTIME IS INCLUDED AND NOT BUNDLED
  • 10. DEVELOPMENT_ ‣ A WEEX APPLICATION TARGETS WEB, IOS AND ANDROID ‣ IT SUPPORTS VUEJS 2+ SINGLE FILE COMPONENTS SYNTAX ‣ IT USES NPM AS PACKAGE MANAGER ‣ IT USES WEBPACK AS BUNDLER ‣ SEPARATED BUNDLES FOR WEB AND MOBILE ‣ VUE-LOADER IS THE COMPILER OF VUE FILES TO WEB JS BUNDLE ‣ WEEX-LOADER IS THE COMPILER OF VUE FILES TO WEEX JS BUNDLE
  • 11. WEEX COMPONENTS_ ‣ INSIDE <TEMPLATE> YOU CAN ONLY USE WEEX BUILT-IN COMPONENTS AND YOUR CUSTOM COMPONENTS ‣ NOT ANY HTML TAG ‣ UNDER THE SCENE, WEEX USES NATIVE WIDGETS FOR CONSISTENCY ‣ RENDERED INTO NATIVE VIEWS
  • 12. STYLES_ ‣ WEEX BOX MODEL IS BASED ON WEB BOX MODEL, SO THERE ARE HEIGHT, WIDTH, MARGIN, PADDING AND BORDER PROPERTIES ‣ WEEX STYLE BOX MODEL SUPPORTS FLEXBOX FOR PAGE LAYOUT, INCLUIDING CONTAINERS AND ITEMS ‣ POSITION BY DEFAULT IS RELATIVE ‣ TRANSITION AND TRANSFORM ARE SUPPORTED ‣ OVERFLOW IS HIDDEN BY DEFAULT ‣ SUPPORTS PSEUDO-CLASESS ACTIVE, FOCUS, DISABLED AND ENABLED ‣ CSS UNITS SUPPORTED ARE ONLY PXs, RELATIVE TO 750 WIDTH
  • 13. WEEX MODULES_ ‣ ALLOW ACCESS TO NON-UI NATIVE FEATURES FROM VUE FILES ‣ weex IS A GLOBAL OBJECT AVAILABLE FROM VUE FILES ‣ weex.requireModule(‘MODUL E_NAME’) ‣ EXAMPLE:
 http://dotwe.org/vue/ 6b7c6e5a9313ed426b5f9019f5394b75
  • 14. WEEX VARIABLE_ ‣ AVAILABLE AS GLOBAL THROUGH weex ‣ CONFIG EXPOSES ENVIRONMENT PROPERTIES ‣ SUPPORTS EVALUATES IF A COMPONENT OR MODULE IS SUPPORTED
  • 15. NATIVE-TO-WEEX-TO-NATIVE COMMUNICATION_ ‣ COMMUNICATIONS IS POWERFUL AND ASYNCHRONOUS THROUGH MESSAGING ‣ NATIVE METHODS CAN TRIGGER AND RECEIVE MESSAGES WITH PAYLOAD ‣ JAVASCRIPT IN WEEX RECEIVE AND CAN TRIGGER EVENTS TROUGH THE ‘GLOBALEVENT’ MODULE
  • 16. TOOLS_ ‣ WEEX PLAYGROUND: http://dotwe.org/vue/ ‣ WEEX PLAYGROUND APP: https://weex.incubator.apache.org/ tools/toolkit.html ‣ WEEX TOOLKIT: CLI FOR SCAFFOLDING AND UPDATE ‣ WEEX DEVTOOLS FOR INSPECT NATIVE DOM TREE, SET BREAKPOINTS, SEE NETWORK REQUESTS INFO AND LOGS ‣ WEEX MARKETPLACE FOR COMPONENTS
  • 18. BASIC SETUP_ ‣ ANDROID STUDIO FOR NATIVE DEVELOPMENT AND LOGGING ‣ XCODE FOR NATIVE DEVELOPMENT AND LOGGING ‣ WEEX CLI (ALSO KNOWN AS WEEX-TOOLKIT) ‣ npm i -g weex-toolkit ‣ Create your application ‣ weex create your-application
  • 19. PROJECT STRUCTURE_ ‣ ANDROID AND IOS NATIVE APPLICATIONS LIVE IN PLATFORMS DIRECTORY ‣ IMPORTANT TO ADD TO GITIGNORE ALL INTERNAL MODULES DIRECTORIES AND LOCAL CONFIGURATIONS
  • 21. NAVIGATION_ ‣ VUE ROUTER WORKS OUT-OF-THE-BOX ‣ MODE HAS TO BE ‘ABSTRACT’ WHICH IS DEFAULT IF NOT SET ‣ EASY FOR ROUTING WITH DEEP-LINKING
  • 22. STATE MANAGEMENT_ ‣ VUEX WORKS SEAMLESSLY OUT-OF- THE-BOX ‣ RECOMMENDED SERVICES PATTERN ‣ REMEMBER TO USE ‘STREAM’ MODULE INSTEAD OF AXIOS FOR NETWORK COMMUNICATIONS ‣ STORE PERSISTENCE HAS TO BE TREATED IN NATIVE
  • 23. EXTENDING WEEX_ ‣ PLUGINS ALLOW FUNCTIONALITIES OR COMPONENTS TO BE DEVELOPED FOR ALL PLATFORMS SO THEY CAN BE DISTRIBUTED ‣ weex plugin create my-weex-plugin ‣ ALL MODULES, COMPONENTS AND ADAPTERS CAN BE EXTENDED FOR WEB, IOS AND ANDROID PLATFORMS ‣ EVEN THE JS FRAMEWORK CAN BE EXTENDED TO SUPPORT MORE WEB FRAMEWORKS
  • 25. MOBILE TEAM REVOLUTION_ ‣ CONVERGE YOUR FRONT-END, IOS AND ANDROID TEAMS ‣ CONTINOUS TRAINING IN JAVASCRIPT, CSS & WEEX