SlideShare a Scribd company logo
Building native apps with web components
Building native apps with web components
Building native apps with web components
Building native apps with web components
Building native apps with web components
JavaScript driven operation system, 500 000+ loc
New generations every 2 years
Building native apps with web components
What is next? Android?
Easy moving from platform to platform.
We are interested in JavaScript
portability and UI abstractions
Compared with iPhone 1 in performance
ChallengingNative.com
Fast web applications development, profiling and optimization
The state of
web vs native
2011: Sorry guys,
we fucked up!
Building native apps with web components
Building native apps with web components
2016 Web apps:
Performance
is not a bottleneck
iOS and Android devices
are fast enough
Building native apps with web components
2016 Web apps:
UX is a bottleneck
Users became highly addicted to UX
mobile OS provides
Trying to mimic
native controls in web?
Building native apps with web components
It is a matter of milliseconds
But they are recognizable
when it is about everyday use
So native controls
With JavaScript of course!
Because it is cheaper
Cross platform and easy language
Cheeaaper!
JS because more
developers
Easier to hire
Easieeer!
Tools available
Titanium, React Native, Native Script
Poor community, buggy
+ a lot of specific things to study
Building native apps with web components
Native Script
New API and concepts to study on start,
layouting with specific language
viewLayout.xml
view.js
Sticked to React, new API and concepts to study,
layouting with JSX + subset of CSS
Building native apps with web components
Building native apps with web components
All of them force to
learn new languages
Which is good for ambitious,
self motivated developers
who want to l/earn a lot
ReactJS = 25 USD/h,
HTML/JS = 8 USD/h
But other way around if you
hire developers and pay
ReactJS 40k q/a,
HTML+CSS 1000k q/a
But other way around if you
looking for solutions
ReactJS bootstrap in hours,
HTML+CSS bootstrap in minutes
But other way around if you
setting up a project
Right tools
for a job
Small applications
could be cheaper to build
with right tool
Right tools
for a job
Small applications
could be cheaper to build
with right tool
Right tools
for a job
Small applications
could be cheaper to build
with right tool
Polymer-Native
Instantiate native controls with Web Components
Web Components
are custom HTML tags
E.g. <my-component> or <div is=”my-component”>
Building native apps with web components
In browser, web controls iOS native controls
Polymer-Native tags
native-view, native-image, native-button,
native-input, native-checkbox, native-select,
native-router, native-route
How Polymer-Native works?
Basically using Web Components lifecycle hooks
created, attached,
detached, attributeChanged
We can bridge to native images with help of this
Consider
browser see native-button
element created
Browser informs native iOS view about it
Background WebView
Position,
Size,
Styles,
Attributes
Foreground UIView
<native-button> UIButton
createdCallback
detachedCallback removeFromSuperview()
mutationObserver update()
clicked
changed
focused
...
No repaints for web
instances
When native copy is created actual button is being
hidden to reduce resources usage
The rest is HTML/CSS/JS
which you know so good
Starting with ordinary index.html
Full CSS stack supported
Yeah, you position and style <native-button> as you
would style HTML element in regular web project
native-button selector
You may use native-button selector as it would be
standard tag selector. Web components are first
class citizens.
How to start?
npm install polymer-native -g
Install CLI
polymer-native init project-name
Initialize a project with built-in Yoman template
./ios/project-name.workspace
Open it in X-Code
Run X-Code project
See it running in emulator? Good, start editing
./www/index.html and files around as you would do
in a web project.
Example 1
Basics
Building native apps with web components
Browser, web controls iOS device, native controls
Example 2
Styling
Building native apps with web components
Browser, web controls iOS device, native controls
Example 3
Navigation
Building native apps with web components
Browser, web controls iOS device, native controls
Rebel router
Similar to React Router but in Web Components
Example 4
Mixing HTML and native
Building native apps with web components
Looks similar,
behaves differently
Is this Apple protecting ecosystem?
Why polymer?
Scalability, incapsulation, attributes types,
browser compatibility
<my-component isHappy=”true” count=”3”>
Other frameworks?
Hey, buddy, we are just tags!
EmberJS / BackboneJS
AngularJS
ReactJS
Framework agnostic
Cheeaaper!
Easieeer!
What is next?
HTML-Native as PhoneGap plugin to
let substitute critical web controls in Web Apps
What is next?
Reusing React-Native components since eco-system
is rich
http://github.com/pixelscommander/html-native
denis.radin@gmail.com
Questions? Proposals? PRs?
Building native apps with web components
appathon.tv

More Related Content

PPTX
Introducing Kendo UI
PDF
Building Mobile Apps with Cordova , AngularJS and Ionic
PDF
Pablo Villalba -
PDF
Ionic: The Web SDK for Develop Mobile Apps.
PDF
Ionic Framework: Let's build amazing apps. No Excuses!
PPTX
Netflix hybrid mobile app using kendo ui mobile
PDF
Popluar AngularJS Frameworks
PPTX
Slides of webinar Kendo UI and Knockout.js
Introducing Kendo UI
Building Mobile Apps with Cordova , AngularJS and Ionic
Pablo Villalba -
Ionic: The Web SDK for Develop Mobile Apps.
Ionic Framework: Let's build amazing apps. No Excuses!
Netflix hybrid mobile app using kendo ui mobile
Popluar AngularJS Frameworks
Slides of webinar Kendo UI and Knockout.js

What's hot (14)

PPTX
PPT from Webinar Create Hybrid Mobile Application in 1 hour
PPTX
Modern Domino: Domino 9.0.1
PPTX
Hybrid mobile and Ionic
PPTX
Windows phone 8 app using Kendo UI
PPTX
Ionic Framework - Intro to Hybrid Mobile Application Development
PDF
PDF
Mobilizing Your Visualforce Application With JQuery and KnockoutJS
PDF
Advantages of AngularJS over jQuery
PDF
Mobile Applications
PDF
Building Mobile Websites
PPTX
JSFoo 2016 React Native Workshop
PPTX
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
PDF
Real World Lessons in jQuery Mobile
PPTX
Netflix hybrid mobile app using kendo ui mobile
PPT from Webinar Create Hybrid Mobile Application in 1 hour
Modern Domino: Domino 9.0.1
Hybrid mobile and Ionic
Windows phone 8 app using Kendo UI
Ionic Framework - Intro to Hybrid Mobile Application Development
Mobilizing Your Visualforce Application With JQuery and KnockoutJS
Advantages of AngularJS over jQuery
Mobile Applications
Building Mobile Websites
JSFoo 2016 React Native Workshop
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
Real World Lessons in jQuery Mobile
Netflix hybrid mobile app using kendo ui mobile
Ad

Similar to Building native apps with web components (20)

PPT
Responsive web design & mobile web development - a technical and business app...
PPT
Skill Session - Web Multi Device
PPTX
Trip advsiorhybridpresentation
PDF
Web Application Development in 2023.pdf
PPTX
Ecommerce Mini Project / Group Project Coding
PDF
Web Application Development- Best Practices in 2023.
PPT
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
KEY
From mobile browser to mobile app
PDF
UI2code : A Neural Machine Translator to Bootstrap Mobile GUI Implementation
PDF
How React Native Works for iOS App Development
PDF
Go for Progressive Web Apps. Get a Better, Low Cost, Mobile Presence
DOCX
Over view of Technologies
PPT
Titanium Meetup Deck
PPTX
Beyond App Development
PPTX
Beyond App Development
PPT
Titanium Overview (Mobile March 2011)
PPT
Presentation1
PDF
Top mobile app development frameworks to consider in 2021
PPTX
HTML5: The Apps, the Frameworks, the Controversy
PDF
Front-End Engineering 101
Responsive web design & mobile web development - a technical and business app...
Skill Session - Web Multi Device
Trip advsiorhybridpresentation
Web Application Development in 2023.pdf
Ecommerce Mini Project / Group Project Coding
Web Application Development- Best Practices in 2023.
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
From mobile browser to mobile app
UI2code : A Neural Machine Translator to Bootstrap Mobile GUI Implementation
How React Native Works for iOS App Development
Go for Progressive Web Apps. Get a Better, Low Cost, Mobile Presence
Over view of Technologies
Titanium Meetup Deck
Beyond App Development
Beyond App Development
Titanium Overview (Mobile March 2011)
Presentation1
Top mobile app development frameworks to consider in 2021
HTML5: The Apps, the Frameworks, the Controversy
Front-End Engineering 101
Ad

More from Denis Radin (10)

PDF
Mining crypto in browser as a bleeding edge performance challenge for the Web...
PDF
Pixel shaders based UI components + writing your first pixel shader
PDF
Migrating your Web app to Virtual Reality
PDF
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
PDF
1.Loading
PDF
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
PDF
Front-end tower of Babylon
ODP
JavaScript and HTML in shipbuilding and aircraft industries
PDF
More native look and feel of mobile JS applications with HTML5 canvas
PPT
FlAnalyzer
Mining crypto in browser as a bleeding edge performance challenge for the Web...
Pixel shaders based UI components + writing your first pixel shader
Migrating your Web app to Virtual Reality
Applying NASA coding guidelines to JavaScript or airspace is closer than you ...
1.Loading
HTML GL - 60 FPS and amazing effects by rendering HTML/CSS in WebGL, framewor...
Front-end tower of Babylon
JavaScript and HTML in shipbuilding and aircraft industries
More native look and feel of mobile JS applications with HTML5 canvas
FlAnalyzer

Recently uploaded (20)

PPTX
Current and future trends in Computer Vision.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
PPT on Performance Review to get promotions
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Construction Project Organization Group 2.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
composite construction of structures.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
additive manufacturing of ss316l using mig welding
Current and future trends in Computer Vision.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
CYBER-CRIMES AND SECURITY A guide to understanding
Operating System & Kernel Study Guide-1 - converted.pdf
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
R24 SURVEYING LAB MANUAL for civil enggi
bas. eng. economics group 4 presentation 1.pptx
PPT on Performance Review to get promotions
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Model Code of Practice - Construction Work - 21102022 .pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Construction Project Organization Group 2.pptx
CH1 Production IntroductoryConcepts.pptx
composite construction of structures.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
additive manufacturing of ss316l using mig welding

Building native apps with web components