?

Log in

No account? Create an account
Windows Phone: //build/ conference for Windows/Windows Phone developers - Greg [entries|archive|friends|userinfo]
Greg

[ website | gregstoll.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| * Homepage * Mobile apps (Windows Phone, Win8, Android, webOS) * Pictures * LJBackup * Same-sex marriage map * iTunesAnalysis * Where's lunch? ]

Windows Phone: //build/ conference for Windows/Windows Phone developers [May. 10th, 2015|11:59 am]
Greg
[Tags|]
[Current Mood |calmcalm]

I attended Microsoft's //build/ conference a few weeks ago, and there was a lot of interesting news for Windows/Windows Phone developers. Here's what you need to know!

Useful links:
- Microsoft's landing page for developing for Windows 10
- How to move a Universal 8.1 app to Windows 10
- Windows 10 app samples
- What's New in Windows 10
- Join the Windows Insider program to download a preview of Windows 10
- See video/slides for all the //build/ sessions

If you've developed for Windows/Windows Phone 8.1, you're familiar with the idea of Universal apps, where most of the code can be shared between the two platforms. Microsoft has doubled down on this idea, and in Windows 10 you'll be able to share basically all your code between these platforms and more (including XBox, Surface Hub, the Internet of Things, and HoloLens). Microsoft is calling this the Universal Windows Platform (UWP) or the Universal App Platform (UAP), but it's just an extension of the WinRT that we all know and love.

So how does this work? Well, one big difference between platforms is screen size - what makes sense on a phone doesn't make sense on a laptop or XBox. To handle this, there are new capabilities in UWP to allow you to layout your page views different depending on the size of the screen your app is running on - see Responsive design 101 for UWP apps. Actually, most of these capabilities were in Windows 8.1 apps (using VisualState's and the like) but Microsoft has cleaned them up and made them easier to use.

Another big difference between platforms is, well, platform-specific APIs. Most APIs are available on all platforms, Your laptop probably doesn't have a hardware camera button, for example. You can use the new ApiInformation class to query for the presence of particular types and such.

Microsoft seems really serious about this - they showed how apps running on the desktop look like phone apps if you resize their windows to be narrow enough, and using Continuum you can plug your phone into a monitor and resize the phone apps to look like desktop apps.

If you have existing apps on Android or iOS you'd like to port to Windows, Microsoft announced some new bridges to UWP - see Project Astoria for Android and Project Islandwood for iOS.

I also got to demo a HoloLens - see my thoughts afterwards.

--

Below are my raw notes from the sessions I went to.

Wed 4-29-2015

Keynote
Docker/Azure
.NET core preview for Linux/Mac
Azure App Services
Cordova tools for VS - Android emulator!
Azure Logic Applications
VS Code for Mac and Linux! And it's free!
Elastic DB Pool
Azure analytic services
- SQL Data Warehouse
Azure Data Lake
Office Web add-ins
- LinkedIn add-in for Outlook
Unifited Office API endpoint (office graph)
Delve integration
Web SDK for Skyle

Universal Windows Apps
- Carrier billing for all Win devices
- 8x increase in purchases!
Subscriptions, video ads
Windows store for business
- highlight consumer apps and private apps
w/i 2-3 years - 1 billion devices running Win10
4 new ways to make Win apps
1. Websites can make live tiles, notifications, Cortana, in-app purchases (after registering with the Win store)
2. .NET/Win32 apps in Win store, full platform capabilities. (these install via AppV, isolated like "regular" Win store aps)
3. Android apps can run on phone - VS can build Java/C++ apps, Nokia X-like layer
4. iOS apps can run on phone! VS can compile Obj-C with a toolkit, full support in VS. Candy Crush Saga already did this!

Win10 - jumplists, app suggestions from Store.
Spotlight has lock screen intelligence (will hint you towards Cortana if you haven't used it, etc.)
Project Spartan's real name is Edge
Has web extensions HTML/JS - basically Chrome (and Firefox??) extensions with a few small changes
Continuum - devices can flex, can plug in phone to a monitor and it "becomes" a PC (only on high end phones)

--

11:30 AM Maximize Your Coding Productivity for Apps, Device, and Services with VS 2015 2-669 @MarkPavWT
Installer - smaller default, smaller updates, still side-by-side compatible with older versios
Sign in with work or school account!
Can "send a smile/frown" for feedback
Notifications - can "always ignore" particular ones (for SDKs you don't care about, etc)
Better high DPI support
Save/apply window layout!
pinch to zoom
Alt+F12 - peek, Ctrl+Alt+- (or Ctrl+Alt++) go back and forth
- now can peek to styles in XAML, change them and get live updates in design view
Breakpoint dialog for condition, etc. is now a peek dialog so it's not modal
Codelens stuff at the bottom of the file for non-code fields
light bulb for quick actions (add using, generate class, etc.)
filtering of error list by category a la Excel
link to error/CA rule in error list
dotted line around renamed token - shows up in light bulb
Ctrl+. = light bulb
Bing developer assistant: http://aka.ms/devassistant - "Search Code Samples"
CodeLens now in Professional

--

2:00 PM What's New in XAML for Universal Windows Apps 2-629
Calendar control is universal
context menus spread out more when tapped with finger (than clicked with mouse)
"Universal" controls in 8.1 move to Win 10, some changes when there were differences between WP and Win
Pivot, ContentDialog, AutoSuggestBox, Maps now universal
Views may be reusable between Win/WP, probably need some tailoring
Responsive on multiple views
SpitView - secondary pane, shown/hidden depending on width (hamburger)
XAML triggers and setters - trigger=AdaptiveTrigger (depending on width or height), whole thing like CSS media queries
RelativePanel - can position elements relative to other elements (like in Android)
Better XAML perf
Compiled Bindings - have to specify type and use {x:Bind} instead of {Bidning}. Resolved at compile time, so get safety, and much faster
Change notifications on all Control properties
PerspectiveTransform3D
Windows can have custom chrome, branding
Drag & Drop
WebView enhancements
Live Visual Tree, can see where properties come from and change

--

3:30 Lap Around .NET 2015 2-614

.NET Framework 4.6 - in place upgrade over 4, 4.5, 4.5.1, 4.5.2
.NET Core 5 - universal apps target this through .NET native?
WPF: perf and reliability for touch, scrolling/virtualization, high DPI, top Connect issues
Diagnostics Timeline tool
XAML debugging tools now work on WPF (like Live Visual Tree)
Roslyn
.NET native used for release builds of Universal apps
UI design in Visual Studio for iOS/Android
ASP.NET 5.0

--

5:00 Debugger Tips and Tricks for .NET Developers with Visual Studio 2015 3-677 Andrew Hall

Diagnostic Tools window - perf, output window, IntelliTrace
Perf Tips - timing info between debugger breaks
UI debugging for XAML
Android emulator
VS hosting process is used to keep references loaded so process "starts up" faster
Start debugging with stepping
Autos window shows return values from stepped-over methods
$ReturnValue in watch window ($ReturnValue1, $ReturnValue2 if multiple methods stepped over)
Step Into Specific in right-click menu
Run to Cursor works in call stack window!!
Step Out
Debugger.Break(), Debugger.IsAttached
Visualizers - new WPF tree visualizer
[DebuggerDisplay] attribute
Peek definitions
For intellisense (or any) popup - hold Ctrl to make it transparent
Restart debugging button
Pin items in popup values, these get saved like breakpoints
- Can take notes in a pin window, float
- When stop debugging, pin window shows last values
- Can export DataTips
Make Object ID - now "$1" (instead of "1#")
Conditional breakpoint, settings in peek
Immediate Window (and Watch Window) can execute lambda expressions!
Edit and Continue for lambdas
Multiple startup projects
Tracepoints
Stop on exceptions - exceptions settings window is faster, has better search
Full screen mode
[Async call] pseudo member of call stack
Show Parameter Values (in call stack)
Tasks window
Parallel Stacks, Threads
Run selected threads to cursor
Parallel Watch - show variable value in all threads
http://aka.ms/diagnosticsblog

--
--

Thu 4-30 Keynote

Used to call Microsoft the "death star". People used to have to use all MS products or no MS products
Muzik "smart sticks" - motion activated drum sticks! (Questlove is involved)
OData - open data feed
Windowed overlapping apps
Universal Windows Platform - can add platform features to Android/iOS
connected cow - pedometers on cows, data sent to Azure, can detect estrus (when they're in heat)
Azure machine learning and Project Oxford (facial, image, speech recognition)
R is #9 popular language, can now run in Azure
DirectX 12, Square Enix demo
Minecraft modding toolkit for Visual Studio (in Java)

--

11:30 AM All That is New in the Windows Store 2-664

640K apps, 9.7B downloads (cumulative), 744K registered devs
One store across Desktop, Phone, XBox, HoloLens
One Dev Center
Win32 apps in the Store - "Project Centennial" (coming soon)
Web apps in the Store - "Westminster"
Android - "Astoria"
iOS - "Islandwood"
New Store also has Music, Movies
New Store is just an app, can update independent of OS
Apps that require telephony won't show up in Desktop store, etc.
Device-optimized are important for Store viewers
Bubling up most "thoughtful" reviews (using machine learning?)
Store on Web at microsoftstore.com - better for SEO
Store affiliate program - 7% commission, generous attribution windows
see http://aka.ms/MicrosoftAffiliates
Business Store for Win10 - by default, all apps opted in
One Dev Center dashboard
Microsoft Advertising is integrated, simplified tax registration
Application flighting - release to users first before global deploy? (I didn't really understand this)
Age Rating now required for all apps
Promote your apps - campaigns, house ads, promo codes
Channels and conversion report
Public and private response to reviews
Auto translated reviews
Subscriptions
Ad mediation for all app types
revenue split:
IAP 55%
Ads 31%
Paid apps 14%

--

2:00 From the Small Screen to the Big Screen: Building Universal Windows App Experiences with XAML 2-679

nested Grids = bad performance, also harder to be adaptive
with RelativePanel, can align edges with panel or other elements
AdaptiveTriggers are in effective pixels
When VisualState changes, state values are unapplied
VisualState setters - more compact than Key Frames, etc.
Feature Detection using ApiInformation class
VisualState triggers can bind to ViewModel (so trigger when a value changes)
Can write custom triggers - inherit from StateTriggerBase, call SetActive() to say whether it is active
Multiple triggers in the same VisualState trigger means ORing them together (if any of them is triggered, the VisualState is triggered)
Triggers can use x:Defer for perf - see xaml_statetriggers example
Can tailor based on device type, maybe you'd want to for custom controls, if ApiInformation isn't enough (but tell them!), for XBox/Surface Hub
To tailor, set up folders with "DeviceFamily-" names, put specific XAML in there

--

3:30 Cortana Extensibility in Universal Windows Apps 2-691

Personal digital assistant
Has extensibility
Deep linking via Voice Commands - now for universal apps (XAML and JS)
- can register what commands the app supports with a VCD (voice command definitions) file
"start game with using Trivia Crack"
RequireAppName element in VCD - can be BeforeOrAfterPhrase (like above) or ExplicitlySpecified (use {builtin:AppName})
Can integrate Voice Commands in a web app that is published to the Store - just need a VCD file link in a meta tag
Completing tasks in Cortana
- can send message in Viber without launching app
background voice command
can tell Cortana to disambiguate
VoiceCommandServiceConnection
examples: check in on foursquare, change a budget
Searching large app-specific datasets works well in Cortana - can use Azure Search on backend

--

5:00 XAML Performance: Techniques for Maximizing Universal Windows App Experiences Built with XAML 3-698

XAML now used in shell app, file explorer, etc. Great performance and productivity
1. Embrace Zen of performance (the fastest code is the one that doesn't run)
2. Define problem (startup is slow, not responsive, etc.) and set a target
3. Convert to universal Win10 app - CPU reductions by 15-30%, memory reductions by 25-45%!
4. Profile - can use Visual Studio 2015 Timeline window
5. Defer startup work
6. Reduce number of XAML elements. Rule of thumb: 1000 elements ~ 1 sec. Can use new Live Visual Tree feature in Visual Studio to see how many elements there are. Get rid of unused styles. Be careful with data templates in repeaters/lists. Can use new x:DeferLoadStrategy for elements that you know won't show up at startup - then do a FindName() call on them to create them. (only should do once?)
7. Use virtualiztion - ListView and GridView do by default. Beware ListView inside of ScrollViewer!
8. Optimize data binding - simplify data templates, use new x:Bind feature for compile-time binding. (also something about x:Phase and ContainerContentChangingEvent?)
9. Optimize your images - large images mostly get optimized, but you can use DecodePixelWidth and DecodePixelHeight if it's a problem.
10. Optimize text rendering - this is 50% faster in Win10, but some options (like CharacterSpacing) can disable it. Can set new IsTextPerformanceVisualizationEnabled to see - text in green is properly optimized, other text is not.

--
--

Friday 5-1

9 AM API Contracts (or How I Learned to Stop Checking OS Versions and Love Feature Detection) 3-733

HW architecture/device characteristics not controlling
- App should run on any device that can satisfy its dependencies
Coding to API intersections results in a combinatorial explosion of intersections, hard to reason about API availability
So: Common universal API, special case APIs that are not universal
Win10: 85% of APIs are common, 96.2% of APIs used by top 1000 apps are common
APIs may be present but not 100% functional (printing on XBox - GetDefaultPrinter() always returns NULL)
Partial functionality means it won't throw exceptions
"Optional" APIs - need way to test for presence (again, not specific for device type - no way to ask for device/version?)
- ApiInformation.IsTypePresent() (same for Method, etc)
- IsApiContractPresent()
API contract is a named and versioned set of APIs (i.e. a "feature") - all or none is implemented
Every WinRT API is in an API contract!
Can query for version, always backwards compatible
"light up" code
OK to reference types that don't exist if it's behind an ApiInformation, special compiler knowledge?
Device Family is implementation of selected set of API contracts (mobile, XBox, etc)
Device Family Extension SDK - device-specific API contracts (better design time experience)
SearchContract, UserProfileContract
Add reference to extension SDK to use types at design time
- if run on other platform, will crash (without using ApiInformation)

--

10:30 .NET Compiler Platform ("Roslyn"): Analyzers and the Rise of Code-Aware Libraries 3-725

Code-aware library: provides guidance on correct use through embedded tooling & operates on user's code in real time
- analyzers, may have fixes, custom Intellisense (in future)
Analyzers - distributed via NuGet or VSIX, used to enforce best practices, may include code fixes
Spiritual successor to FxCop
Called during compilation
C# essentials - small set of analyzers that point you to new C# 6 features, available through Extensions in VS2015
Analyzers can fade out code!
System.Collections.Immutable - new set of immutable collections
CoreFxAnalyzers - checks some ImmutableArray gotchas
.NET Compiler Platform SDK templates - extension for creating analyzers
.NET Compiler Platform Syntax Visualizer
Analyzers can target specific languages
Register actions based on what the compiler sees (code block, symbol, syntax tree)
Can also do things at start and end of compile (gather unused variables)
Symbol action is common - many FxCop languages do
SyntaxKind enum has every kind of syntax element!
SemanticModel has info about types, etc
%LocalAppData%\Microsoft\VisualStudio\14.0 is main hive, can delete stuff from cache
Metadata for Thing is Thing'1 (using backtick, is arity of generic params)

--

12:30 New XAML Tools in Visual Studio 2015 2-697

New XAML language service built on Roslyn, completely decoupled from the designer
Settings->XAML Designer, can turn it off
XAML peek for code or styles - Alt+F12
Regions for XAML -
Blend rewritten for VS 2015
Workspaces (like in VS 2015) also in Blend
Intellisense in Blend, live updates the designer, even when peeking
VS and Blend can automatically reload changed from disk if no changes in editor have been made
Live visual tree inspection and manipulation
Edit and continue is much improved
Can select element via mouse, see it in live visual tree
Can also hover over and see padding/borders highlighted!
Icons in live visual tree elements, can view source
Live property explorer
- strikethrough means property is overridden by something
Can live change styles as well, will apply everywhere
Can reset properties to default
Debugging data binding - can find DataContext in live property explorer!
New profiling tools (like Timeline) works for WPF/Universal, only for Win 8+ today, will work for Win 7+
Memory profiler can track managed, native, or both
- can take snapshots and diff them
Adaptive layout - only for universal apps
For tailored views - shares code behind with "generic" view code behind!
Can pass in XAML to load to InitializeComponent()

--

2:00 Designing and Developing the Ultimate Universal App Experience 2-768

Universal Windows Media Sample (XAML and WinJS)
Hub, Hamburger, Pivots, Master-Details, Tabs
Hub is primary control in this sample. Works horizontal and vertical
12 controls included
Home should be a "hero" screen
Media Transport Control for playing movies
Gallery - intense browsing (big list of movies)
- GridView, combo boxes for filtering
Details - lots of info, final decision maker
- horizontal and vertical ListViews
One binary, decouple from the OS, take advantage of device specific extensions
Responsive/adaptive UI
MediaPlayer control has a lot of functionality


--

See all my Windows Phone development posts. I also send out a monthly-or-so email with news for developers - check out the latest email and sign up here!

I'm planning on writing more posts about Windows Phone development - what would you like to hear about? Reply here, on twitter at @gregstoll, or by email at greg@gregstoll.com.
LinkReply