Moonlight and you
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Gaita, Andreia
Moonlight is an open source implementation of Microsoft Silverlight for Unix systems, developed by Novell. It not only allows existing Silverlight applications to run on Linux, you can also create your own on Linux and MacOS using the MonoDevelop IDE. In this hands-on presentation we'll take a look at what Moonlight provides now, what it can do for developers, what tools are there, and how you can have a lot of fun with it.
 I hope this works. So welcome to the Moonlight Talk. Let me just find my stuff, hopefully. This is good. Okay. Hi, we're late. Hopefully I won't take too much of your time. I'm not going to do that many slides. I have four slides because I want to do a hands-on demo presentation. We haven't done one of those for a while, I think. So you've heard about Moonlight all day long, Silverlight and Moonlight, so I'm not going to tell you what it is. I'm going to show you what it is. The talk is entitled Moonlight and You because I want to show what you need to work with Moonlight, you, the user, you, the developer. What tools we have right now to build applications, what works, what doesn't, what features are available and basically I'm going to show you what I had to do to get the demos working today so you can do the same with your applications basically. So you know what Moonlight is, open source implementation of Silverlight. This is the goals that are stated on the site. They're still the same. I find the third one, the fifth one is funny, but the third one is the one I like best because one thing that we had from day one was pretty much support for desktop applications because when we did Moonlight, it was just a quick step to run it on the desktop because we don't actually need the browser for anything. It's a GTK backend. The browser is there to provide us a window and events, but we can do that too, so it's not that complicated. So usually the good part about that is that most applications that work on Silverlight, the code can be just compiled for the desktop and run on the desktop with no changes, very few changes basically. And the more you go into Silverlight versions, the less problems you have because the less you're depending on JavaScript and web technologies. Originally Moonlight 1.0 was completely JavaScript and runtime, no C-sharp, no anything. But as we plugged in the good parts, which is the C-sharp and the runtime and everything, you cut down on the web technologies a bit. So it's easy to do the translation between one and the other. So I like that goal. I like the other ones too. That one is my favorite. This is how Silverlight and Moonlight works. There's a lot of layers, a lot of structure, a lot of everything, but this is what happens. The runtime is sitting in the middle. It's C++. You don't see it. It's there. You're doing stuff. You as an application developer. You as the user of the APIs. You're doing stuff in C-sharp, which is talking to C++ via a lot of calls. If you're running on the browser, there's two-way communication between all these layers, basically. So when you load the plugin, the browser loads the plugin, initializes C++, eventually ends up in C-sharp, which ends up in C++ back again, tells you something in JavaScript. And then you can do calls from one end to the other. And it's transparent for you. So this is basically what you care about are the two endpoints. And the middle is what we care about. We hopefully care about it enough so it doesn't crash or anything. That's our business. So I'm going to start off with demos. Kill this thing. So, okay. So I don't know if all of you are here for the monodvelop talk. This is monodvelop. I'm running it locally. It's the latest build, but it's the same thing that's released. Before we had Moonlight integration on monodvelop, we had to do everything on the command line. I'll show you how to do that in a bit, because there are important tools on the command line that you will need to know, because we don't have designers and GUI tools for everything. But we do have now integration on monodvelop. So basically, because that's what I do on monodvelop, it's a monolight application project. So I don't know if this is activated already on the latest version of, where's Luis? It's not on yet by default. It's a type project on monodvelop. Right, right, right, right. Because we're, well, yeah. Anyway, we're talking about leading ads, basically, because Moonlight 3 is just coming out, and we're just starting to have all these tools available. So what do you want, basically? Let's just go quickly through a little tiny, small sample, Hello World, usually. This is, it has a purpose, believe me. So I'm just going to change this. Okay. For those lazy view, well, you probably haven't used Visual Studio, any of you, but this is pretty close, basically. This is the Hello World that Michael Hudson, I think, the template originally is still there. Sorry, Hello Moon, not Hello World. This is your basic XAML description of a Moonlight application. It's just totally empty. If we are talking about doing Moonlight applications like this, you don't have to even leave monodvelop to run and debug, because it's all integrated right now, which is basically what I'm going to show you. So we are debugging right now a Moonlight application. It doesn't do anything. But if I step in, you can see that it's jumped into this page, which is the initialization that's separate. This is a basic, basic template of a Moonlight application. So this is the entry point. Monodvelop, Moonlight, as soon as we release everything and all the distros have it, that's what you're going to get. Debugging applications, hopefully we'll get a designer really, really nice and really, really soon, so you don't even have to have XAML written down. But this stuff is starting to work. So this is a generated file. What Solarlight Moonlight does is it takes your XAML description file and generates, sort of generates all the hookup code. So you don't have to basically, which is just basically hooking up all the objects that are described on XAML. So there's the grid layout route, which means layout route is going to be hooked up here, so you can access it later. So this is a Hello World. This is, by the way, you can't see it because the screen is too small, but we're going to see it in a second. This is running, as soon as it shows, on Firefox 3.6. So Monodvelop launched Firefox, connected to Debugger, which is asynchronous. And then, so you're debugging a plugin inside Firefox on Monodvelop visually, which is a good step forward, I think. It's a good one. So Miguel was complaining earlier that we don't have Chrome support. We do have Firefox support up to 3.7. I think it's working fully. We do have Chrome support. And just because he was complaining, sorry, just because he was complaining, I'm going to quickly work. I'm going to fake it, basically. And while I do this... Okay. Well, this is running. You're not going to see it. You're going to see it in a bit. I'm typing, but you're going to see it. As soon as this goes... Yes, now you're going to see it. Okay. So while I'm building a separate branch just for Chrome... Oh, come on. Sorry. So what happens is, with the Chrome support, Chrome is a bug. Chrome has this nice feature of running plugins out of process so they don't interfere with the browser. Basically if they blow up, the browser doesn't blow up. So it just so happens that you can do a plugin with one line code that freezes the browser. And that one line code happens to be in moonlight. So it freezes. So it does work. It just kind of doesn't. So it just moves that line to another place that doesn't freeze Chrome. It just so happens that Firefox doesn't work with this one. So we either have one or the other. You can't have both. For now, I'm working on it. Hopefully it's going to be fixed very soon. So anyway, for now Chrome support is full except for video. So we don't have video because video requires a backend that we need to do. Firefox has quirks that we support, but then obviously Firefox bridge for video doesn't work on Chrome. So we need to do that. But everything else basically works on Chrome, which is what I'm going to show you in a bit as soon as this ends. OK, so this is a little script that just setups a bunch of LD library path, path, and C include path, and whatever that's sitting on my home. This is really useful because if you don't want to blow up your environment, it's kind of handy because moonlight runs on the 2.6 branch of Mono, not trunk. So if you want to start playing around with it, then you have Mono installed in the system, and then you have to have a separate Mono, you're going to blow up your system. So I'm going to put this on when we have the slides on the web. I'm going to put the script on somewhere. So if you want to play with it, you can just pull it and not blow up your system. So we were showing a Hello World. So this is what MonoDevelop created, the two ZAMLs, two CS. MonoDevelop dumps everything on the bin directory. So I'm going to go there. This is what it runs, DHTML page. I can actually do this because it's just a simple page that Firefox is going to work. This is the same thing that MonoDevelop does. It's just to prove that Chrome works. Chrome works. Oops, you can't see it. Sorry. Theme, Chrome. There. Okay. Now let's just switch branches again. Oops. Okay. It's not going to be very... Okay. So now, while that's doing that, so we were looking at the application on MonoDevelop, right? There's tools on command line to do the same thing that MonoDevelop does, basically. So we have this Hello World, and what MonoDevelop essentially does is run mzip. mzip is a frontend. Basically drives the compiler and the resource packer and everything to create a zip file, which is basically a zip file. Also the HTML and packs every resources in the assemblies. So it's the frontend to build moonlight applications, basically. So if I run mzip here, it's smart, and it knows that everything XAML.cs is going to be compiled. Any DLLs that are yours and that you reference, basically, are going to be included. Everything that's in there is going to be included. So and it's cute. It creates the DLLs and everything. It's messy. MonoDevelop is cleaner, and it creates a HTML page somewhere around here, which is usually the same name as the directory where you are. So this guy's done. So basically it's the same thing. You just run still in the same place, our Hello World. Now the trick is for desktop apps, it's very complicated. You do desktop. And then you have another tool called Mopen, which does the same thing as Firefox, which is basically create a TK window and then initialize the monoruntime and moonlight and everything, and basically do the window. So what you do here is called the ZAP file, not the HTML file, obviously, because the ZAP file contains everything that the application has. And then you have a TK window that is running exactly the same code as Firefox. If you don't want window decorations, Vashti will give you what we call a desklet that we haven't touched in a really, really long while, which is basically... Yeah, I fixed it that far in the morning. It still works. So basically, window with no decorations, which allows you to now do something cute like... We're going to go to somewhere else because I love opening windows. There are some very old samples of desklets, like three years old, maybe, something like that. This is still... Poor thing. This one is... Wait. That's... Oh, I know. I know. I know why. I know why. The launcher has some problem or something. This is old code that needs to be reviewed. There's some problems with the GTK side. This code hasn't been touched in, what, two or three years, maybe? So we need to review it, basically. But this is a really, really simple clock application that has no code, basically. It's just all description and animation. We can look at the code very quickly. But it's running on desktop, and it's totally transparent and needs fixing in the drawing. There's no window decoration because it's run with dash D. So you can basically do... Little applets, right? Just to show you the difference. That's what dash D does. This is the original, the transparency code, has a few bugs. So this is a Moonlight desktop app, which could technically be compiled to run on a browser. There's no difference. The HTML file doesn't do anything except load the plugin. So this application is very simple. Let's just open with something big so we can see. There's no highlighting, but it's basically just simple. This is SVG. For those of you who don't know XAML but know SVG, Inkscape can export XAML. So if you want to draw nice ellipses, nice guis, anything, you go to Inkscape, you do whatever you want to just load your SCGs if you have them. And then it just exports XAML, and it'll be done. And you don't have to have any sort of driving code for this because here you have the canvas on top, and this will get drawn immediately. It's just a XAML file. Literally. You don't even have to technically compile it. You could just load it. The interpreter will just parse it and draw it for you. You just want to compile it because there's C sharp code that can manipulate these objects and then do nice stuff. The difference between desktop applications and moonlight applications is that moonlight is very restricted in what it can do. So the APIs that you have access to are very restricted. You only have one thread, which is a theme today, which is not exactly true, but essentially you have one main thread. Everything that you do, any calls, HTTP calls, anything that you want to do to the outside is completely asynchronous. You cannot do synchronous calls to anything outside your app to make sure the main thread is always going no matter what. So you can't just freeze the plug-in and probably kill the browser along with it. And also there's a very limited subset of calls that you can make. On the other hand, the same application, exactly the same application, compile for desktop, has no restrictions because it's the desktop. It's yours. It's an application. You can do whatever you want with it. This is basically an interface on XAML, which is, for those who know, SVG, SVG, vectorial drawing with animations, with video, which I'm going to demo in a bit. With everything you really want to do, that you can draw on Inkscape, basically. You can dump the work on your designers on whatever. You can draw pretty nice vectorial things. And then you can drive it with C-sharp, with full access to everything that.NET has to offer in terms of database access, in terms of everything, basically, that the runtime can do. So I like it. I'm not biased, anyway. You must like it because you're here. Anyway, so that's, let's see. Let's go back to R. Uh-huh. It's here. Yes. So, yes, this is built. So, MZAP for compiling. Normal or desktop applications. M-Open for running desktop applications. Anything else is via the browser. So I don't forget. We've seen Hello World. So let's look at some demos, basically. What do we have available? Okay. I don't remember if I built this for the desktop or not. Sorry. It's too big. My mouse is not that good. Okay. So, okay. So this is something I just, I was messing around with just to show you different types of, so these are standard Moonlight controls, so light controls, dot-downbox and everything. So basically this is an animation demo for built-in animations, basically. So different types of how to animate an object. So basically all the animations are done with storyboards and then you just define animations. How long do you want them to take and what type of using functions that they're going to take. So how they'll delay or they'll accelerate, what type of stuff that's going to happen on the animations. And this is basically the demo, a bunch of storyboards that animate objects. It doesn't do much else, but it's running, again, if you compile this on ModerDevelop or just MZAP, you can run this on the browser. It's exactly the same code, no change. So that's animations. You can imagine taking the decorations out, picking these objects and doing animations on your applications, whatever they are. So if you want to, I don't know, Twitter clients with nice free-dins, whatever, you can do that. What else? So next, something that's working again. That wasn't. I want white space. So this is more detailed. This is the SilverEye 3 toolkit. So it's basically a demo of a bunch of different controls that we basically have built in. You can use them. They're in the API. This is SilverEye 3. We are in the preview. So not all of this is supported. Basically we have all the controls, but not everything is working 100%. I don't know. Yeah, well, anyway. So the font is really small. So this is, can you see it? These are all the several different controls. Some of them are special, they come in the toolkit themselves, others are built in, but they're here, they work, they're running on Moonlight. So I think this one was cute, basically. So this is fully, oh, okay. I'm going to demo the video, but I'm not going to demo the Microsoft Media Pack. I purposely removed it because we've been doing demos with the Media Pack. Five? Okay, I'm going to do the demo next. We've been doing demos with the Media Pack and we know the Media Pack works. I have FFMPEG here. So we can see Moonlight for you guys that are like FFMPEG rules. You can see Moonlight doing FFMPEG. This is handy for debugging your own applications if it shows, if it doesn't blow up the browser. Oh, when it's like huge, right? Yeah, I forgot this one is huge. These are features that are not available on serverlight, but we have them because we like them. So basically you can see the entire tree of stuff that is done here because this is entire GUI is done on serverlight, so it's pretty big. One final demo. We're building up to it. Works. Okay. One final. Oh. I'm sure I have it running somewhere else again. Really? What's the syntax? Okay. So finally, this is a pure C-Shop serverlight 3 feature which just got working. David Riefman is working on this and we just got it working two or three days ago. Well, in 64 bits anyway, 32 bits was working before, but I'm running 64 bits, so I wanted it to work too. So basically, serverlight 3 has pixel shaders which take advantage of nice hardware that you have to dump stuff that you really want to be fast and isn't at the moment. So we are implementing this. And I don't think I have updated driver, so it's probably going to be slow on the video because this is an NVIDIA and I didn't update my VDPOW or whatever. But yeah, you can't hear it. This is running with FFMPEG on the back as the engine, not with the binaries. For what it's worth, I tried both on this machine. It's the same thing. Same speeds. They're both working perfectly. So you can tell that it takes a bit of a hit as soon as pixel shaders go in. But then again, this code, it lands a week ago, so it's really not that optimized. And this is happening live on runtime. You can apply all these effects at runtime because everything is described with XAML and that's easy to just, you can just create XAML on the fly and just dump it. You can do all of this on runtime. And you can do all of this in your applications desktop or on the web basically. So you have everything available. And well, that's all the time I have for it, I think. I don't know, with Q&A. Questions? Kill me. Has anyone already tried an order of pixel shader for any day? Has anyone already tried running it on a graphic driver which is called Guardian? I think so. I don't know. I think I'm the only one running NVIDIA at the moment. Am I? Well, I'm sure. Actually, I think on NVIDIA you have NVIDIA, which is already used, Guardian, really. You're running really well. There's like, the drivers are too new. There's stuff that's not supported yet. So they, we want trunk or whatever. I'm sure I'm not running them. I'm sure I'm not running them because when I build stuff, half of it complained that I wasn't high enough. So I'm sure this is slower than it should be. But yes, I think Riven is trying them with decent hardware. So. What about users who've got disabilities, side issues, etc. With GTK apps, they've got accessibility stuff to work with. What happens when you've got the moon? Moonlight, there's, the accessibility team is on the side, putting all the accessibility APIs on Moonlight to make sure everything goes on par. They actually blow us up a lot because it's accessibility. It just pushes the limits a bit. So they're, while we're working, they're working on the side to plug everything in, basically. Exactly. They showed up from time to time with huge patches of accessibility to plug into our stuff. So, yes. What about non-Linux and non-X86? We, well, 64-bit problems is more of the discode which Riven was working on 32 bits and we needed a few tweaks. So we support all Linux and Unixi platforms in general and all major platforms. Non, I don't know what else, I'm not currently aware of what else we support. Well, yeah, we did support, yeah, Mac is, yes, exactly. It's just, we have, our focus is Linux and Unix at the moment. But there's support for there, but it's, there's not lack of hands, basically.
 I hope this works.  So welcome to the Moonlight Talk.  Let me just find my stuff, hopefully.  This is good.  Okay.  Hi, we're late.  Hopefully I won't take too much of your time.  I'm not going to do that many slides.  I have four slides because I want to do a hands-on demo presentation.  We haven't done one of those for a while, I think.  So you've heard about Moonlight all day long, Silverlight and Moonlight, so I'm not going  to tell you what it is.  I'm going to show you what it is.  The talk is entitled Moonlight and You because I want to show what you need to work with  Moonlight, you, the user, you, the developer.  What tools we have right now to build applications, what works, what doesn't, what features are  available and basically I'm going to show you what I had to do to get the demos working  today so you can do the same with your applications basically.  So you know what Moonlight is, open source implementation of Silverlight.  This is the goals that are stated on the site.  They're still the same.  I find the third one, the fifth one is funny, but the third one is the one I like best because  one thing that we had from day one was pretty much support for desktop applications because  when we did Moonlight, it was just a quick step to run it on the desktop because we don't  actually need the browser for anything.  It's a GTK backend.  The browser is there to provide us a window and events, but we can do that too, so it's  not that complicated.  So usually the good part about that is that most applications that work on Silverlight,  the code can be just compiled for the desktop and run on the desktop with no changes, very  few changes basically.  And the more you go into Silverlight versions, the less problems you have because the less  you're depending on JavaScript and web technologies.  Originally Moonlight 1.0 was completely JavaScript and runtime, no C-sharp, no anything.  But as we plugged in the good parts, which is the C-sharp and the runtime and everything,  you cut down on the web technologies a bit.  So it's easy to do the translation between one and the other.  So I like that goal.  I like the other ones too.  That one is my favorite.  This is how Silverlight and Moonlight works.  There's a lot of layers, a lot of structure, a lot of everything, but this is what happens.  The runtime is sitting in the middle.  It's C++.  You don't see it.  It's there.  You're doing stuff.  You as an application developer.  You as the user of the APIs.  You're doing stuff in C-sharp, which is talking to C++ via a lot of calls.  If you're running on the browser, there's two-way communication between all these layers, basically.  So when you load the plugin, the browser loads the plugin, initializes C++, eventually ends  up in C-sharp, which ends up in C++ back again, tells you something in JavaScript.  And then you can do calls from one end to the other.  And it's transparent for you.  So this is basically what you care about are the two endpoints.  And the middle is what we care about.  We hopefully care about it enough so it doesn't crash or anything.  That's our business.  So I'm going to start off with demos.  Kill this thing.  So, okay.  So I don't know if all of you are here for the monodvelop talk.  This is monodvelop.  I'm running it locally.  It's the latest build, but it's the same thing that's released.  Before we had Moonlight integration on monodvelop, we had to do everything on the command line.  I'll show you how to do that in a bit, because there are important tools on the command line  that you will need to know, because we don't have designers and GUI tools for everything.  But we do have now integration on monodvelop.  So basically, because that's what I do on monodvelop, it's a monolight application project.  So I don't know if this is activated already on the latest version of, where's Luis?  It's not on yet by default.  It's a type project on monodvelop.  Right, right, right, right.  Because we're, well, yeah.  Anyway, we're talking about leading ads, basically, because Moonlight 3 is just coming out, and  we're just starting to have all these tools available.  So what do you want, basically?  Let's just go quickly through a little tiny, small sample, Hello World, usually.  This is, it has a purpose, believe me.  So I'm just going to change this.  Okay.  For those lazy view, well, you probably haven't used Visual Studio, any of you, but this is  pretty close, basically.  This is the Hello World that Michael Hudson, I think, the template originally is still  there.  Sorry, Hello Moon, not Hello World.  This is your basic XAML description of a Moonlight application.  It's just totally empty.  If we are talking about doing Moonlight applications like this, you don't have to even leave monodvelop  to run and debug, because it's all integrated right now, which is basically what I'm going  to show you.  So we are debugging right now a Moonlight application.  It doesn't do anything.  But if I step in, you can see that it's jumped into this page, which is the initialization  that's separate.  This is a basic, basic template of a Moonlight application.  So this is the entry point.  Monodvelop, Moonlight, as soon as we release everything and all the distros have it, that's  what you're going to get.  Debugging applications, hopefully we'll get a designer really, really nice and really,  really soon, so you don't even have to have XAML written down.  But this stuff is starting to work.  So this is a generated file.  What Solarlight Moonlight does is it takes your XAML description file and generates,  sort of generates all the hookup code.  So you don't have to basically, which is just basically hooking up all the objects that  are described on XAML.  So there's the grid layout route, which means layout route is going to be hooked up here,  so you can access it later.  So this is a Hello World.  This is, by the way, you can't see it because the screen is too small, but we're going to  see it in a second.  This is running, as soon as it shows, on Firefox 3.6.  So Monodvelop launched Firefox, connected to Debugger, which is asynchronous.  And then, so you're debugging a plugin inside Firefox on Monodvelop visually, which is a  good step forward, I think.  It's a good one.  So Miguel was complaining earlier that we don't have Chrome support.  We do have Firefox support up to 3.7.  I think it's working fully.  We do have Chrome support.  And just because he was complaining, sorry, just because he was complaining, I'm going  to quickly work.  I'm going to fake it, basically.  And while I do this...  Okay.  Well, this is running.  You're not going to see it.  You're going to see it in a bit.  I'm typing, but you're going to see it.  As soon as this goes...  Yes, now you're going to see it.  Okay.  So while I'm building a separate branch just for Chrome...  Oh, come on.  Sorry.  So what happens is, with the Chrome support, Chrome is a bug.  Chrome has this nice feature of running plugins out of process so they don't interfere with  the browser.  Basically if they blow up, the browser doesn't blow up.  So it just so happens that you can do a plugin with one line code that freezes the browser.  And that one line code happens to be in moonlight.  So it freezes.  So it does work.  It just kind of doesn't.  So it just moves that line to another place that doesn't freeze Chrome.  It just so happens that Firefox doesn't work with this one.  So we either have one or the other.  You can't have both.  For now, I'm working on it.  Hopefully it's going to be fixed very soon.  So anyway, for now Chrome support is full except for video.  So we don't have video because video requires a backend that we need to do.  Firefox has quirks that we support, but then obviously Firefox bridge for video doesn't  work on Chrome.  So we need to do that.  But everything else basically works on Chrome, which is what I'm going to show you in a bit  as soon as this ends.  OK, so this is a little script that just setups a bunch of LD library path, path, and  C include path, and whatever that's sitting on my home.  This is really useful because if you don't want to blow up your environment, it's kind  of handy because moonlight runs on the 2.6 branch of Mono, not trunk.  So if you want to start playing around with it, then you have Mono installed in the system,  and then you have to have a separate Mono, you're going to blow up your system.  So I'm going to put this on when we have the slides on the web.  I'm going to put the script on somewhere.  So if you want to play with it, you can just pull it and not blow up your system.  So we were showing a Hello World.  So this is what MonoDevelop created, the two ZAMLs, two CS.  MonoDevelop dumps everything on the bin directory.  So I'm going to go there.  This is what it runs, DHTML page.  I can actually do this because it's just a simple page that Firefox is going to work.  This is the same thing that MonoDevelop does.  It's just to prove that Chrome works.  Chrome works.  Oops, you can't see it.  Sorry.  Theme, Chrome.  There.  Okay.  Now let's just switch branches again.  Oops.  Okay.  It's not going to be very...  Okay.  So now, while that's doing that, so we were looking at the application on MonoDevelop,  right?  There's tools on command line to do the same thing that MonoDevelop does, basically.  So we have this Hello World, and what MonoDevelop essentially does is run mzip.  mzip is a frontend.  Basically drives the compiler and the resource packer and everything to create a zip file,  which is basically a zip file.  Also the HTML and packs every resources in the assemblies.  So it's the frontend to build moonlight applications, basically.  So if I run mzip here, it's smart, and it knows that everything XAML.cs is going to  be compiled.  Any DLLs that are yours and that you reference, basically, are going to be included.  Everything that's in there is going to be included.  So and it's cute.  It creates the DLLs and everything.  It's messy.  MonoDevelop is cleaner, and it creates a HTML page somewhere around here, which is usually  the same name as the directory where you are.  So this guy's done.  So basically it's the same thing.  You just run still in the same place, our Hello World.  Now the trick is for desktop apps, it's very complicated.  You do desktop.  And then you have another tool called Mopen, which does the same thing as Firefox, which  is basically create a TK window and then initialize the monoruntime and moonlight and everything,  and basically do the window.  So what you do here is called the ZAP file, not the HTML file, obviously, because the  ZAP file contains everything that the application has.  And then you have a TK window that is running exactly the same code as Firefox.  If you don't want window decorations, Vashti will give you what we call a desklet that  we haven't touched in a really, really long while, which is basically...  Yeah, I fixed it that far in the morning.  It still works.  So basically, window with no decorations, which allows you to now do something cute like...  We're going to go to somewhere else because I love opening windows.  There are some very old samples of desklets, like three years old, maybe, something like  that.  This is still...  Poor thing.  This one is...  Wait.  That's...  Oh, I know.  I know.  I know why.  I know why.  The launcher has some problem or something.  This is old code that needs to be reviewed.  There's some problems with the GTK side.  This code hasn't been touched in, what, two or three years, maybe?  So we need to review it, basically.  But this is a really, really simple clock application that has no code, basically.  It's just all description and animation.  We can look at the code very quickly.  But it's running on desktop, and it's totally transparent and needs fixing in the drawing.  There's no window decoration because it's run with dash D. So you can basically do...  Little applets, right?  Just to show you the difference.  That's what dash D does.  This is the original, the transparency code, has a few bugs.  So this is a Moonlight desktop app, which could technically be compiled to run on a browser.  There's no difference.  The HTML file doesn't do anything except load the plugin.  So this application is very simple.  Let's just open with something big so we can see.  There's no highlighting, but it's basically just simple.  This is SVG.  For those of you who don't know XAML but know SVG, Inkscape can export XAML.  So if you want to draw nice ellipses, nice guis, anything, you go to Inkscape, you do  whatever you want to just load your SCGs if you have them.  And then it just exports XAML, and it'll be done.  And you don't have to have any sort of driving code for this because here you have the canvas  on top, and this will get drawn immediately.  It's just a XAML file.  Literally.  You don't even have to technically compile it.  You could just load it.  The interpreter will just parse it and draw it for you.  You just want to compile it because there's C sharp code that can manipulate these objects  and then do nice stuff.  The difference between desktop applications and moonlight applications is that moonlight  is very restricted in what it can do.  So the APIs that you have access to are very restricted.  You only have one thread, which is a theme today, which is not exactly true, but essentially  you have one main thread.  Everything that you do, any calls, HTTP calls, anything that you want to do to the outside  is completely asynchronous.  You cannot do synchronous calls to anything outside your app to make sure the main thread  is always going no matter what.  So you can't just freeze the plug-in and probably kill the browser along with it.  And also there's a very limited subset of calls that you can make.  On the other hand, the same application, exactly the same application, compile for desktop,  has no restrictions because it's the desktop.  It's yours.  It's an application.  You can do whatever you want with it.  This is basically an interface on XAML, which is, for those who know, SVG, SVG, vectorial  drawing with animations, with video, which I'm going to demo in a bit.  With everything you really want to do, that you can draw on Inkscape, basically.  You can dump the work on your designers on whatever.  You can draw pretty nice vectorial things.  And then you can drive it with C-sharp, with full access to everything that.NET has to  offer in terms of database access, in terms of everything, basically, that the runtime  can do.  So I like it.  I'm not biased, anyway.  You must like it because you're here.  Anyway, so that's, let's see.  Let's go back to R.  Uh-huh.  It's here.  Yes.  So, yes, this is built.  So, MZAP for compiling.  Normal or desktop applications.  M-Open for running desktop applications.  Anything else is via the browser.  So I don't forget.  We've seen Hello World.  So let's look at some demos, basically.  What do we have available?  Okay.  I don't remember if I built this for the desktop or not.  Sorry.  It's too big.  My mouse is not that good.  Okay.  So, okay.  So this is something I just, I was messing around with just to show you different types  of, so these are standard Moonlight controls, so light controls, dot-downbox and everything.  So basically this is an animation demo for built-in animations, basically.  So different types of how to animate an object.  So basically all the animations are done with storyboards and then you just define animations.  How long do you want them to take and what type of using functions that they're going  to take.  So how they'll delay or they'll accelerate, what type of stuff that's going to happen  on the animations.  And this is basically the demo, a bunch of storyboards that animate objects.  It doesn't do much else, but it's running, again, if you compile this on ModerDevelop  or just MZAP, you can run this on the browser.  It's exactly the same code, no change.  So that's animations.  You can imagine taking the decorations out, picking these objects and doing animations  on your applications, whatever they are.  So if you want to, I don't know, Twitter clients with nice free-dins, whatever, you can do  that.  What else?  So next, something that's working again.  That wasn't.  I want white space.  So this is more detailed.  This is the SilverEye 3 toolkit.  So it's basically a demo of a bunch of different controls that we basically have built in.  You can use them.  They're in the API.  This is SilverEye 3.  We are in the preview.  So not all of this is supported.  Basically we have all the controls, but not everything is working 100%.  I don't know.  Yeah, well, anyway.  So the font is really small.  So this is, can you see it?  These are all the several different controls.  Some of them are special, they come in the toolkit themselves, others are built in, but  they're here, they work, they're running on Moonlight.  So I think this one was cute, basically.  So this is fully, oh, okay.  I'm going to demo the video, but I'm not going to demo the Microsoft Media Pack.  I purposely removed it because we've been doing demos with the Media Pack.  Five?  Okay, I'm going to do the demo next.  We've been doing demos with the Media Pack and we know the Media Pack works.  I have FFMPEG here.  So we can see Moonlight for you guys that are like FFMPEG rules.  You can see Moonlight doing FFMPEG.  This is handy for debugging your own applications if it shows, if it doesn't blow up the browser.  Oh, when it's like huge, right?  Yeah, I forgot this one is huge.  These are features that are not available on serverlight, but we have them because we  like them.  So basically you can see the entire tree of stuff that is done here because this is  entire GUI is done on serverlight, so it's pretty big.  One final demo.  We're building up to it.  Works.  Okay.  One final.  Oh.  I'm sure I have it running somewhere else again.  Really?  What's the syntax?  Okay.  So finally, this is a pure C-Shop serverlight 3 feature which just got working.  David Riefman is working on this and we just got it working two or three days ago.  Well, in 64 bits anyway, 32 bits was working before, but I'm running 64 bits, so I wanted  it to work too.  So basically, serverlight 3 has pixel shaders which take advantage of nice hardware that  you have to dump stuff that you really want to be fast and isn't at the moment.  So we are implementing this.  And I don't think I have updated driver, so it's probably going to be slow on the video  because this is an NVIDIA and I didn't update my VDPOW or whatever.  But yeah, you can't hear it.  This is running with FFMPEG on the back as the engine, not with the binaries.  For what it's worth, I tried both on this machine.  It's the same thing.  Same speeds.  They're both working perfectly.  So you can tell that it takes a bit of a hit as soon as pixel shaders go in.  But then again, this code, it lands a week ago, so it's really not that optimized.  And this is happening live on runtime.  You can apply all these effects at runtime because everything is described with XAML  and that's easy to just, you can just create XAML on the fly and just dump it.  You can do all of this on runtime.  And you can do all of this in your applications desktop or on the web basically.  So you have everything available.  And well, that's all the time I have for it, I think.  I don't know, with Q&A.  Questions?  Kill me.  Has anyone already tried an order of pixel shader for any day?  Has anyone already tried running it on a graphic driver which is called Guardian?  I think so.  I don't know.  I think I'm the only one running NVIDIA at the moment.  Am I?  Well, I'm sure.  Actually, I think on NVIDIA you have NVIDIA, which is already used, Guardian, really.  You're running really well.  There's like, the drivers are too new.  There's stuff that's not supported yet.  So they, we want trunk or whatever.  I'm sure I'm not running them.  I'm sure I'm not running them because when I build stuff, half of it complained that  I wasn't high enough.  So I'm sure this is slower than it should be.  But yes, I think Riven is trying them with decent hardware.  So.  What about users who've got disabilities, side issues, etc.  With GTK apps, they've got accessibility stuff to work with.  What happens when you've got the moon?  Moonlight, there's, the accessibility team is on the side, putting all the accessibility  APIs on Moonlight to make sure everything goes on par.  They actually blow us up a lot because it's accessibility.  It just pushes the limits a bit.  So they're, while we're working, they're working on the side to plug everything in, basically.  Exactly.  They showed up from time to time with huge patches of accessibility to plug into our stuff.  So, yes.  What about non-Linux and non-X86?  We, well, 64-bit problems is more of the discode which Riven was working on 32 bits and we  needed a few tweaks.  So we support all Linux and Unixi platforms in general and all major platforms.  Non, I don't know what else, I'm not currently aware of what else we support.  Well, yeah, we did support, yeah, Mac is, yes, exactly.  It's just, we have, our focus is Linux and Unix at the moment.  But there's support for there, but it's, there's not lack of hands, basically.
Moonlight_and_you_dT7en6G4l3M_0_7919.png Moonlight_and_you_dT7en6G4l3M_7920_9179.png Moonlight_and_you_dT7en6G4l3M_9180_11951.png Moonlight_and_you_dT7en6G4l3M_11952_12059.png Moonlight_and_you_dT7en6G4l3M_12060_12995.png Moonlight_and_you_dT7en6G4l3M_12996_15059.png Moonlight_and_you_dT7en6G4l3M_15060_15407.png Moonlight_and_you_dT7en6G4l3M_15408_15455.png Moonlight_and_you_dT7en6G4l3M_15456_15731.png Moonlight_and_you_dT7en6G4l3M_15732_16511.png Moonlight_and_you_dT7en6G4l3M_16512_16991.png Moonlight_and_you_dT7en6G4l3M_16992_17327.png Moonlight_and_you_dT7en6G4l3M_17328_17423.png Moonlight_and_you_dT7en6G4l3M_17424_20711.png Moonlight_and_you_dT7en6G4l3M_20712_27515.png Moonlight_and_you_dT7en6G4l3M_27516_27767.png Moonlight_and_you_dT7en6G4l3M_27768_27863.png Moonlight_and_you_dT7en6G4l3M_27864_27995.png Moonlight_and_you_dT7en6G4l3M_27996_28055.png Moonlight_and_you_dT7en6G4l3M_28056_28415.png Moonlight_and_you_dT7en6G4l3M_28416_28463.png Moonlight_and_you_dT7en6G4l3M_28464_29207.png Moonlight_and_you_dT7en6G4l3M_29208_34523.png Moonlight_and_you_dT7en6G4l3M_34524_34595.png Moonlight_and_you_dT7en6G4l3M_34596_34883.png Moonlight_and_you_dT7en6G4l3M_34884_35051.png Moonlight_and_you_dT7en6G4l3M_35052_35111.png Moonlight_and_you_dT7en6G4l3M_35112_35159.png Moonlight_and_you_dT7en6G4l3M_35160_35207.png Moonlight_and_you_dT7en6G4l3M_35208_39011.png Moonlight_and_you_dT7en6G4l3M_39012_39407.png Moonlight_and_you_dT7en6G4l3M_39408_40715.png Moonlight_and_you_dT7en6G4l3M_40716_41051.png Moonlight_and_you_dT7en6G4l3M_41052_41207.png Moonlight_and_you_dT7en6G4l3M_41208_41279.png Moonlight_and_you_dT7en6G4l3M_41280_41699.png Moonlight_and_you_dT7en6G4l3M_41700_41831.png Moonlight_and_you_dT7en6G4l3M_41832_42479.png Moonlight_and_you_dT7en6G4l3M_42480_42527.png Moonlight_and_you_dT7en6G4l3M_42528_43727.png Moonlight_and_you_dT7en6G4l3M_43728_43847.png Moonlight_and_you_dT7en6G4l3M_43848_45791.png Moonlight_and_you_dT7en6G4l3M_45792_46475.png Moonlight_and_you_dT7en6G4l3M_46476_47567.png Moonlight_and_you_dT7en6G4l3M_47568_48743.png Moonlight_and_you_dT7en6G4l3M_48744_49079.png Moonlight_and_you_dT7en6G4l3M_49080_49139.png Moonlight_and_you_dT7en6G4l3M_49140_49235.png Moonlight_and_you_dT7en6G4l3M_49236_50327.png