SlideShare una empresa de Scribd logo
1 de 72
Descargar para leer sin conexión
AGENDA
I’m a Web developer, I don’t know (at
all) Microsoft technologies.

                  I already developed
                 an HTML5 web page.

                    I want to create the
                          Windows 8
                             app
                         of my page.
My existing web page: home.dollon.net
Compatible with all last browsers on PC and
tablets.
Works with HTML5 and CSS3 features,
knockout.js, jQuery, less (and node.js web service)
DEMO
So now, please Microsoft, where is the right
button click
“Transform this website as a metro style app for Windows8”?
It does not exist. And it’s   normal.
Because you are working for a specific kind of tablet
with native call (new API, new controls…) and NEW
design style (metro).

You are not designing a web page. You are developing a
native app.
9 things to migrate your HTML5 app on
       Windows 8 environment.
0 – which kind of tools I need?*
         *this point is not included on the counter ☺
DEMO
1 - what is a package?
a package is a ZIP file            Don’t forget to obfuscate your code

                   It’s the ‘executable’ of your project

  It contains everything (HTML, JS, Manifest..)

After installation, the app is located here c:Program FilesWindowsApps
You can use PowerShell
               to deploy it
 And all packages are signed with certificates
2 – what happens in runtime?
The process that hosts/executes a Metro style app
using JavaScript is called WWAHost.exe

 Your app ‘live’ inside a sandbox without all privileges
                                     of the current user
Process state transitions

    A user
               App is
  launch an                   Suspended      Terminated
              running
     app




An app gets 5 secondes to handle suspend and is
notified when it has been resumed
App is not notified before a termination caused by
low resources
3 – Differences between Metro style app
  And traditional HTML5 web page
ALL*
HTML5/CSS3 features are supported
     *if IE10 “trident” layout engine support it
ALL*
JavaScript features are supported
     *if IE10 “Chakra” engine support it
Native APIs
  DOM Events
                                   Namespaces
            Controls          Enumerations
   No Java, Silverlight, Flash and other embedded components

Some ActiveX controls are disabled
So, HTML5, CSS3 and JavaScript

have the same support of web APIs
                                 than IE 10
                    +
         API from WinRT
And you have to know that


seriously
ROCKS!
This isn’t just a container
       like PhoneGap

        It doesn’t run in a browser
REUSE THE SAME CODE
            Just to see if it works ☺
4 – what is WinRT?
Windows RT != WinRT
 (Windows RT is the Windows 8 version for ARM)
WinRT
         Resides directly on the top of the kernel
                           just like the Win32 API

WinRT APIs are written in unmanaged C++
and designed to be object-oriented
5 – what is WinJS?
WinJS is the orange layer
A language projection exists for .NET and C++ too
Windows library for JS
   Helpers
                           Animations
      Templates         Styles
 App Model    Data Binding

                              Controls
         Navigation
Binding.js        Wwaap.js
Ui.js
               Base.js
 Controls.js
                Animation.js
6 – Windows Controls
Built-in Controls
Metro-UI Styles
                          Touch enabled
          Native     Customizable
All basic controls
                              Controls
          Same in XAML
AppBar
Useful to bring up commands
on demand

Don’t forget to use Charms
for some entry points
MODIFY THE APP
            With Windows 8 controls
7 – Multiple Views and
     Resolutions
The principal screen can be at minimum
1024x768

It exists widescreen (1366x768+)

Two other modes: snapview and portait
Use three kind of image size (100%,
140% and 180%).

Depending on the resolutions, images
are loaded automatically

Image.jpg     Image.scale-180.jpg
Use of CSS media queries
MODIFY THE APP
            Screens
7 – Use Contracts
Share to export the current content

Search to find content

File Picker to allow user to access content from
outside

Settings to configure the app
MODIFY THE APP
            Contracts
8 – Use Tiles
Tiles is the “link” to open your app
It could be a “secondary tiles”
Can provide a lot of information (icons,
notifications, counter)
MODIFY THE APP
            With Tiles and Splash
9 – Debugging and Performances
Performance
Tips & tricks that still work:
For safe dynamic content, use innerHTML
Link CSS stylesheets at the top of the page
Avoid inline JavaScript and inline CSS styles
Don’t parse JSON by hand, use JSON.parse
A Metro style app using HTML5
  is more than a web page …
Optimize your landing page
Rely on packaged content and local data
Use local images scaled to the right size
Use WinJS fragments to load parts of your app on demand
   Defer parsing of unneeded HTML content
   Delays JavaScript
   Keeps your DOM small: look-up and manipulations are
  quicker
Further optimizations
Defer some initialization to after the splash screen
    Start network downloads after initialization
    Delay loading databases
Consolidate small JS files that are related into larger files
If you need more time, use an extended splash screen
Manage your resources
Keep a lightweight DOM
Release expensive content, such as media elements, as soon
as they are no longer needed
Help the garbage collector
     Avoid circular references between your elements and
    JavaScript code
     Review how you use your Object URLs
On suspend, free resources that are easy to recreate
 Use media content from the user at the screen resolution
 Tune your app launch time to create great first
impressions
 Keep your app alive by minimizing your memory footprint
 Be responsive, don’t block the UI thread
Debugging JavaScript apps is
      !@#$%^ hard!
Debugging with Visual Studio
Launch with debugging
debugger keyword
Debug.enableFirstChanceException(true);
JavaScript console
DOM explorer
Debugging with Blend
Understand your CSS with the Winning Rule and Show Set
Properties mode
Debug device-state issues with the Platform and Styles
Panes
Catch grid layout issues
Find parser-generated elements with the Live DOM
Diagnose post-interaction problems with Interactive Mode
10 – Deployment
 But no info now,
 it still not possible to publish app
Result
Conclusion
Skydrive with all samples / slides / videos:
          http://sdrv.ms/KsoFUq

   Webcast of this session on YouTube:
Q&A
(Don’t hesitate to
give us feedbacks on
twitter @juliendollon
/ @soumow)

Más contenido relacionado

La actualidad más candente

Metro Style Apps - Whats there for Developers
Metro Style Apps - Whats there for DevelopersMetro Style Apps - Whats there for Developers
Metro Style Apps - Whats there for DevelopersJitendra Soni
 
WPF For Beginners - Learn in 3 days
WPF For Beginners  - Learn in 3 daysWPF For Beginners  - Learn in 3 days
WPF For Beginners - Learn in 3 daysUdaya Kumar
 
Go mobile with Windows Phone
Go mobile with Windows PhoneGo mobile with Windows Phone
Go mobile with Windows PhoneDima Maleev
 
Introduction to XAML and WPF
Introduction to XAML and WPFIntroduction to XAML and WPF
Introduction to XAML and WPFDoncho Minkov
 
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
 
Tech days faridabad
Tech days  faridabadTech days  faridabad
Tech days faridabadAnkur Mishra
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightFrank La Vigne
 
Mix 2010 twilight
Mix 2010 twilightMix 2010 twilight
Mix 2010 twilightIntergen
 
Mobile Application Development Using Java
Mobile Application Development Using JavaMobile Application Development Using Java
Mobile Application Development Using JavaNexSoftsys
 
Role of java in android app development
Role of java in android app developmentRole of java in android app development
Role of java in android app developmentRahul Rana
 
Windows Presentation Foundation
Windows Presentation Foundation  Windows Presentation Foundation
Windows Presentation Foundation Deepika Chaudhary
 
Live Source - an Agile Toolkit
Live Source - an Agile ToolkitLive Source - an Agile Toolkit
Live Source - an Agile ToolkitAlline Oliveira
 
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
 
Wcf library
Wcf libraryWcf library
Wcf libraryvicmorji
 
Universal windowsplatform
Universal windowsplatformUniversal windowsplatform
Universal windowsplatformvicmorji
 
Android Development Slides
Android Development SlidesAndroid Development Slides
Android Development SlidesVictor Miclovich
 

La actualidad más candente (19)

Metro Style Apps - Whats there for Developers
Metro Style Apps - Whats there for DevelopersMetro Style Apps - Whats there for Developers
Metro Style Apps - Whats there for Developers
 
WPF For Beginners - Learn in 3 days
WPF For Beginners  - Learn in 3 daysWPF For Beginners  - Learn in 3 days
WPF For Beginners - Learn in 3 days
 
Go mobile with Windows Phone
Go mobile with Windows PhoneGo mobile with Windows Phone
Go mobile with Windows Phone
 
Introduction to XAML and WPF
Introduction to XAML and WPFIntroduction to XAML and WPF
Introduction to XAML and WPF
 
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
 
Android class provider in mumbai
Android class provider in mumbaiAndroid class provider in mumbai
Android class provider in mumbai
 
Tech days faridabad
Tech days  faridabadTech days  faridabad
Tech days faridabad
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
 
Computer project work
Computer project workComputer project work
Computer project work
 
Mix 2010 twilight
Mix 2010 twilightMix 2010 twilight
Mix 2010 twilight
 
Mobile Application Development Using Java
Mobile Application Development Using JavaMobile Application Development Using Java
Mobile Application Development Using Java
 
Role of java in android app development
Role of java in android app developmentRole of java in android app development
Role of java in android app development
 
Windows Presentation Foundation
Windows Presentation Foundation  Windows Presentation Foundation
Windows Presentation Foundation
 
Live Source - an Agile Toolkit
Live Source - an Agile ToolkitLive Source - an Agile Toolkit
Live Source - an Agile Toolkit
 
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
 
DDive11 - Mobile Development For Domino
DDive11 - Mobile Development For DominoDDive11 - Mobile Development For Domino
DDive11 - Mobile Development For Domino
 
Wcf library
Wcf libraryWcf library
Wcf library
 
Universal windowsplatform
Universal windowsplatformUniversal windowsplatform
Universal windowsplatform
 
Android Development Slides
Android Development SlidesAndroid Development Slides
Android Development Slides
 

Similar a Develop an app for Windows 8 using HTML5

JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchJQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchSteve Drucker
 
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Decksschwarzhoff
 
An introduction to Titanium
An introduction to TitaniumAn introduction to Titanium
An introduction to TitaniumGraham Weldon
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15sullis
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do ThatNathan Smith
 
SLUGUK BUILD Round-up
SLUGUK BUILD Round-upSLUGUK BUILD Round-up
SLUGUK BUILD Round-upDerek Lakin
 
What Is Silverlight
What Is SilverlightWhat Is Silverlight
What Is Silverlightmtaulty
 
What Is Silverlight
What Is SilverlightWhat Is Silverlight
What Is Silverlightukdpe
 
What Is Silverlight
What Is SilverlightWhat Is Silverlight
What Is Silverlightguest50274e
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 DevelopmentShahed Chowdhuri
 
European SharePoint Conference: Mobile Applications for SharePoint using HTML5
European SharePoint Conference: Mobile Applications for SharePoint using HTML5European SharePoint Conference: Mobile Applications for SharePoint using HTML5
European SharePoint Conference: Mobile Applications for SharePoint using HTML5Christian Heindel
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011sullis
 
Windows 8 & JavaScript
Windows 8 & JavaScriptWindows 8 & JavaScript
Windows 8 & JavaScriptRobert MacLean
 

Similar a Develop an app for Windows 8 using HTML5 (20)

JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchJQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
 
Windows 7 mobile
Windows 7 mobileWindows 7 mobile
Windows 7 mobile
 
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Deck
 
An introduction to Titanium
An introduction to TitaniumAn introduction to Titanium
An introduction to Titanium
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
Rhodes vs Phonegap
Rhodes vs PhonegapRhodes vs Phonegap
Rhodes vs Phonegap
 
Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
SLUGUK BUILD Round-up
SLUGUK BUILD Round-upSLUGUK BUILD Round-up
SLUGUK BUILD Round-up
 
What Is Silverlight
What Is SilverlightWhat Is Silverlight
What Is Silverlight
 
What Is Silverlight
What Is SilverlightWhat Is Silverlight
What Is Silverlight
 
What Is Silverlight
What Is SilverlightWhat Is Silverlight
What Is Silverlight
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 Development
 
European SharePoint Conference: Mobile Applications for SharePoint using HTML5
European SharePoint Conference: Mobile Applications for SharePoint using HTML5European SharePoint Conference: Mobile Applications for SharePoint using HTML5
European SharePoint Conference: Mobile Applications for SharePoint using HTML5
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
Web techh
Web techhWeb techh
Web techh
 
Web tech
Web techWeb tech
Web tech
 
Web tech
Web techWeb tech
Web tech
 
Web tech
Web techWeb tech
Web tech
 
Windows 8 & JavaScript
Windows 8 & JavaScriptWindows 8 & JavaScript
Windows 8 & JavaScript
 

Último

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Develop an app for Windows 8 using HTML5

  • 1.
  • 2.
  • 3.
  • 5. I’m a Web developer, I don’t know (at all) Microsoft technologies. I already developed an HTML5 web page. I want to create the Windows 8 app of my page.
  • 6. My existing web page: home.dollon.net
  • 7. Compatible with all last browsers on PC and tablets. Works with HTML5 and CSS3 features, knockout.js, jQuery, less (and node.js web service)
  • 9.
  • 10. So now, please Microsoft, where is the right button click “Transform this website as a metro style app for Windows8”?
  • 11. It does not exist. And it’s normal. Because you are working for a specific kind of tablet with native call (new API, new controls…) and NEW design style (metro). You are not designing a web page. You are developing a native app.
  • 12. 9 things to migrate your HTML5 app on Windows 8 environment.
  • 13. 0 – which kind of tools I need?* *this point is not included on the counter ☺
  • 14. DEMO
  • 15.
  • 16. 1 - what is a package?
  • 17. a package is a ZIP file Don’t forget to obfuscate your code It’s the ‘executable’ of your project It contains everything (HTML, JS, Manifest..) After installation, the app is located here c:Program FilesWindowsApps
  • 18. You can use PowerShell to deploy it And all packages are signed with certificates
  • 19. 2 – what happens in runtime?
  • 20. The process that hosts/executes a Metro style app using JavaScript is called WWAHost.exe Your app ‘live’ inside a sandbox without all privileges of the current user
  • 21. Process state transitions A user App is launch an Suspended Terminated running app An app gets 5 secondes to handle suspend and is notified when it has been resumed App is not notified before a termination caused by low resources
  • 22. 3 – Differences between Metro style app And traditional HTML5 web page
  • 23. ALL* HTML5/CSS3 features are supported *if IE10 “trident” layout engine support it
  • 24. ALL* JavaScript features are supported *if IE10 “Chakra” engine support it
  • 25. Native APIs DOM Events Namespaces Controls Enumerations No Java, Silverlight, Flash and other embedded components Some ActiveX controls are disabled
  • 26. So, HTML5, CSS3 and JavaScript have the same support of web APIs than IE 10 + API from WinRT
  • 27. And you have to know that seriously ROCKS!
  • 28. This isn’t just a container like PhoneGap It doesn’t run in a browser
  • 29. REUSE THE SAME CODE Just to see if it works ☺
  • 30.
  • 31. 4 – what is WinRT?
  • 32. Windows RT != WinRT (Windows RT is the Windows 8 version for ARM)
  • 33. WinRT Resides directly on the top of the kernel just like the Win32 API WinRT APIs are written in unmanaged C++ and designed to be object-oriented
  • 34. 5 – what is WinJS?
  • 35. WinJS is the orange layer
  • 36. A language projection exists for .NET and C++ too
  • 37. Windows library for JS Helpers Animations Templates Styles App Model Data Binding Controls Navigation
  • 38. Binding.js Wwaap.js Ui.js Base.js Controls.js Animation.js
  • 39. 6 – Windows Controls
  • 40. Built-in Controls Metro-UI Styles Touch enabled Native Customizable All basic controls Controls Same in XAML
  • 41. AppBar Useful to bring up commands on demand Don’t forget to use Charms for some entry points
  • 42. MODIFY THE APP With Windows 8 controls
  • 43.
  • 44.
  • 45. 7 – Multiple Views and Resolutions
  • 46. The principal screen can be at minimum 1024x768 It exists widescreen (1366x768+) Two other modes: snapview and portait
  • 47. Use three kind of image size (100%, 140% and 180%). Depending on the resolutions, images are loaded automatically Image.jpg Image.scale-180.jpg
  • 48. Use of CSS media queries
  • 49. MODIFY THE APP Screens
  • 50.
  • 51. 7 – Use Contracts
  • 52. Share to export the current content Search to find content File Picker to allow user to access content from outside Settings to configure the app
  • 53. MODIFY THE APP Contracts
  • 54.
  • 55. 8 – Use Tiles
  • 56. Tiles is the “link” to open your app It could be a “secondary tiles” Can provide a lot of information (icons, notifications, counter)
  • 57. MODIFY THE APP With Tiles and Splash
  • 58.
  • 59. 9 – Debugging and Performances
  • 60. Performance Tips & tricks that still work: For safe dynamic content, use innerHTML Link CSS stylesheets at the top of the page Avoid inline JavaScript and inline CSS styles Don’t parse JSON by hand, use JSON.parse
  • 61. A Metro style app using HTML5 is more than a web page …
  • 62. Optimize your landing page Rely on packaged content and local data Use local images scaled to the right size Use WinJS fragments to load parts of your app on demand Defer parsing of unneeded HTML content Delays JavaScript Keeps your DOM small: look-up and manipulations are quicker
  • 63. Further optimizations Defer some initialization to after the splash screen Start network downloads after initialization Delay loading databases Consolidate small JS files that are related into larger files If you need more time, use an extended splash screen
  • 64. Manage your resources Keep a lightweight DOM Release expensive content, such as media elements, as soon as they are no longer needed Help the garbage collector Avoid circular references between your elements and JavaScript code Review how you use your Object URLs
  • 65. On suspend, free resources that are easy to recreate Use media content from the user at the screen resolution Tune your app launch time to create great first impressions Keep your app alive by minimizing your memory footprint Be responsive, don’t block the UI thread
  • 66. Debugging JavaScript apps is !@#$%^ hard!
  • 67. Debugging with Visual Studio Launch with debugging debugger keyword Debug.enableFirstChanceException(true); JavaScript console DOM explorer
  • 68. Debugging with Blend Understand your CSS with the Winning Rule and Show Set Properties mode Debug device-state issues with the Platform and Styles Panes Catch grid layout issues Find parser-generated elements with the Live DOM Diagnose post-interaction problems with Interactive Mode
  • 69. 10 – Deployment But no info now, it still not possible to publish app
  • 71. Conclusion Skydrive with all samples / slides / videos: http://sdrv.ms/KsoFUq Webcast of this session on YouTube:
  • 72. Q&A (Don’t hesitate to give us feedbacks on twitter @juliendollon / @soumow)