Silverlight "Top Banana"

Silverlight

Last Monday I delivered one of the keynotes at the MIX conference in Las Vegas,and discussed a new project that I've been spending most of my time working on over the last year: Silverlight.

Silverlight is a cross platform,cross browser .NET plug-in that enables designers and developers to build rich media experiences and RIAs for browsers.  The preview builds we released this week currently support Firefox,Safari and IE browsers on both the Mac and Windows.

To get a sense of the types of rich browser applications you will be able to build using Silverlight,please check out this 7 minute video of the Metaliq "Top Banana" video editor sample application:

The "Top Banana" application was built with C# and runs cross platform on any system where Silverlight is installed.  The total download size of the application (meaning the size of all of the XAML + compiled code when a user types in the URL of the site) is only ~50kb.  We'll be shipping a source-code version of the application as a sample later this summer.

My Keynote

You can watch my entire keynote online here (note: right now the video only shows the slides + demos; they'll be updating a more complete version of the video within a week). 

I was very fortunate to have had some great customers join me on stage to show off some really rich experiences built with Silverlight.  They included: Netflix (showing off a great "movie on demand" video service with social networking support),CBS (showing off user generated video support),Metaliq (showing the above video editor application) and MLB.com (showing off their awesome new Major League Baseball online experience).

During the keynote we also showed how you can use some of the new Expression Studio products (including Design,Blend and the Media Encoder products) to build interactive video player experiences.  I also did some development demos - including ones that showed off building a new Silverlight project using Visual Studio,as well as using the new Ruby support in .NET to iteratively create a Silverlight application within a dynamic language console (which was built entirely using IronPython on Silverlight running in Safari on the Mac).

Silverlight 1.0

We are going to ship the first release of Silverlight this summer.  It is focused on enabling rich media scenarios,and will be a ~1.2MB download.  Some of its features include:

  • Built-in codec support for playing VC-1 and WMV video,and MP3 and WMA audio within a browser.  The VC-1 codec in particular is a big step forward for incorporating media within a web experience - since it supports playing high-quality video up to 720p (high definition).  It is also the same codec format supported in all HD-DVD and Blueray DVD players,and is supported by hundreds of millions of mobile devices,XBOX 360,Windows Media Centers,and Windows Media Players (enabling someone to encode content once and run it on all of these devices + Silverlight unmodified).  This enables you to use a huge library of existing video content and rich editing tools to generate video content with Silverlight. 
  • Silverlight supports the ability to progressively download and play media content from any web-server.  You can point Silverlight at any URL containing video/audio media content,and it will download it and enable you to play it within the browser.  No special server software is required,and Silverlight can work with any web-server (including Apache on Linux).  We'll also be releasing a set of IIS modules that enable useful media control and bandwidth throttling features that you can enable on your server for free.
  • Silverlight also optionally supports built-in media streaming.  This enables you to use a streaming server like Windows Media Server on the backend to stream video/audio (note: Windows Media Server is a free product that runs on Windows Server).  Streaming brings some significant benefits in that: 1) it can improve the end-user's experience when they seek around in a large video stream,and 2) it can dramatically lower your bandwidth costs (most users don't watch entire videos - and so you waste bandwidth if they navigate away before the end of the video with progressive downloading). 

  • Silverlight enables you to create rich UI and animations,and blend vector graphics with HTML to create compelling content experiences.  It supports a Javascript programming model to develop these.  One benefit of this is that it makes it really easy to integrate these experiences within AJAX web-pages (since you can write Javascript code to update both the HTML and XAML elements together). 

  • Silverlight makes it easy to build rich video player interactive experiences.  You can blend together its media capabilities with the vector graphic support to create any type of media playing experience you want.  Silverlight includes the ability to "go full screen" to create a completely immersive experience,as well as to overlay menus/content/controls/text directly on top of running video content (allowing you to enable DVD like experiences).  Silverlight also provides the ability to resize running video on the fly without requiring the video stream to be stopped or restarted.

You can develop Silverlight applications using any standard text editor (no custom tool is required).  Microsoft will also be shipping support for targeting Silverlight 1.0 applications with our Expression Studio suite of products (including rich tool support for media management and video encoding support).  You can download preview CTP builds of Expression Blend and Expression Media Encoder that support Silverlight today from here.

To learn more about the Silverlight 1.0 feature-set,as well as how to start building experiences that target it,I highly recommend watching some of the great "How do I?" videos that have recently been posted on the new www.silverlight.net community site here.

I'd also recommend watching these (free) conference sessions from the MIX conference that cover Silverlight 1.0 and media scenarios:

Silverlight 1.1

At MIX we shipped both a beta version of Silverlight 1.0 (which will ship in final release form this summer),as well as delivered an alpha version of Silverlight 1.1. 

Silverlight 1.1 includes a cross platform version of the .NET Framework,and enables a rich .NET development experience within a browser.  The total download size of the Silverlight 1.1 package (including all of the 1.0 features + CLR + a WPF and .NET FX library API subset + dynamic language support) is ~4MB - and it takes less than 20 seconds to install on a machine.

Some of the Silverlight V1.1 features include:

  • A built-in CLR engine that delivers a super high performance execution environment for the browser.  Silverlight uses the same core CLR engine that we ship with the full .NET Framework today (we build it from a single source tree).  It delivers the same type-system,garbage collector,and JIT code generation engine that your .NET code uses today.  This means that you can write .NET code that can now run in Silverlight,ASP.NET,and a WinForms/WPF Windows application.  It also means you can now execute code within the browser that runs more than 250x faster than interpreted Javascript.
  • Silverlight includes a rich framework library of built-in classes that you can use to develop browser-based applications.  This framework library is a subset of the full .NET Framework class library you use today,and enables you to easily re-use your existing skills and knowledge.  It includes support for collections,generics,IO,threading,globalization,networking,and LINQ. 
  • Silverlight includes support for a WPF UI programming model.  The Silverlight 1.1 Alpha enables you to program your UI with managed code/event handlers,and supports the ability to define and use encapsulated UI controls (built with any managed .NET language).  The first Silverlight Alpha doesn't yet ship with a rich set of built-in UI controls -- we've been busy at work building the core UI infrastructure first. Don't worry,though,a rich set of high-level controls will definitely be included in the future (in the meantime you can download some nice samples of controls here).  WPF for Silverlight will also ultimately ship with support for core WPF constructs like layout managers and data-binding (these features are not yet implemented in the current alpha - but are coming).
  • Silverlight provides a managed HTML DOM API that enables you to program the HTML of a browser using any .NET language (this means you can now wire-up an event handler to an HTML button using C# or VB).  Silverlight also provides the ability to have Javascript code within an HTML page call into .NET methods you expose from within your Silverlight control/application.  Silverlight includes a JSON serializer that supports automatic marshalling of .NET datatypes to/from Javascript (meaning you can have standard browser Javascript code call a C# method within Silverlight,and have the C# method return a .NET collection which is then serialized by Silverlight into a Javascript collection for your browser Javascript to use). 
  • Silverlight doesn't require ASP.NET to be used on the backend web-server (meaning you could use Silverlight with with PHP on Linux if you wanted to).  However,we've naturally added some pretty nice features that enables you to easily integrate Silverlight on the client and ASP.NET on the server together.  Silverlight can use the standard ASP.NET application services (membership,roles,profile,etc),and can call either WCF or ASMX web-services hosted within ASP.NET.  This week we also shipped new ASP.NET server controls that make it easy to host Silverlight controls within ASP.NET pages.

Below is a 22 minute video I recorded that demonstrates how to build a Silverlight application from scratch using Visual Studio and Expression Blend (click here to download the UI controls I used):

You can click on the picture below to download a nice poster that provides an overview of some of the key .NET namespaces and features that are supported with the Silverlight 1.1 alpha today:

I also did a Channel9 interview that you can watch to learn a little more about how the managed programming model works within Silverlight,and how we added the CLR support:

 

May 10th Update: I also did a great podcast with Scott Hanselman that you can download and listen to here.

I'd also recommend watching these (free) conference sessions from the MIX conference that cover Silverlight 1.1 with .NET scenarios:

You can download the source code for the Part1/Part2 samples on Nick's site here.

Dynamic Language Support

At MIX we also announced and shipped the first release of a new .NET library that we call the "Dynamic Language Runtime" (or DLR for short). 

We've been investing a lot in making .NET and the CLR a first-class environment for dynamic languages,and a little over a year ago we formed a dedicated group within my team that has been focused on building better CLR runtime support for dynamic languages as well as delivering excellent .NET implementations of popular dynamic languages.

The new Dynamic Language Runtime (DLR) adds a small set of services to the CLR designed explicitly for dynamic language scenarios.  These include a shared dynamic type system,language hosting model and support to make it easy to generate fast dynamic code.  With these additional features it becomes dramatically easier to build high-quality dynamic language implementations on .NET. 

Importantly the dynamic language implementations built using the new DLR support are not interpreted.  Instead,we use the lightweight-code-generation features added in CLR 2.0 to create in-memory IL that is then JIT'd into native code at runtime (without ever having to save anything to disk).  This can yield much better runtime performance than interpreted code,and the lightweight codegen feature ensures that once we are finished with JIT'd code we can optionally garbage collect it to avoid leaking.  This enables an incredibly slick and powerful dynamic language programming environment,and enables developers to easily program against the full .NET API using dynamic languages.

The DLR - and all of the dynamic languages built on top of it - can be used in cross-platform Silverlight application in the browser,ASP.NET 2.0 applications on the server,and WPF/WinForms applications on the desktop (basically anywhere where the CLR is enabled).

At MIX we announced that Microsoft will be shipping 4 dynamic language implementations of our own for .NET:

  • Python
  • Ruby (new)
  • Javascript
  • Dynamic VB (new)

We will ship the source code of our Python and Ruby implementations,as well as ship the source code for the underlying DLR library on CodePlex (all of the source will ship with full modification rights).  You can download the DLR as well as the Python implementation (known as "IronPython") today from the IronPython codeplex site.  The source code for the Ruby implementation (which we are going to call "IronRuby") will also be published on CodePlex in a few more weeks once it is a little further along.

To learn more about our dynamic language support,I highly recommend watching this 15 minute video by John Lam showing off a dynamic language console built in IronPython and running on Silverlight on the Mac.  It enables developers to interactively develop Silverlight applications (with intellisense support!) in the browser using Ruby,Python,Javascript and VB:

 

I'd also recommend watching this (free) conference session from the MIX conference that covers Silverlight 1.1 with dynamic languages:

Jim Hugunin - who is the chief architect of the DLR - also writes a great blog on dynamic languages with .NET that I recommend subscribing to in order to understand how it works and what you can do with it.

www.Silverlight.net

Last week we launched our latest online community site: http://www.silverlight.net

Like www.asp.net and www.iis.net,we'll be using this new Silverlight site to deliver regular samples and "How-do-I?" videos.  It also provides a forum system for getting help with Silverlight questions.

Click here to subscribe to an RSS feed of the new content we post on the site in the weeks and months ahead.

Summary

Silverlight opens up a ton of opportunities to build significantly richer client experiences that run cross platform and cross browser. 

For .NET developers,it means that you can now write .NET code using any development language (VB,C#,Javascript,Ruby and more) in the web-browser (using Silverlight),web-server (using ASP.NET),in desktop applications,and with mobile devices.  You'll be able to use great Visual Studio developer tools and Expression Studio designer tools to target each of these experiences.

Needless to say,I'm really excited about what the future offers with Silverlight.  We still have work to-do,bugs to fix,and higher level UI controls/features to add - but the core graphics/media/runtime engine we released last week is extremely powerful and delivers a super solid extensible foundation that we'll be building on going forward.

I'll be blogging much more about Silverlight,and how to use it, in the weeks and months ahead.

Hope this helps,

- Scott

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


如何在Silverlight4(XAML)中绑定IsEnabled属性?我试过简单的IsEnabled=“{BindingABC}”,但这不起作用–MenuItem总是启用.提前感谢您的线索!干杯编辑:有趣的是,当设置Mode=TwoWay时,绑定似乎有效.但是,在菜单项上移动鼠标后,将更新上下文菜单的外观.这是异步工作吗?右键
我正在编写我的第一个vb.net应用程序(但我也会在这里标记c#,因为我确信即使是一个c#人也可以使用类似的.net实现来回答这个问题).我申请的简短说明:我的桌面应用程序将仅在win平台上运行,使用vb.net,它是一个简单的网吧管理软件,在服务器上运行服务器gui,在工作站上运行客户端gui,
ProcessFile()是在UIThread上运行还是在单独的线程上运行.如果它在UIThread上,如何将文件请求和ProcessFile()移动到单独的线程?varxClient=newServiceReference1.Service1SoapClient();xClient.Retrieve_File_Completed+=newEventHandler<ServiceReference1.Retrieve_Fi
我从同行那里听说,对sharepoint的了解对职业生涯有益.我们不在办公室使用sharepoint.所以不知道如何开始.这些是我的新手问题>学习共享点值得努力吗?>学习sharepoint的资源在哪里?>我是否应该考虑开发哪些参考项目?感谢您的意见.解决方法:SharePoint以如此积极的方式改变了我的职业
我正在尝试保存一个类我的类对象的集合.我收到一个错误说明:Thecollectiondatacontracttype‘System.Collections.Generic.Listcannotbedeserializedbecauseitdoesnothaveapublicparameterlessconstructor.Addingapublicparameterlessconstructorwillf
我需要根据Silverlight中的某些配置值设置给定控件的Style.我想有可能从两种可用的样式(静态资源)中选择一个控件样式.我试图做一些像:<TextBoxStyle="{BindingABC}"/>哪里publicstringABC{get{return"{StaticResourceMyStyle}";}}不幸的是,这不起作用.你有
我刚买了第一台Android设备,我喜欢它…我也很喜欢你可以创建自己的应用程序并随意分发它们.我已经阅读了一些关于Monodroid的内容,而且显然微软希望将Silverlight放在这些设备上,尽管没有太多关于它们的信息……但是Moonlight呢?如果Monodroid就像Mono……为什么我们需要它呢?相反
我们的ASP.NET网站允许用户执行各种查询,并根据从数据库查询的结果显示网络图(如UML图).目前,我们正在生成一个位图并显示它.但由于我们需要支持允许用户以交互方式显示/隐藏某些块的功能,因此我们计划使用Silverlight来渲染图形.我们还计划在未来添加更多互动.我有两个问题:>ASP
我正在开发一个Silverlight4应用程序,我已经创建了一个自定义的启动画面.乍一看,自定义启动画面运行良好–非常好.几天后,我开始注意到闪屏不再显示,屏幕仍然是空白.这似乎只发生在我打开多个指向同一个应用程序的IE选项卡/窗口时.前几个将加载正常,而以下选项卡/窗口将保持“白
这是我的XAML:<ImageVerticalAlignment="Center"HorizontalAlignment="Center"Source="{BindingInput,Converter={StaticResourceByteArrayToBitmapConverter}}"><Image.Rend
问候,我有一个ItemsControl,我更改了模板,为绑定的ItemsSource中的每个对象显示一个RadioButton.但是ItemsSource可以为空,当它为空时我想显示默认值.像“绑定列表中没有可供您选择的项目”……我想到的一种方法是将ItemsControl.Visibility设置为Collapsed,并将TextBlock.Vsibi
堆栈溢出的第一个问题……我是C#的新手,但在学习它时却非常直接.几分钟前我才看到这个tutorial.通过各种c#技术阅读WCF,WPF,Silverlight,c#和asp.net,这是很多技术都可以用c#来实现.我将创建一个Web应用程序c#.我认为SilverLight似乎是我最好的选择.该应用程序将拥有一个数
我正在使用MVVM(Model-View-ViewModel)模式编写应用程序,并利用MicrosoftP&P团队的Prism和Unity位.我有一个包含项目列表的视图.这些项包含在ViewModel中的ObservableCollection中,View中的列表框是数据绑定的(ViewModel设置为View的DataContext).在ViewModel中,我有一个运行的
我有一个应用程序,它在首次运行时显示免责声明页面.选择“接受”或“拒绝”后,您再也看不到该页面了.但是,当您在第一次运行后按后退键尝试关闭应用程序时,您将返回免责声明页面,然后再次点击该页面,返回主页面,然后再次退出.这仅在应用程序第一次运行时发生,但我希望应用程序在
我正在尝试在SilverlightforWindowsPhone中使用异步HttpWebRequest.一切都很完美,直到我到达我应该打电话的地方privatestaticManualResetEventallDone=newManualResetEvent(false);...request.BeginGetResponse(newAsyncCallback(GetResponseCallback),request);a
嗨,我有两个Writablebitmap,一个来自jpg,另一个来自png,并使用此方法在循环中混合颜色:privatestaticColorMix(Colorfrom,Colorto,floatpercent){floatamountFrom=1.0f-percent;returnColor.FromArgb((byte)(from.A*amountFrom+to.A*perc
我需要开发一个程序,它包含一个图像(png),中心有一个洞.在这个图像下将有一个框架,我想点击图像的透明孔我可以点击框架内的按钮.我不知道是否有一种方法可以通过图像或其他方式传播点击.谢谢你的帮助解决方法:你在图像上将IsHitTestVisible设置为false,然后点击浏览.
我正在研究一个silverlight应用程序,我发现List没有Find扩展方法说,List<Something>list=newList<Something>(something);list.Remove(list.Find(e=>e.id==10));没有查找扩展方法我错过了什么?解决方法:它不包括在内以减小运行时的大小.建议您使用LINQ扩展,例如First
我试图弄清楚如何设置Path元素的Data属性来获得此类型的软角:alttexthttp://i42.tinypic.com/1rzu6w.jpg现在我只有这样的尖角:alttexthttp://i42.tinypic.com/2eeleah.jpg我尝试用椭圆玩,但我无法得到我想要的东西.谢谢最佳答案:路径的段具有IsSmoothJoin属性,默认为false.
问题我有一个在远程服务器上运行的restfulWeb服务.我已经制作了一个使用它的WP7应用程序,所以我知道它有效.我正在将应用程序移植到SilverlightWeb应用程序并遇到问题.我已经包含了代码的简化版本以及引发的错误.EndGetResponse方法抛出错误.随意询问更多信息.我一直在寻找解