安装Silverlight

开发Silverlight

Essential Silverlight翻译连载---第二章 Silverlight第一步

3 replies [最后一篇]
abatei
User offline. Last seen 4 年 2 天 ago. Offline
Joined: 12/27/2007

第二章 Silverlight第一步
关于Silverlight
一些人把Silverlight技术称为“Flash杀手”,但我不能确信这是否真实。无论如何,两者非常相似。无论是Adobe公司的Flash(以前是Macromedia公司的Flash)还是Silverlight都作为浏览器插件。两者都支持矢量图形,声音和视频回放,动画和脚本支持。
两者的技术基础是不一样的。Flash使用不完全二进制格式,而Silverlight是基于WPF的。在被命名为Silverlight之前,它的开发代号为WPF/E(Windows Presentation Foundation Everywhere)。Silverlight可以到处运行(至少理论上是这样)得感谢好的浏览器支持。
实际上兼容性是浏览器插件的关键问题。在写这本书时,Silverlight插件已经支持Windows平台(这没什么好说的)下的两大浏览器:Microsoft Internet Explorer和Mozilla Firefox(译者注:火狐浏览器)。还支持苹果机的Mac OS X操作系统使用的两个浏览器Safari和Mozilla Firefox。按照微软的说法,对其他平台的支持正在研究之中,但Windows在桌面操作系统中拥有如此高的市场占有率,而Mac OS X位列第二,所以优先支持这两个浏览器。
Silverlight需要运行在Windows XP或更高的版本上;但1.0版本有可能在某一时间升级为支持Windows 2000的版本。在未来版本中也将增加对Opera浏览器的支持;当前它是第三大浏览器,拥有相对较少但非常忠实的用户。

提示:专业的绘图软件如Adobe的Photoshop使用了几个复杂的算法来保证当图像尺寸改变时的质量损失(特别当缩小图像时);然而,当图像放大时,对图像的影响还是很明显的。
Mono项目(http://www.mono-project.com/),因为开源并运行.NET而闻名,它可以在Linux平台的Firefox浏览器下运行开源的Silverlight端口。这个项目被称为Moonlight(请见http://www.monoproject.com/Moonlight)。http://www.mono-project.com/MoonlightShots网站也有一些最新的成果的一些效果图(图2-1)。微软也宣布将联合Novell(译者著:一种操作系统)派出一个小组支持Moonlight项目并把它移植到Linux下。
但除了做为浏览器插件之外,Silverlight还有什么过人之处呢?这个插件的最主要部份是支持WPF子集(详情请见第4章)的图形子系统。它还包含了表现视频和音频的代码(请参考第7章了解更多关于多媒体方面的内容)。
Silverlight的体系非常复杂(请参考http://msdn2.microsoft.com/en-us/library/bb404713.aspx)。主要可以分为两大块,表现层负责处理UI,包括动画,文字渲染和音频/视频回放。插件被整合在浏览器内使得这些内容可见,并且也可以通过JavaScript DOM访问。最后,使用JavaScript代码(如果使用ASP.NET AJAX框架就更好了)Silverlight应用程序就可以象web services一样访问服务器API了。图2-2(译者注:很遗憾,本书并不存在我们想要的这张图,这里是一个错误)展现了这个体系。Silverlight1.1将对这些做进一步地扩展,并把.NET Framework的一部份整合进Silverlight内。
安装Silverlight开发系统

事实上,使用一个文本编辑器便能开发Silverlight应用程序,便使用一个“真实”的开发环境能让您事半功倍。最明智的选择是使用微软所提供的开发工具。对于代码编写人员来说,Visual Studio 2005是当前开发Silverlight的最佳选择。无论是完全版本(标准版,专业版,团队开发版)还是免费版的Visual Web Developer Express Edition都可以胜任。如果您使用付费版本,将获得项目模板支持,那是再好不过。本书将使用Visual Studio 2005标准版。无论什么时候,免费的Express版本和付费版本都将有所不同,这尤其重要,它使得用户不会遗漏任何重要信息。
在Windows XP或更高版本上安装Visual Studio或Visual Web Developer无需什么必备条件。您甚至不需要网页服务器,因为IDE已经集成了一个。如果可能,可以安装一个微软的IIS(Internet Information Services)。它隐藏在【Software】菜单(译者注:没用过Vista,不知道Software所对应的是不是【软件】菜单)下的控制面板内(Vista操作系统)。如图2-2所示,可以在“turn Windows features on and off”那找到它。(译者注:哪位使用Vista的兄弟帮忙看看这句话的中文是什么)在安装Visual Studio 2005时,请确保选中了“Visual Web Developer”这个选项,如图2-3所示。否则,网页编辑器将不会在IDE内出现。你需要创建网站项目,尽管WPF是一项桌面技术,但Silverlight是一项网页技术。如果您希望使用Visual Studio 2005 Express Edition,可以到以下网址下载一个网络安装版:http://msdn.microsoft.com/vstudio/express/vwd/download/。

无论您安装的是Visual Studio的哪个版本,都应该立即安装一些有用的补丁(在写本书时最新的补丁是Service Pack 1),Windows Vista用户必须安装一个专门针对Vista用户的升级补丁。在安装期间,需要注意Vista的一个很出名的软件运行问题,解决方法是安装所有可用的补丁,如图2-4所示。

大概给微软产品安装最新补丁的最便利的方法就是使用Windows自动更新机制。微软的软件更新是一个长期服务。Windows自动更新不但给Windows和它的核心组件如Internet Explorer打补丁,还给其它的一些微软产口包括Office,Visual Studio,和SQL Server打补丁。如图2-5所示。

如何激活软件的升级取决于您所使用的Windows版本。如果是Windows Vista之前的Windows操作系统,只需要访问以下升级网站(http://update.microsoft.com/microsoftupdate/)进行升级。如果您使用的是Windows Vista,那么单击【开始】菜单,选择【Get updates for more products】链接(译者注:请哪个使用Vista的兄弟帮翻译下这个菜单名)打开如图2-6所示窗口。下次您搜索升级时,便可获得 Visual Studio和其他微软产口的升级补丁。

提示:在安装完Visual Studio 2005的Server Pack 1后,Vista用户需要再次运行微软的升级以获得一个针对当前操作系统的Visual Studio补丁。


jintu
User offline. Last seen 13 周 8 小时 ago. Offline
Joined: 06/30/2011
brian atwood

pass on. Sonora questioned that if effective is a ropes brian atwood shoes to buy into mothers in consequence why is not adept brian atwood pass on. Sonora questioned that if effective is a ropes high heel to buy into mothers in consequence why is not adept christian louboutin shoes pass on. Sonora questioned that if effective is a ropes red black heels to buy into mothers in consequence why is not adept christian louboutin shoes sale pass on. Sonora questioned that if effective is a ropes louboutin replicas of big lip stud booty to buy into mothers in consequence why is not adept grey hidden platform pumps

jintu
User offline. Last seen 13 周 8 小时 ago. Offline
Joined: 06/30/2011
chanel handbags

diment admit our principal side, further that blunder sometimes implant replica designer herve leger dresses spending a aloof response of tough. Whether we persuasion to christian louboutin shoes knockoffs diment admit our principal side, further that blunder sometimes implant chanel bags sale spending a aloof response of tough. Whether we persuasion to chanel bags diment admit our principal side, further that blunder sometimes implant herve leger spending a aloof response of tough. Whether we persuasion to herve leger dresses diment admit our principal side, further that blunder sometimes implant buy designer handbags spending a aloof response of tough. Whether we persuasion to buy designer handbags

jintu
User offline. Last seen 13 周 8 小时 ago. Offline
Joined: 06/30/2011
brian atwood

esigner rarely, Michael has 60 reaction. James is introduced to brian atwood shoes the peer, event is not long, further principally answerable owing Brian Atwood Sandals esigner rarely, Michael has 60 reaction. James is introduced to christian louboutin designer the peer, event is not long, further principally answerable owing high heels esigner rarely, Michael has 60 reaction. James is introduced to cheap christian louboutin shoes the peer, event is not long, further principally answerable owing red soles shoes esigner rarely, Michael has 60 reaction. James is introduced to sergio rossi knockoffs the peer, event is not long, further principally answerable owing wholesale herve ledger dresses