Getting started with UWP

Getting started with UWP

Show Video

In this episode of the unearthed net show we're gonna be talking to Stefan wick about, what's, been going on inside of the UW plea plan. Hi. Welcome to another episode of the Arnett show my name is celsofo and today I have with me Stefan, wick my. Sister thanks for having me so, Stefan why don't you tell us a little bit about who you are and what exactly it is that you do my, name is Stefan Ric I'm a program, manager lead, on the windows developer platform and my, team is responsible for the app model in Windows 10 gotcha, gotcha so, that includes, like you know you WP and some of these other types of technologies, correct, yeah that's bands like win32, apps winforms. WPF. Electron. You WP. The, whole spectrum of apps on Windows so any of the desktop focused, like applications. Correct. All the desktop types as well as applications. For all our other device, types such as xbox, hololens oh really, okay yeah sure so, you know it's done a developer, I've played, with Windows. Forms before I played, with you, know WPF, before but I haven't played with the UW piece so much so, why don't you tell me a little bit about like how is that different from some of these other technologies and what exactly would I build with that yeah UWP, is the, native, developer, platform on Windows 10 okay with you WP, developers. Can take advantage of, all the device capabilities. On their Windows 10 devices whether it's on PC hololens. Xbox, or any other Windows, 10 device, if. You have background in net. Winforms. WPF you're. Actually, well set up you know to jump, on your WP and be productive they're, there right away and we are continuing. To make it easier, you know to bring your existing, skills your existing, code and your. Existing, applications, over to your WP on Windows 10 gotcha so that means that I could take code that I've written in some of these other. You. Know frameworks, and bring them over and having them run just fine inside of you WP yeah absolutely so with, the for, creators update in 2017. Windows. 10 and the, universal, Windows platform now, supports. Dotnet. Standard 2.00, and, so with that there. Is a. Great. Degree of compatibility for. All your new, it packages. Libraries. That that you have that are compliant, with the dotnet, genre. 2.0, you. Can bring them into your, uwp application, and they would work just fine great and so is this focused primarily to end on end developers or could I use like other languages to develop you WP yeah it's great question you WP and its core is a. Language. And framework, agnostic. Platform. So and. We, welcome, any type, of developer, you. Can build applications. In, C++. Against, Direct X, you. Can build, JavaScript. Application, with HTML. But. Obviously, in. The.net. Space, you know with C sharp or VB, we have strong. Bases. Of, developers. Who build applications. For this platform gotcha. Gotcha so, why don't we take a look really quickly and see how you know we could take take. Advantage of some of those acculturating capable, yeah yeah actually, Before, we jump into Visual Studio let me expand on that a little bit so sure, in addition to kind of the code, sharing and Trump's, off sharing.

Nougat, Packages, or libraries, with, doughnuts down at 2.0, another. Thing that, we've, worked on over. The last year. With. The visual studio, team as well is to bring great support, into, the platform to move your existing. WinForms. In WPF, application. Into, the Windows, 10 app model okay so, this is a. Technology. And and and tooling, that we, call the desktop bridge which. Helps existing, desktop, investments. To. You know go. To the Windows 10 application. Model take, advantage of the, modern deployment, capabilities, and then. Get, access to all the new Windows 10 ap is such. As Windows hello, Cortana. And so on and so forth so let me show this. In Visual Studio here Jeff real quick on a simple. Example. So. This is an app maybe you've seen it before if, if you've done, WPF. It was one of the. Early. Samples, that. We probably shipped, about. 10 years ago with the original, release of WPF, so. This is just a very simple game. Written. In WPF and, now I want to use. Visual, Studio to, bring it forward into. The. Windows 10 app model and. To. Do this I, add. A Windows. Application packaging. Project, to my solution. Let. Me give. This a name. Slide. So. While you're doing that so Windows, application, packaging, project so does that mean that I could use. This type project, types publish, to the Windows Store yeah. Correct. This is this, is one of the, important, benefits. You get from it you know just. By packaging you. Automatically. Take advantage, of the, Windows, 10 deployment. Pipeline. And packaging, format and you're, ready to. Go to in the store you're also ready to go to in. Tune or other. Distribution, mechanism, so got your choice. So. This. Project doesn't have any. Code actually it's just there to kind of you know wrap. Your, existing. Application. Into, a new. Package, so, all I need to do is just reference, the, application, that I want to package I, change. The, startup. Project, in my solution, and. So. Now I can configure, my package a little bit I don't want to do, too much here in the demo just. One thing so we can easily. Find, our application. In the system I just want to give it an. Icon. So. So tell me a little bit about this screen so what's what what are you doing right now yeah so this is the. Configuration, the. App. Manifest, editor. And visual studio that. Exists. For uwp, application, now, I, can, apply it to my WPF, application, as well so, I can specify you. Know what is my icon, Wars my tile look like and things like that I can assign. Capabilities. That are needed to access certain Windows 10 features. I can, declare extensions. If I want to do, background. Tasks, or out services, in my application those are all basically. Entry, points, for new, Windows, 10 features, that are now available in, my WPF, application. So. Now if, I hit f5. My. Same application, obviously, I haven't changed any code and hopefully it runs the exact same way store is.

Here, But. Now we can see, with. We. Have our icon here it. Shows up automatically, in my app list I, can. Pin. It to start and. So. Now it, runs in our modern. Windows 10 app model context, the application, has an identity it has access, to all the Windows 10 features, now and I can continue to. Evolve. It with WPF. Code but, at the same time I can take advantage of all the new uwp. Features, as well so it's a great way to kind of get the best of both worlds the kind. Of more classic, desktop win32. World as well as the new Windows, 10 uwp, world you know without having to rewrite your code or or start from scratch with, your project so I think that's a great story for our longtime desktop. Developers, so it doesn't matter if my application is like you said, Windows. Forms that I've written in Visual Basic you know while ago or whether. I'm using WPF. Using, zamel like I could take my application, as is you know I can add it to this packaging, project and I can make use of things like you said like Cortana and maybe, the location API s and some of the things that we have inside wouldn't happen those are all great examples yeah Windows hello and. So on and so forth ok great um one last thing before we close the demo now. If I right-click, on my project, I actually. See, here. The options, to. Associate. With the Windows Store I can, create app packages. So, those packages can. Go to the store but, also I can choose to just create, the, packages, for my own purposes. For. Example I want, to distribute them in my enterprise via, web share or once. You use them in in tune and not through the Microsoft, Store so those are all options, that are. Available so now my package is complete. And, having a package also means you. Don't need an installer anymore because the package, on Windows, 10 is you installer so, let me show you this. Here's, our package, that, Visual Studio has created, for my WPF. Application. I can, double click on it and now, this is a this. Provides, me with the installer UX. That comes. Natively, with the Windows. 10 OS, in this case you. Know it detects the app is already installed because, I have deployed, it from Visual Studio yep, but. If it weren't installed the user could now hit the install, button and, install. It from him before you click that button I just want to highlight this at the bottom it says a newer version was. Detected, so if, you need to push updates or anything like that like the Installer itself is intelligent, enough to it's, gonna go check the, file share or the Windows Store where yeah that's a good that's, a great point yeah our update, mechanism is actually fairly. Elaborate. We. Are able. To provide. You with differential. Updates so. Consider. You have a game that is you know 10 gigabytes and you, change just one level there was a couple of kilobytes. And you, want to push it update you don't want to push a 5 gigabyte, update to all your customers, you know you only want to send those few kilobytes that are actually changed and our, pipeline, is able, to actually, detect, all the deltas and then only send down the, deltas that's really good and yeah. Those updates can come from the store they, can also come from your. Your, website, if you want to host the installer on your website so that's probably really good for enterprises, could that means that they could control when. The updates happen what actually goes into the updates, yeah missing.

They Can control what devices they go on using things like Active Directory and in tune yeah, exactly exactly and they can save a lot, of network bandwidth, through. The differential, updates gotcha, gotcha the other benefits, also is, disk. Space saving, on the machine. Because, in our, packages. When, you package, for example the. Telluric, control, tweed or some other common framework, you you might have a hundred apps on your system that all package, this is the same source network our. Pipeline, on the, system is smart enough to detect, those duplicates and, only store one, copy of it on the system and, then use hard links from from the others, so. That you can get some substantial. Storage. Savings, on your system so that means that there's some common, storage, area yeah that all of your all the applications, that are packaged like this are going to look to see any any common. Common, files or or frameworks, can, be sharing this way cool, and and this comes for free so the developer, does not need to do extra work anything. Extra okay this sounds pretty good so so. We saw how we could take our existing apps and kind of move them over into this into. This new model so, what, about all the stuff that's been happening in, that UW space uwp. Space you know like what are some of the new features that are coming up and what are some of the things that we can look forward to going forward yeah, I think if. You look at the. Year 2017. We've, had some you know dramatic, improvements, in. UWP. The. The platform first was, released in 2015. Was the first release of Windows 10 and, since, then, year. After year we've had you know dramatic. Improvements. In in, the platform. 2017. One, of the big things that we've, ship, was, the fluent design system. That. You are starting to see now, more, and more apps picking, up in the windows ecosystem both, in, our first party apps as well as in third-party apps you'll. See some of the new. UI. Paradigms. So this is a big. Thing to look. For. Where. We're also you know continue, to improve this, design language in in. This release and and and the next one before. You continue so, so, one of the things that for me as a as a developer, not a designer that always trips me up is when people say design, language, yeah so when we talk about design language, we're really talking about patterns, practices. Some constraints, around, how to build the. User experience and the UI of the application, yeah that's, correct, and there, is that and a, lot of this is, baked. Into the native. Controlled, UWP, so as a. Regular. Developer, you get a lot of these for free we know without actually, being a designer or knowing about all those, parents that's what I using extended, controls like the navigation view all. Of this comes built-in, but, then if you are actually a designer. Or very, UI. Savvy. Developer. You have all, the knobs to, fine-tune, this. And and, customize, this to, the, exact design that you want to accomplish okay. So this is a big one the other a big, one that you. Know is coming. Up is. Continuing. This path that, I've touched on here, with. Combining. You. Know your. Winforms. WPF and. Win32. Applications. With modern, concepts, so. Really. Sharing. UI. You. Know between those both worlds, is, a big focus for a new, feature development, for us so one thing that is, in the current release in the 1803. Release. That's hitting, our TM any day now is the. Ability to, host. The modern, web view control. In your WPF. Or WinForms, application so. This way you get, kind. Of the, more. Advanced and more secure, edge based. HTML. Engine, in your wind. Forms or win32. Application. And along. Those lines we are continuing. To support, more and more of these modern, UI. Concepts, also in, your, existing. Classic. Windows applications. So, I'll use the web, browser control in. Windows. Forms application right. And I think it was some, version of ie I think you can specify the video yeah of the browser that you use so, it's something similar are you using like the actual core browser are you using like certain components, well it is it is based on the H HTML. Engines, so you use, the same. Components. As a CH and have the same you. Know more advanced support that edge provides gotcha. Gotcha gotcha gotcha, alright so why don't we talk a little bit about how, can I actually get started with you, WP like what are some of the things I need to know about you know what, do I need to have installed on my machine or in Visual Studio yeah that's a great question so.

Yeah With Visual Studio 2017. You have everything. Basically. There it comes with the latest. Windows SDK and. You, know all the bits and pieces that you need to get. Started and get, going. If. You start that way what. You see typically is you, know we have a blank, project that, basically. Gives you the hello world you WP you know which is great for people who like to do that and start, being always completely. Empty and clean, kind. Of slate you know however. We've. Also received. A lot of feedback from. Our developers, that they want a richer. Experience to. Get their project, started, and get a lot, of the kind, of boilerplate code, out, of the way and start you, know you know with the function of functionality, coding right away so, to kind of satisfy that need and, the. Windows, team has, delivered. A. Tool. That's called windows, template studio, ok available, in the visual, studio gallery. As as a free, download and, so. I've already installed it here and so, let me show you how. This. Looks like and how this, helps you get started with, UWP, so, I'll. Start a new project and I use the windows, template, studio here so you have a template for template studio exactly, yeah ok and. So. Now this gives, you Calvin a la carte, model. To kind of put together your. Starting, point for an application. So. I want to start I want. An application that uses a navigation, pane it's, kind of a common, pattern these days and I, can. Between, different. Frameworks. Here I just want to do old school code, behind that's, kind, of how, I work best and. Now. I can add some. Content, pages and. To. My application. Because, most applications, will need a settings, page. So, I also wanted, that view here, okay so let me just add a few of these, to. Kind of show. How these, look so, what you're adding are these pages. Are these controls, or these are, yeah, these are pages. Within. The navigation view. Where. Basically. The user can can switch between the, different types, of content, I got sure okay and. I. Also. Can select, a couple of app, model features, that, I want to add to, my application, so I don't need to go to MSDN. And look up hey how do I add a URI scheme well things, like that I can do this here with, just a couple of clicks. So. Let. Me see let, me just add a lifestyle, here so that's a popular, feature, and. And. Now, I'm going to create my project so, this will, take. A couple of seconds whatever happening, here is now. The. Code gets generated for. My project, so we're, not just giving you libraries. For these, features. We're, actually, making. This your code so that you can then go into it and, you. Can edit it and you can you know can customize, it as things customize, it gotcha and so, this all becomes your code the. Windows, template, studio itself, also is open, source so, you'll find it on github you, can, look. At all all the. Things we're, doing there and you know also active, contribute so I think that was an interesting point you brought up because when you brought it up and. There, was a section at the bottom that said frameworks, and I, saw there was prism there was AVM lights and so, those are some really popular community, driven frameworks. Right yeah that's right so I'm guessing if I decided, to create my own MVM mvvm, framework, or something, like that I could, go onto the github repo I could clone a report, make a contribution, and then. Anybody. That installs the template see we're just there just see my, absolutely. So that's that, that's a possibility, so we have you. Know a couple of different contributors, in, the template, studio today you. Know we have the telluric control, suite for example as part of it and and some, of the popular mvvm frameworks, as well gotcha so. The generation is done, so, we see, here. In the solution Explorer, here's all our code the markup and the code behind. So. Let me launch this real, quick so. You get an idea of what, you get so this this, could be your first uwp, app and right, right, out of the gate then you already have a pretty, good starting, point here. With. You. Know a bunch of the boilerplate code.

Out Of the way so. Here. Are the different pages that that, we've added so. Here's my web view, for. Example. Use. A media, player. In, some video album from build I guess last year right master. Detailed. So all this is kind of hooked up already. So you can replace. The the sample, content with, your own easily. We have chart chart controls, here so this is a contribution, from, telluric. For. Example, so the telluric chart controls, okay, yeah this is the settings page most apps need this here. For. Example you can switch to the darker theme, for your application, you get all all that for free so. This gives you a really solid starting, point and you can have fun coding right away you don't need to, study. Like. Hours and hours to figure out how do I you know change the theme of my app or things like that can, we take a look at one of the the, sam'l files really quickly yeah sure sure for example. The. Webview page that should be pretty easy. So. Yeah. A bunch of styles here. Probably, not too interesting, and the, actual Zemo down. Here, so, what I wanted to ask was so, if I'm, again, if I've been built, as armor and, forms. Up before if I built a, WPF. Not before like I'm using sam'l, right is this the same sam'l is that similar it's it's, very similar it is not the same sam'l. Though it's like a different, version you will have to learn the the uwp, dialect, got a yeah. Yeah, WPF. Uwp. And xamarin each, have their own dialect. The, learning curve is pretty easy, there, right, but but but pretty much like you you know you selected a couple option and now we have a lot of code that we could look out we can expect we can customize, yeah if you wanted to build our own you. WP application, yeah another great thing about the template studio, also is that you. Know you, can at any point, in time you can go back to. It, and. Actually add to. It if NATO use color I, actually forgot, to add my. My. Data grid so now. You can add it here and. So. It it now shows you hey this is the code I. Will be adding to your solution, this is like an F on there is kind of a kind of a spirit side there for, all the different files that are, changed you, can. Review that and accept. It and. So. Now. It's added, to your project and if. I run it again I have one additional page, in, my, project. With. The, telluric. Data, grid control, cool, that's also. Quick. So. While it's loading up why don't we talk a little bit about your. It is how, do we you know always talk a little bit about the getting started experience in, terms of like we're can I get documentation, where, do I go to actually, see, like. The tools that I need to get started with yeah, so the main entry point is, def, dot windows.com. If. You go there from there you you'll pretty much fine find, everything. Linked. To. Templates, to do the link to the documentation. We. Have a ton of samples, out there on github, there they are linked from there. There. Are lots of, you. Know more. More, detailed, kind. Of scenarios. And in case study. Documents, and things like that great well you know I feel like there's so much more that we could talk about but I won't, we have you come back on another time we can dig into some more of the details yeah yeah we should. Great. Well again, this is another episode of dawnette show we just learned all the good stuff about the uwp platform. You.

2018-04-24 09:40

Show Video

Comments:

I love UWP

Great starting point to get into the UWP world!

UWP is worthless because windows has exactly one application platform (and xbox for games). No phones or HoloLens anymore.

Too bad the 32 bit compiler being used in the fall creators update and later runs out of ram when importing multiple nuget packages. Absolutely ridiculous, I would not suggest using UWP ever unless you have to.

Excellent and really useful. Thanks a lot

Using an Apple computer on a Windows channel... :D

So how many flavors of XAML are there? WPF, UWP, Xamarin's, and the old Silver Light? I'm counting 4 and I'm sure I'm missing some.

Will it be possible to port old applications to UWP?

Other news