SlideShare a Scribd company logo
1 of 41
Razvoj Univerzalnih Windows aplikacija
Niko Vrdoljak, Teched
nikov@teched.hr
Kondicionalno kompajliranje
Parcijalne klase
Dependency Injection
Windows Runtime (WinRT) je dijeljeni
runtime i API koje koriste Windows store
aplikacije na Windows platformi
4
Common
WinRT APIs
Phone-specific
WinRT APIs
Windows-specific
WinRT APIs
Konvergencija u verziji 8.1
• Cilj je 100%-na konvergencija u razvoju
• U verziji 8.0, konvergencija je bila u oko 30% API-ja
• U verziji 8.1, konvergencija je u preko 90% API-ja
HTML
Win32
JavaScript Code
WinRT
C++ Code C#/VB Code
HTML XAML XAML
Windows Runtime XAML
WinJS
.NET for Windows
Store
C#/VB Code
Silverlight XAML
Silverlight .NET
Windows Phone
Silverlight XAML
Windows Phone 8.1 App Windows 8.1 App
XAML View
Phone UI
XAML View
Windows UI
Shared Code, Images, Files
WinRT
Windows Phone 8.1 App Windows 8.1 App
XAML View
XAML UI
XAML View
XAML UI
Logic Logic
Data Data
?
Logic
Data
većina tipova datoteka
Libraries & Windows Runtime Components
Datoteke s kodom
XAML
Slike
XML/JSON
RESW (resursi)
Podržava WinRT API-je
Pristupit joj mogu i C++ i Javascript aplikacije
Odvajanje UI od programske logike
+ platform specific API sets (geolocation, media, sensors)
+ neke XAML komponente ako je moguće
Windows 8.1 Windows Phone 8.1
neki API-ji de drugačije ponašaju na Windowsima ili Windows Phone-u
Windows Only
WinRT
e.g. search contract
e.g. multiple windows
e.g. resizable windows
e.g. printing support
Phone Only
WinRT
e.g. action center
e.g. status bar
e.g. back key handling
files & settings: local, temp, roaming, pickers…
network: http, websockets, sockets…
notifications: tiles, toasts, badges, push
store: app purchases, receipts…
sensors: gps, geofencing, gyro, compass…
lifecycle: launch, suspend, resume, background tasks
localisation: resource resolution from XAML/code…
//Create the picker object
FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.Thumbnail;
openPicker.SuggestedStartLocation =
PickerLocationId.PicturesLibrary;
// Users expect to have a filtered view of their folders
openPicker.FileTypeFilter.Add(".jpg");
openPicker.FileTypeFilter.Add(".png");
// Open the picker for the user to pick a file
StorageFile file =
await openPicker.PickSingleFileAsync();
if (file != null)
{
// Do something with the file...
}
//Create the picker object
FileOpenPicker openPicker = new FileOpenPicker();
// On Windows Phone, setting Filtering to image types
// causes Picker to show Camera Roll
openPicker.FileTypeFilter.Add(".jpg");
openPicker.FileTypeFilter.Add(".png");
// Open the picker for the user to pick a file
openPicker.PickSingleFileAndContinue();
100%
100%
No: Location (Windows) vs. Geopoint (WP)
No: Bing Maps (Windows) vs. WinRT Map control (WP)
Windows = WINDOWS_APP
Windows Phone = WINDOWS_PHONE_APP
#if WINDOWS_PHONE_APP
Windows.Phone.UI.Input.HardwareButtons.BackPressed +=
this.HardwareButtons_BackPressed;
#endif
/// <summary>
/// DataSource.cs
/// </summary>
public partial class DataSource :IDataSource {
public async Task<IEnumerable<IFolder>> RetrieveFolders(IFolder root) {
... // other logic
var folders = await LoadFolders(root);
... // other logic
return folders
}
}
/// <summary>
/// DataSource.WP.cs
/// </summary>
public partial class DataSource {
private async Task<IEnumerable<IFolder>> LoadFolders(IFolder root) {
...
}
}
HERE maps on Windows (8.1)/Phone (8.0)
jednake,
isto ponašanje
Button
Slider
ToggleSwitch
ProgressBar
Itd. (podosta)
zajedničke,
različito korištenje
Hub
ListView
GridView
itd.
zajedničke,
različito ponašanje
DatePicker
TimePicker
CommandBar
AppBar
itd.
posebne
SearchBox
Pivot
ContentDialog
AutoSuggestBox
itd.
#if WINDOWS_APP
var result = VisualStateManager.GoToState(this, "Windows", false);
#elif WINDOWS_PHONE_APP
var result = VisualStateManager.GoToState(this, "WindowsPhone", false);
#endif
<Application
x:Class="FlickrSearch.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FlickrSearch">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CustomDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FlickrSearch">
<Style x:Key="MonTextblock" TargetType="TextBlock">
<Setter Property="Foreground" Value="DeepPink"></Setter>
</Style>
<DataTemplate x:Name="APhotoTemplate">
<Grid>
<Image Source="{Binding Path}" VerticalAlignment="Top" />
<TextBlock TextWrapping="Wrap" Text="{Binding Title}" FontSize="28" Margin="10"/>
</Grid>
</DataTemplate>
</ResourceDictionary>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FlickrSearch">
<Style x:Key="MonTextblock" TargetType="TextBlock">
<Setter Property="Foreground" Value="Red"></Setter>
</Style>
<DataTemplate x:Name="APhotoTemplate">
<Grid>
<Image Source="{Binding Path}" VerticalAlignment="Top" />
</Grid>
</DataTemplate>
</ResourceDictionary>
<TextBlock Text="{Binding Title}"
Style="{StaticResource MonTextblock}"/>
<FlipView ItemsSource="{Binding Items}"
ItemTemplate="{StaticResource APhotoTemplate}">
WP 8.1 App – PFN 12345
Roaming Local Temp
Windows App – PFN 12345
RoamingLocalTemp
PFN 12345
Roaming
folder
Aplikacija piše korištenjem
standardnih file/settings API-ja.
Sync engine peridično
prebacuje podatke (user
idle, battery, network, etc.)
OneDrive sprema do 100kb roaming
podataka po aplikaciji (nisu uključeni u
kvotu korisnika). Ako premaši, sync
prestaje s radom.
Ostale klijente obavještava
Windows Notification Service.
Ako aplikacija radi, „event” se
okida.
Roaming
settings
Windows.Storage.ApplicationDataContainer roamingSettings =
Windows.Storage.ApplicationData.Current.RoamingSettings;
// saving settings...
roamingSettings.Values["userName"] = someData;
// fetching settings...
if (roamingSettings.Values.ContainsKey("userName"))
{
userName = roamingSettings.Values["userName"].ToString();
}
•
• http://appstudio.windows.com
1.
2.
3.
4.
Razvoj univerzalnih windows aplikacija
Razvoj univerzalnih windows aplikacija

More Related Content

Similar to Razvoj univerzalnih windows aplikacija

23 silverlight apps on windows phone 8.1
23   silverlight apps on windows phone 8.123   silverlight apps on windows phone 8.1
23 silverlight apps on windows phone 8.1WindowsPhoneRocks
 
Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説shinobu takahashi
 
Windows8 metro presentationupdated
Windows8 metro presentationupdatedWindows8 metro presentationupdated
Windows8 metro presentationupdatedDhananjay Kumar
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 DevelopmentShahed Chowdhuri
 
Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Joseph Labrecque
 
ユニバーサル Windows アプリ開発
ユニバーサル Windows アプリ開発ユニバーサル Windows アプリ開発
ユニバーサル Windows アプリ開発Akira Onishi
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
 
Universal Apps Oct 2014
Universal Apps Oct 2014Universal Apps Oct 2014
Universal Apps Oct 2014Joe Healy
 
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
 
Windows Phone Apps Development overview
Windows Phone Apps Development overviewWindows Phone Apps Development overview
Windows Phone Apps Development overviewPruthvi Reddy
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App DevelopmentAndri Yadi
 
Windows phone 8 overview
Windows phone 8 overviewWindows phone 8 overview
Windows phone 8 overviewcodeblock
 
Windows Phone 8 - introducing wp8 development
Windows Phone 8 - introducing wp8 developmentWindows Phone 8 - introducing wp8 development
Windows Phone 8 - introducing wp8 developmentGouda Mando
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentOliver Scheer
 
20141216 멜팅팟 부산 세션 ii - cross platform 개발
20141216 멜팅팟 부산   세션 ii - cross platform 개발20141216 멜팅팟 부산   세션 ii - cross platform 개발
20141216 멜팅팟 부산 세션 ii - cross platform 개발영욱 김
 
Titanium appcelerator my first app
Titanium appcelerator my first appTitanium appcelerator my first app
Titanium appcelerator my first appAlessio Ricco
 

Similar to Razvoj univerzalnih windows aplikacija (20)

23 silverlight apps on windows phone 8.1
23   silverlight apps on windows phone 8.123   silverlight apps on windows phone 8.1
23 silverlight apps on windows phone 8.1
 
Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説Windows Phone 8.1 アプリ開発徹底解説
Windows Phone 8.1 アプリ開発徹底解説
 
Developing on Windows 8
Developing on Windows 8Developing on Windows 8
Developing on Windows 8
 
Windows8 metro presentationupdated
Windows8 metro presentationupdatedWindows8 metro presentationupdated
Windows8 metro presentationupdated
 
Deeper into Windows 10 Development
Deeper into Windows 10 DevelopmentDeeper into Windows 10 Development
Deeper into Windows 10 Development
 
WinRT Holy COw
WinRT Holy COwWinRT Holy COw
WinRT Holy COw
 
Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.
 
ユニバーサル Windows アプリ開発
ユニバーサル Windows アプリ開発ユニバーサル Windows アプリ開発
ユニバーサル Windows アプリ開発
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 
WPF Deep Dive
WPF Deep DiveWPF Deep Dive
WPF Deep Dive
 
Universal Apps Oct 2014
Universal Apps Oct 2014Universal Apps Oct 2014
Universal Apps Oct 2014
 
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
 
Windows Phone Apps Development overview
Windows Phone Apps Development overviewWindows Phone Apps Development overview
Windows Phone Apps Development overview
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
 
Windows phone 8 overview
Windows phone 8 overviewWindows phone 8 overview
Windows phone 8 overview
 
Windows Phone 8 - introducing wp8 development
Windows Phone 8 - introducing wp8 developmentWindows Phone 8 - introducing wp8 development
Windows Phone 8 - introducing wp8 development
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
 
20141216 멜팅팟 부산 세션 ii - cross platform 개발
20141216 멜팅팟 부산   세션 ii - cross platform 개발20141216 멜팅팟 부산   세션 ii - cross platform 개발
20141216 멜팅팟 부산 세션 ii - cross platform 개발
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
Titanium appcelerator my first app
Titanium appcelerator my first appTitanium appcelerator my first app
Titanium appcelerator my first app
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
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
 
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
 
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
 
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
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
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
 
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
 
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!
 
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
 
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?
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Razvoj univerzalnih windows aplikacija