SlideShare uma empresa Scribd logo
1 de 54
Windows store apps:
WinJS vs PhoneGap
Damyan Petev
Technical Evangelist, Infragistics
dpetev@infragistics.com
@DamyanPetev

Mihail Mateev
Senior Technical Evangelist, Infragistics
mmateev@infragistics.com
@MihailMateev
Agenda
•
•
•
•
•
•

Windows Store Apps Intro
WinJS and all that madness
Similarities and differences
PhoneGap
Resources
Q&A
Microsoft
Microsoft
Principals
•
•
•
•
•

Pride in craftsmanship
Fast and fluid
Authentically digital
Do more with less
Win as one
WinJS
• Controls and
other UI building
blocks for
Modern UI style
apps
• Style sheets with
default Modern
UI style design
• Common
infrastructure for
responsive,

HTML / CSS
• Powerful engine
for creating user
interfaces
• Reuse skills &
code from the
standard web
• New HTML / CSS
features give you
the capabilities to
make great UI/UX

WinRT
• Seamlessly
integrate with the
Modern UI style
shell
• Connect to other
apps through
contracts
• Access storage,
devices, and
other capabilities
of the PC
WinJS
Toolkits
IE is ok these days!
•

Like, it actually is!
Why WinJS Apps
If You are a web developer today …
Build Native Apps With Your Existing Skill Set and
Experience (mostly )
–
–
–
–

Familiar programming model
Full benefit of hardware acceleration
WinRT API & feature access
Popular JavaScript libraries work in WinJS apps - jQuery,
Ignite UI, Knockout, Angular, game engines, etc
WinJS.xhr

HTML/DOM Utils

WinJS Element
Attributes

Logging Utils
WinJS

WinJS.Promise

Element
Selection/
Querying

Keyboard Key
Enumeration

Validation
WinJS

WinJS.PromiseStat
eMachine

Coordinate
Conversion

Support for WinJS
declarative model
(supportedForProc
essing)

Class definition
and inheritance
WinJS.Class

Namespace
definition utilities
WinJS.Namespace

WinJS.ErrorFro
mName

Localized String
Utilities

Data-win-res
processing

Semantic Zoom

ViewBox
ListView

Flyout

SettingsFlyout

Menu

Menu
Command

GridLayout

ListLayout

WinJS Toolkits
Support for
declarative model
(processAll)

Controls
Utilities (
setOptions)

IZoomableView

Custom Layout
Interface

AppBar

IListBinding

Fragment loading
and rendering
WinJS.UI.Fragments

IListDataSource

IListDataAdapte
r

IListN
H

DataSourceStatus

StorageDataSo
urce

VirtualizedData
Source

Erro

FlipView

WinJS.UI.
Animation
helpers

Animation
Library

Data Binding
(as, bind)

Mixins

WinJS.Binding.
List

Conversions

List Projections

Support for
declarative
databinding

Animation System
Management

Application
Events

WinJS.
Application.
sessionState
WinJS.Navigation
Functions

local
(storage)

roaming
(storage)

temp
(storage)

WinJS.UI.Pages.
PageControl

WinJS.Binding.
Template

WinJS.UI.Pages.
IPageControlM
embers

Tooltip

Rating

TabContainer

TimePicker

DatePicker

ToggleSwitch

HTMLControl

Light StyleSheet

Dark StyleSheet
Personality

What Makes a Windows Store App a
Windows Store App?
•
•
•
•
•
•
•
•
•

Fast & Fluid
Live Tiles
Animations
Transitions
Charms
AppBar
Search
Contracts
Device Access
Controls

Native Windows Controls
Extra UI at no cost

App Bar

Settings
Windows UI Apps feature
adaptive layouts :

Layouts

•
•
•

Multiple screen size support
Snapped and filled view
states
Handle rotation

CSS Layouts :
• CSS Grid, CSS Flexbox, CSS
Multicolumn, Media Queries
• Fast & Fluid Native
performance

X
Full View

Snapped
View

X
Fill View
Transforms &
Animations

CSS & WinJS Animation Library
Page transition
Content transition
Fade in/out
Crossfade
Pointer up/down
Expand/Collapse
Reposition
Show/Hide popup
Show/Hide edge UI

Show/Hide panel
Add/Delete from list
Add/Delete from search list
Peek
Badge update
Start/End a drag or drag-between
Swipe hint
Swipe select/deselect
Touch, Pan, Zoom,
Scroll

Fast & Fluid Interaction via CSS
Windows Store Apps feature direct manipulation panning and zooming of content
as a predominant user interface paradigm.
CSS gives you:
• Support touch, mouse, and keyboard
• “Stick to the finger” experience for panning and zooming
• Consistent user experience with rails, inertia, and boundary feedback
• Support for snap points, nesting, and chaining
WinJS Stylesheets

Styling an App
•

Beautiful Dark & Light styles are built in

•

Well defined, meaningful selectors you can easily understand and override

•

Visual Studio templates help a lot
default.css
• Transparent to developers
• Provides styles for:
– Base elements (HTML, Body, Iframe…)
– Text elements (H1, P, DD…)
– HTML controls (checkbox, radio
button, range…)
– WinJS controls (ratings, toggle…)
– Additional text element style classes
(title, subtitle, item text…)
– Additional HTML control style classes
(back button…)
Built-in styling classes
<!– Get a custom back button look -->
<button class="win-backbutton"></button>

<h1 class="win-title">win-title</h1>
<h1 class="win-contentTitle">wincontentTitle</h1>
<h1 class="win-contentSubtitle">wincontentSubtitle</h1>
ALM
Is it really the same?
Of standards and popular terms
Modern patterns and practices you might know/have seen

• Strict mode
• Promises [ async ]
• SPA
I’ll get back to you.. I promise!*
from the callback with love

var promise = doSomeWork();
promise.then(function(foo){
// continue working here
return doSomeMoreWork();
}).then(function(result){
// …
});
*but can’t promise to solve all your problems.
SPA
Single Page App
• Web is stateless in nature
• Navigation means loosing context
• Apps shouldn’t be like that, so:
SPA
•

Keeping it familiar…

<!-- A hyperlink to page2.html. --> <p><a href="/pages/page2/page2.html">Go to page 2.</a></p>
Simple…

WinJS.Utilities.query("a").listen("click",
this.linkClickEventHandler, false);
Pages & Navigation

Application Shell
Page Content

• Navigation template
• AppBar integration
• Load and [unload] chunks of HTML + CSS
+ JS
• Page content can be dynamic including
other WinJS controls within it
• Context & State are maintained

A series of events to control the process:

Before
Navigate
before navigation
attempt

Navigating
navigating away from
a page

Navigated
The platform differences
• No alert 
• ms-appx:/// vs. http(s):// vs. file:/// vs. ms-appdata:///

X

X

• DOM Security - With great power come.. great restrictions :)

Still OK :
• window.close() //quite useless though
• createElement
Not in the face !!111!1!!
•

If ( using DOM) filter through toStaticHTML()
–
–
–
–
–
–

•
•

createContextualFragment
innerHTML / outerHTML
insertAdjacentHTML
pasteHTML
document.write / document.writeln
DOMParser.parseFromString

WinJS.Utilities.markSupportedForProcessing(functionName);
Alternative?

var someElement = document.getElementById('someElementID');
MSApp.execUnsafeLocalFunction( function() {
someElement.innerHTML = '<div onclick="console.log("hi");">hi</div>'
});
Controls + Data Binding
•

Rating:

<div id="Div1" data-win-control="WinJS.UI.Rating"
data-win-bind="winControl.averageRating: rating"
data-win-options="{maxRating:5}"></div>
• AppBar:
<div id="appbar" data-win-control="WinJS.UI.AppBar">
<button data-win-control="WinJS.UI.AppBarCommand“..

• Navigation container:
<div id="contenthost"
data-win-control="Application.PageControlNavigator"
data-win-options="{home: '/pages/home/home.html'}">
</div>
Demo Time!
Debug
• DOM Explorer and JavaScript Console
• Remote Debug
• Simulation of states
• VS 2013 – Performance and Diagnostics
PhoneGap
Why PhoneGap?
• There are more
than 100 000 000
WEB developers!
• The web is
awesome!
What is PhoneGap ?

Your Code
What is PhoneGap ?

Your Code

Native Web View
What is PhoneGap ?

Your Code
Native Web View
Native APIs
What is PhoneGap ?

Your Code
Native Web View

Native APIs
Native App - .apk, .xap, etc.
What is PhoneGap ?
• PhoneGap / Cordova for Windows Store App
uses WinJS
• There is no “special” cordova Web View for
WinRT
PhoneGap / Cordova API
•
•
•
•
•
•

Accelerometer
Camera
Capture (video)
Compass
Connection
Contacts

•
•
•
•
•
•
•

Device
File IO
Geolocation
Globalization
Media
Notifications
Storage (database)
PhoneGap / Cordova Platforms
PhoneGap / Cordova Platforms
PhoneGap / Cordova CLI
Requires Node.js

$ npm install -g cordova
$ cordova create hello com.example.hello
HelloWorld
$ cordova platform add windows8
$ cordova run windows8
$ cordova emulate windows8
$ cordova platform update windows8
Debugging PhoneGap for
Windows Store Apps:
• 2 ways to debug PhoneCap/Windows 8.x App
– As WinJS App
– As PhoneGap App (winery, http://debug.phonegap.com/)
Naturally, apps targeted at 8.1
don’t get scaled down for Win 8.
So yeah, there’s that.
The take away
•

WinJS vs PhoneGap is a matter of API preference and code portability

•

Windows Store basic rules apply to PhoneGap

•

Do whatever you feel like, as long as you:
– Stay within platform look and feel
– Understand the sandbox model of the app

•

Mash up frameworks and tools:
– Should be compatible (like jQuery 2.x)
– Or use workarounds
•

Състезание 1: Windows
8.1 или Windows Phone 8
http://bgapps.promorc.com/
• Състезание 2: Win 8 app
– Best UX
– Most Innovative
– Best migrated from WP
– More worldwide
http://winappdevcon.promorc.com
Resources
•

The ‘everything you need and more’ place:
– http://msdn.microsoft.com/en-US/windows/apps/
• Windows 8 samples:
– http://code.msdn.microsoft.com/windowsapps/Windows-8-app-samples-4d76cbbf
• Windows 8.1 Samples:
– http://code.msdn.microsoft.com/windowsapps/Windows-8-Modern-Style-AppSamples
• Free ebook: Programming Windows Store Apps with HTML, CSS, and JavaScript, Second
Edition (second preview):
• http://aka.ms/secondedition/secondpreview
http://blogs.msdn.com/b/microsoft_press/archive/2013/10/29/free-ebook-programmingwindows-store-apps-with-html-css-and-javascript-second-edition-second-preview.aspx
Resources & Q&A
•
•

•

WinJS for the PhoneGap developer blog series:
– http://blogs.msdn.com/b/glengordon/
Windows 8 Platform Guide
– http://docs.phonegap.com/en/edge/guide_platforms_win8_index.md.html
Next event: Building your first Analysis Services solution (11 of February, 2014)
– Speaker: Ivan Donev
Resources & Q&A
•

Next conference: Azure Bootcamp Bulgaria (29 of Mach, 2014)
THANK YOU!

Mais conteúdo relacionado

Mais procurados

a11yTO - Web Accessibility for Developers
a11yTO - Web Accessibility for Developersa11yTO - Web Accessibility for Developers
a11yTO - Web Accessibility for DevelopersMonika Piotrowicz
 
State of jQuery '09
State of jQuery '09State of jQuery '09
State of jQuery '09jeresig
 
Mobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMaximiliano Firtman
 
Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?Henny Swan
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Jonas Bandi
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRfunkatron
 
Web Accessibility - A feature you can build
Web Accessibility - A feature you can buildWeb Accessibility - A feature you can build
Web Accessibility - A feature you can buildMonika Piotrowicz
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can buildMonika Piotrowicz
 
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkSt. Petersburg College
 
Tips for Building your First XPages Java Application
Tips for Building your First XPages Java ApplicationTips for Building your First XPages Java Application
Tips for Building your First XPages Java ApplicationTeamstudio
 
The Status Of Web Interoperability And Activities In China, Japan And Korea
The Status Of Web Interoperability And Activities In China, Japan And KoreaThe Status Of Web Interoperability And Activities In China, Japan And Korea
The Status Of Web Interoperability And Activities In China, Japan And KoreaChanny Yun
 
There Are No “Buts” in Progressive Enhancement [Øredev 2015]
There Are No “Buts” in Progressive Enhancement [Øredev 2015]There Are No “Buts” in Progressive Enhancement [Øredev 2015]
There Are No “Buts” in Progressive Enhancement [Øredev 2015]Aaron Gustafson
 
Architecting For Ux
Architecting For UxArchitecting For Ux
Architecting For UxJosh Holmes
 
Engage - Expanding XPages with Bootstrap Plugins for ultimate usability
Engage - Expanding XPages with Bootstrap Plugins for ultimate usabilityEngage - Expanding XPages with Bootstrap Plugins for ultimate usability
Engage - Expanding XPages with Bootstrap Plugins for ultimate usabilityJohnny Oldenburger
 
Html5 features: location, history and offline apps
Html5 features: location, history and offline appsHtml5 features: location, history and offline apps
Html5 features: location, history and offline appsKonstantin Delchev
 
Modern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.jsModern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.jsJonas Bandi
 
RIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdgRIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdgZiyad Bazed
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesTeamstudio
 

Mais procurados (20)

a11yTO - Web Accessibility for Developers
a11yTO - Web Accessibility for Developersa11yTO - Web Accessibility for Developers
a11yTO - Web Accessibility for Developers
 
Mobile web development
Mobile web development Mobile web development
Mobile web development
 
State of jQuery '09
State of jQuery '09State of jQuery '09
State of jQuery '09
 
Sharepoint mobile
Sharepoint mobileSharepoint mobile
Sharepoint mobile
 
Mobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance Optimization
 
Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
Web Accessibility - A feature you can build
Web Accessibility - A feature you can buildWeb Accessibility - A feature you can build
Web Accessibility - A feature you can build
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can build
 
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
 
Tips for Building your First XPages Java Application
Tips for Building your First XPages Java ApplicationTips for Building your First XPages Java Application
Tips for Building your First XPages Java Application
 
The Status Of Web Interoperability And Activities In China, Japan And Korea
The Status Of Web Interoperability And Activities In China, Japan And KoreaThe Status Of Web Interoperability And Activities In China, Japan And Korea
The Status Of Web Interoperability And Activities In China, Japan And Korea
 
There Are No “Buts” in Progressive Enhancement [Øredev 2015]
There Are No “Buts” in Progressive Enhancement [Øredev 2015]There Are No “Buts” in Progressive Enhancement [Øredev 2015]
There Are No “Buts” in Progressive Enhancement [Øredev 2015]
 
Architecting For Ux
Architecting For UxArchitecting For Ux
Architecting For Ux
 
Engage - Expanding XPages with Bootstrap Plugins for ultimate usability
Engage - Expanding XPages with Bootstrap Plugins for ultimate usabilityEngage - Expanding XPages with Bootstrap Plugins for ultimate usability
Engage - Expanding XPages with Bootstrap Plugins for ultimate usability
 
Html5 features: location, history and offline apps
Html5 features: location, history and offline appsHtml5 features: location, history and offline apps
Html5 features: location, history and offline apps
 
Modern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.jsModern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.js
 
RIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdgRIM Casual Meetup - Bandung #DevIDBdg
RIM Casual Meetup - Bandung #DevIDBdg
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 

Destaque

Le roller derby
Le roller derbyLe roller derby
Le roller derbyelodie92
 
MY RESUME SECOND PAGE
MY RESUME SECOND PAGEMY RESUME SECOND PAGE
MY RESUME SECOND PAGEJerome White
 
Asi jugamos y aprendemos nuestros nombres
Asi jugamos y aprendemos nuestros nombresAsi jugamos y aprendemos nuestros nombres
Asi jugamos y aprendemos nuestros nombresCEIP TIERRA DE PINARES
 
Baño Marroqui López Saida
Baño Marroqui López SaidaBaño Marroqui López Saida
Baño Marroqui López SaidaSai Lopez
 
LOS NIÑOS DE 5 AÑOS A OS DESEAMOS FELIZ NAVIDAD
LOS NIÑOS DE 5 AÑOS A OS DESEAMOS FELIZ NAVIDADLOS NIÑOS DE 5 AÑOS A OS DESEAMOS FELIZ NAVIDAD
LOS NIÑOS DE 5 AÑOS A OS DESEAMOS FELIZ NAVIDADCEIP TIERRA DE PINARES
 
Age related atrophy & sarcopenia Original Hypothesis Abstract - 2015
Age related atrophy  & sarcopenia Original Hypothesis Abstract - 2015Age related atrophy  & sarcopenia Original Hypothesis Abstract - 2015
Age related atrophy & sarcopenia Original Hypothesis Abstract - 2015Kenneth Craig
 
Tips membuat presentasi memukau dan ramah otak ver wes
Tips membuat presentasi memukau dan  ramah otak   ver wesTips membuat presentasi memukau dan  ramah otak   ver wes
Tips membuat presentasi memukau dan ramah otak ver wesUwes Chaeruman
 
persentasi interaktif
persentasi interaktifpersentasi interaktif
persentasi interaktifJabfungkes
 
Build a custom metrics on aws cloud
Build a custom metrics on aws cloudBuild a custom metrics on aws cloud
Build a custom metrics on aws cloudAhmad karawash
 
Patterns of Rejection - conclusion
Patterns of Rejection - conclusionPatterns of Rejection - conclusion
Patterns of Rejection - conclusionSocProf
 
Patterns of racial and ethnic relations
Patterns of racial and ethnic relationsPatterns of racial and ethnic relations
Patterns of racial and ethnic relationsSocProf
 
Varna conf nodejs-oss-microsoft-azure[final]
Varna conf nodejs-oss-microsoft-azure[final]Varna conf nodejs-oss-microsoft-azure[final]
Varna conf nodejs-oss-microsoft-azure[final]Mihail Mateev
 

Destaque (19)

Resume Roadmap
Resume RoadmapResume Roadmap
Resume Roadmap
 
Le roller derby
Le roller derbyLe roller derby
Le roller derby
 
MY RESUME SECOND PAGE
MY RESUME SECOND PAGEMY RESUME SECOND PAGE
MY RESUME SECOND PAGE
 
Otoño 5 años
Otoño 5 añosOtoño 5 años
Otoño 5 años
 
หา3ภพจนเจอ2016 กูตั้งใจทำดีสุดยอดการ์ตูน48ข้อ2015
หา3ภพจนเจอ2016 กูตั้งใจทำดีสุดยอดการ์ตูน48ข้อ2015หา3ภพจนเจอ2016 กูตั้งใจทำดีสุดยอดการ์ตูน48ข้อ2015
หา3ภพจนเจอ2016 กูตั้งใจทำดีสุดยอดการ์ตูน48ข้อ2015
 
Question 1
Question 1Question 1
Question 1
 
Asi jugamos y aprendemos nuestros nombres
Asi jugamos y aprendemos nuestros nombresAsi jugamos y aprendemos nuestros nombres
Asi jugamos y aprendemos nuestros nombres
 
before_after small buisness
before_after small buisnessbefore_after small buisness
before_after small buisness
 
Baño Marroqui López Saida
Baño Marroqui López SaidaBaño Marroqui López Saida
Baño Marroqui López Saida
 
Vdn justine
Vdn justineVdn justine
Vdn justine
 
LOS NIÑOS DE 5 AÑOS A OS DESEAMOS FELIZ NAVIDAD
LOS NIÑOS DE 5 AÑOS A OS DESEAMOS FELIZ NAVIDADLOS NIÑOS DE 5 AÑOS A OS DESEAMOS FELIZ NAVIDAD
LOS NIÑOS DE 5 AÑOS A OS DESEAMOS FELIZ NAVIDAD
 
Age related atrophy & sarcopenia Original Hypothesis Abstract - 2015
Age related atrophy  & sarcopenia Original Hypothesis Abstract - 2015Age related atrophy  & sarcopenia Original Hypothesis Abstract - 2015
Age related atrophy & sarcopenia Original Hypothesis Abstract - 2015
 
HART letter
HART letterHART letter
HART letter
 
Tips membuat presentasi memukau dan ramah otak ver wes
Tips membuat presentasi memukau dan  ramah otak   ver wesTips membuat presentasi memukau dan  ramah otak   ver wes
Tips membuat presentasi memukau dan ramah otak ver wes
 
persentasi interaktif
persentasi interaktifpersentasi interaktif
persentasi interaktif
 
Build a custom metrics on aws cloud
Build a custom metrics on aws cloudBuild a custom metrics on aws cloud
Build a custom metrics on aws cloud
 
Patterns of Rejection - conclusion
Patterns of Rejection - conclusionPatterns of Rejection - conclusion
Patterns of Rejection - conclusion
 
Patterns of racial and ethnic relations
Patterns of racial and ethnic relationsPatterns of racial and ethnic relations
Patterns of racial and ethnic relations
 
Varna conf nodejs-oss-microsoft-azure[final]
Varna conf nodejs-oss-microsoft-azure[final]Varna conf nodejs-oss-microsoft-azure[final]
Varna conf nodejs-oss-microsoft-azure[final]
 

Semelhante a Win j svsphonegap-damyan-petev-mihail-mateev

Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App DevelopmentChris Morrell
 
Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Ivano Malavolta
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsJAX London
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conferencedmethvin
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)Jia Mi
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_uDoris Chen
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Nuxeo
 
Mobile web or native app
Mobile web or native appMobile web or native app
Mobile web or native appMike Takahashi
 
"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejaswebcat
 
AppNotch Enterprise
AppNotch EnterpriseAppNotch Enterprise
AppNotch Enterpriseappnotch
 
HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?Reto Meier
 
Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Soumow Dollon
 
Putting together a web app
Putting together a web appPutting together a web app
Putting together a web appRyan Lou
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDee Sadler
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxchitrachauhan21
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do ThatNathan Smith
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapAmar Mesic
 

Semelhante a Win j svsphonegap-damyan-petev-mihail-mateev (20)

Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
Intro to Xamarin
Intro to XamarinIntro to Xamarin
Intro to Xamarin
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
 
Mobile web or native app
Mobile web or native appMobile web or native app
Mobile web or native app
 
"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas
 
AppNotch Enterprise
AppNotch EnterpriseAppNotch Enterprise
AppNotch Enterprise
 
HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?HTML5 or Android for Mobile Development?
HTML5 or Android for Mobile Development?
 
Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5Develop an app for Windows 8 using HTML5
Develop an app for Windows 8 using HTML5
 
Putting together a web app
Putting together a web appPutting together a web app
Putting together a web app
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
Developing Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGapDeveloping Windows Phone 8 apps using PhoneGap
Developing Windows Phone 8 apps using PhoneGap
 

Mais de Mihail Mateev

Dealing with Azure Cosmos DB
Dealing with Azure Cosmos DBDealing with Azure Cosmos DB
Dealing with Azure Cosmos DBMihail Mateev
 
Clash of Technologies Google Cloud vs Microsoft Azure
Clash of Technologies Google Cloud vs Microsoft AzureClash of Technologies Google Cloud vs Microsoft Azure
Clash of Technologies Google Cloud vs Microsoft AzureMihail Mateev
 
Devday 2014 using_afs_in_your_cloud_app
Devday 2014 using_afs_in_your_cloud_appDevday 2014 using_afs_in_your_cloud_app
Devday 2014 using_afs_in_your_cloud_appMihail Mateev
 
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...Mihail Mateev
 
Using SQL Local Database in Mobile Applications
Using SQL Local Database in Mobile ApplicationsUsing SQL Local Database in Mobile Applications
Using SQL Local Database in Mobile ApplicationsMihail Mateev
 
Spatial Data with SQL Server Reporting Services
Spatial Data with SQL Server Reporting ServicesSpatial Data with SQL Server Reporting Services
Spatial Data with SQL Server Reporting ServicesMihail Mateev
 

Mais de Mihail Mateev (6)

Dealing with Azure Cosmos DB
Dealing with Azure Cosmos DBDealing with Azure Cosmos DB
Dealing with Azure Cosmos DB
 
Clash of Technologies Google Cloud vs Microsoft Azure
Clash of Technologies Google Cloud vs Microsoft AzureClash of Technologies Google Cloud vs Microsoft Azure
Clash of Technologies Google Cloud vs Microsoft Azure
 
Devday 2014 using_afs_in_your_cloud_app
Devday 2014 using_afs_in_your_cloud_appDevday 2014 using_afs_in_your_cloud_app
Devday 2014 using_afs_in_your_cloud_app
 
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...
Cloud conf-varna-2014-mihail mateev-spatial-data-and-microsoft-azure-sql-data...
 
Using SQL Local Database in Mobile Applications
Using SQL Local Database in Mobile ApplicationsUsing SQL Local Database in Mobile Applications
Using SQL Local Database in Mobile Applications
 
Spatial Data with SQL Server Reporting Services
Spatial Data with SQL Server Reporting ServicesSpatial Data with SQL Server Reporting Services
Spatial Data with SQL Server Reporting Services
 

Último

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Último (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

Win j svsphonegap-damyan-petev-mihail-mateev

  • 1. Windows store apps: WinJS vs PhoneGap Damyan Petev Technical Evangelist, Infragistics dpetev@infragistics.com @DamyanPetev Mihail Mateev Senior Technical Evangelist, Infragistics mmateev@infragistics.com @MihailMateev
  • 2. Agenda • • • • • • Windows Store Apps Intro WinJS and all that madness Similarities and differences PhoneGap Resources Q&A
  • 4. Principals • • • • • Pride in craftsmanship Fast and fluid Authentically digital Do more with less Win as one
  • 5. WinJS • Controls and other UI building blocks for Modern UI style apps • Style sheets with default Modern UI style design • Common infrastructure for responsive, HTML / CSS • Powerful engine for creating user interfaces • Reuse skills & code from the standard web • New HTML / CSS features give you the capabilities to make great UI/UX WinRT • Seamlessly integrate with the Modern UI style shell • Connect to other apps through contracts • Access storage, devices, and other capabilities of the PC
  • 7.
  • 8. IE is ok these days! • Like, it actually is!
  • 9. Why WinJS Apps If You are a web developer today … Build Native Apps With Your Existing Skill Set and Experience (mostly ) – – – – Familiar programming model Full benefit of hardware acceleration WinRT API & feature access Popular JavaScript libraries work in WinJS apps - jQuery, Ignite UI, Knockout, Angular, game engines, etc
  • 10. WinJS.xhr HTML/DOM Utils WinJS Element Attributes Logging Utils WinJS WinJS.Promise Element Selection/ Querying Keyboard Key Enumeration Validation WinJS WinJS.PromiseStat eMachine Coordinate Conversion Support for WinJS declarative model (supportedForProc essing) Class definition and inheritance WinJS.Class Namespace definition utilities WinJS.Namespace WinJS.ErrorFro mName Localized String Utilities Data-win-res processing Semantic Zoom ViewBox ListView Flyout SettingsFlyout Menu Menu Command GridLayout ListLayout WinJS Toolkits Support for declarative model (processAll) Controls Utilities ( setOptions) IZoomableView Custom Layout Interface AppBar IListBinding Fragment loading and rendering WinJS.UI.Fragments IListDataSource IListDataAdapte r IListN H DataSourceStatus StorageDataSo urce VirtualizedData Source Erro FlipView WinJS.UI. Animation helpers Animation Library Data Binding (as, bind) Mixins WinJS.Binding. List Conversions List Projections Support for declarative databinding Animation System Management Application Events WinJS. Application. sessionState WinJS.Navigation Functions local (storage) roaming (storage) temp (storage) WinJS.UI.Pages. PageControl WinJS.Binding. Template WinJS.UI.Pages. IPageControlM embers Tooltip Rating TabContainer TimePicker DatePicker ToggleSwitch HTMLControl Light StyleSheet Dark StyleSheet
  • 11. Personality What Makes a Windows Store App a Windows Store App? • • • • • • • • • Fast & Fluid Live Tiles Animations Transitions Charms AppBar Search Contracts Device Access
  • 13. Extra UI at no cost App Bar Settings
  • 14. Windows UI Apps feature adaptive layouts : Layouts • • • Multiple screen size support Snapped and filled view states Handle rotation CSS Layouts : • CSS Grid, CSS Flexbox, CSS Multicolumn, Media Queries • Fast & Fluid Native performance X Full View Snapped View X Fill View
  • 15. Transforms & Animations CSS & WinJS Animation Library Page transition Content transition Fade in/out Crossfade Pointer up/down Expand/Collapse Reposition Show/Hide popup Show/Hide edge UI Show/Hide panel Add/Delete from list Add/Delete from search list Peek Badge update Start/End a drag or drag-between Swipe hint Swipe select/deselect
  • 16. Touch, Pan, Zoom, Scroll Fast & Fluid Interaction via CSS Windows Store Apps feature direct manipulation panning and zooming of content as a predominant user interface paradigm. CSS gives you: • Support touch, mouse, and keyboard • “Stick to the finger” experience for panning and zooming • Consistent user experience with rails, inertia, and boundary feedback • Support for snap points, nesting, and chaining
  • 17. WinJS Stylesheets Styling an App • Beautiful Dark & Light styles are built in • Well defined, meaningful selectors you can easily understand and override • Visual Studio templates help a lot
  • 18.
  • 19. default.css • Transparent to developers • Provides styles for: – Base elements (HTML, Body, Iframe…) – Text elements (H1, P, DD…) – HTML controls (checkbox, radio button, range…) – WinJS controls (ratings, toggle…) – Additional text element style classes (title, subtitle, item text…) – Additional HTML control style classes (back button…)
  • 20. Built-in styling classes <!– Get a custom back button look --> <button class="win-backbutton"></button> <h1 class="win-title">win-title</h1> <h1 class="win-contentTitle">wincontentTitle</h1> <h1 class="win-contentSubtitle">wincontentSubtitle</h1>
  • 21. ALM
  • 22. Is it really the same?
  • 23. Of standards and popular terms Modern patterns and practices you might know/have seen • Strict mode • Promises [ async ] • SPA
  • 24. I’ll get back to you.. I promise!* from the callback with love var promise = doSomeWork(); promise.then(function(foo){ // continue working here return doSomeMoreWork(); }).then(function(result){ // … }); *but can’t promise to solve all your problems.
  • 25. SPA
  • 26. Single Page App • Web is stateless in nature • Navigation means loosing context • Apps shouldn’t be like that, so:
  • 27. SPA • Keeping it familiar… <!-- A hyperlink to page2.html. --> <p><a href="/pages/page2/page2.html">Go to page 2.</a></p>
  • 29. Pages & Navigation Application Shell Page Content • Navigation template • AppBar integration • Load and [unload] chunks of HTML + CSS + JS • Page content can be dynamic including other WinJS controls within it • Context & State are maintained A series of events to control the process: Before Navigate before navigation attempt Navigating navigating away from a page Navigated
  • 30. The platform differences • No alert  • ms-appx:/// vs. http(s):// vs. file:/// vs. ms-appdata:/// X X • DOM Security - With great power come.. great restrictions :) Still OK : • window.close() //quite useless though • createElement
  • 31. Not in the face !!111!1!! • If ( using DOM) filter through toStaticHTML() – – – – – – • • createContextualFragment innerHTML / outerHTML insertAdjacentHTML pasteHTML document.write / document.writeln DOMParser.parseFromString WinJS.Utilities.markSupportedForProcessing(functionName); Alternative? var someElement = document.getElementById('someElementID'); MSApp.execUnsafeLocalFunction( function() { someElement.innerHTML = '<div onclick="console.log("hi");">hi</div>' });
  • 32. Controls + Data Binding • Rating: <div id="Div1" data-win-control="WinJS.UI.Rating" data-win-bind="winControl.averageRating: rating" data-win-options="{maxRating:5}"></div> • AppBar: <div id="appbar" data-win-control="WinJS.UI.AppBar"> <button data-win-control="WinJS.UI.AppBarCommand“.. • Navigation container: <div id="contenthost" data-win-control="Application.PageControlNavigator" data-win-options="{home: '/pages/home/home.html'}"> </div>
  • 34. Debug • DOM Explorer and JavaScript Console • Remote Debug • Simulation of states • VS 2013 – Performance and Diagnostics
  • 35.
  • 37. Why PhoneGap? • There are more than 100 000 000 WEB developers! • The web is awesome!
  • 38. What is PhoneGap ? Your Code
  • 39. What is PhoneGap ? Your Code Native Web View
  • 40. What is PhoneGap ? Your Code Native Web View Native APIs
  • 41. What is PhoneGap ? Your Code Native Web View Native APIs Native App - .apk, .xap, etc.
  • 42. What is PhoneGap ? • PhoneGap / Cordova for Windows Store App uses WinJS • There is no “special” cordova Web View for WinRT
  • 43. PhoneGap / Cordova API • • • • • • Accelerometer Camera Capture (video) Compass Connection Contacts • • • • • • • Device File IO Geolocation Globalization Media Notifications Storage (database)
  • 44. PhoneGap / Cordova Platforms
  • 45. PhoneGap / Cordova Platforms
  • 46. PhoneGap / Cordova CLI Requires Node.js $ npm install -g cordova $ cordova create hello com.example.hello HelloWorld $ cordova platform add windows8 $ cordova run windows8 $ cordova emulate windows8 $ cordova platform update windows8
  • 47. Debugging PhoneGap for Windows Store Apps: • 2 ways to debug PhoneCap/Windows 8.x App – As WinJS App – As PhoneGap App (winery, http://debug.phonegap.com/)
  • 48. Naturally, apps targeted at 8.1 don’t get scaled down for Win 8. So yeah, there’s that.
  • 49. The take away • WinJS vs PhoneGap is a matter of API preference and code portability • Windows Store basic rules apply to PhoneGap • Do whatever you feel like, as long as you: – Stay within platform look and feel – Understand the sandbox model of the app • Mash up frameworks and tools: – Should be compatible (like jQuery 2.x) – Or use workarounds
  • 50. • Състезание 1: Windows 8.1 или Windows Phone 8 http://bgapps.promorc.com/ • Състезание 2: Win 8 app – Best UX – Most Innovative – Best migrated from WP – More worldwide http://winappdevcon.promorc.com
  • 51. Resources • The ‘everything you need and more’ place: – http://msdn.microsoft.com/en-US/windows/apps/ • Windows 8 samples: – http://code.msdn.microsoft.com/windowsapps/Windows-8-app-samples-4d76cbbf • Windows 8.1 Samples: – http://code.msdn.microsoft.com/windowsapps/Windows-8-Modern-Style-AppSamples • Free ebook: Programming Windows Store Apps with HTML, CSS, and JavaScript, Second Edition (second preview): • http://aka.ms/secondedition/secondpreview http://blogs.msdn.com/b/microsoft_press/archive/2013/10/29/free-ebook-programmingwindows-store-apps-with-html-css-and-javascript-second-edition-second-preview.aspx
  • 52. Resources & Q&A • • • WinJS for the PhoneGap developer blog series: – http://blogs.msdn.com/b/glengordon/ Windows 8 Platform Guide – http://docs.phonegap.com/en/edge/guide_platforms_win8_index.md.html Next event: Building your first Analysis Services solution (11 of February, 2014) – Speaker: Ivan Donev
  • 53. Resources & Q&A • Next conference: Azure Bootcamp Bulgaria (29 of Mach, 2014)