الأربعاء، 20 أبريل 2011

Welcome to Silverlight 4

Silverlight is a Web platform designed for media and rich Internet
applications (RIAs). Popular Web sites use Silverlight to view video
in some of the biggest online streaming events. For example, during the 2008 Olympics, http://www.nbcolympics.com received 50 million unique visitors, resulting in 1.3 billion page views and 70 million video streams.
Other popular Web sites also use Silverlight to play video, such as
http://www.netflix.com, a variety of sporting events, television stations,and video hosting sites.
Many Web sites have also written RIAs with Silverlight, including email
applications, business applications, social networking applications, mashup creation tools, casual games, high quality image viewers, ads, and a variety of other Internet applications.

You can find some example applications at http://www.silverlight.net/showcase, as shown in Figure 1.1.

Silverlight consists of a runtime that users can download to view Silverlight content on their computer as well as a set of tools for creating that content, such as Visual Studio, Expression Blend, Expression Design, Expression Media Encoder, and Deep Zoom Composer. You can use Visual Studio for writing and debugging Silverlight code. You can use Expression Blend and Expression Design for creating graphics and animation. You can use Expression Media Encoder for encoding and creating sample video players. You can use Deep Zoom Composer for creating Web viewable versions of large images.

Silverlight includes a version of the .NET Common Language Runtime
(CLR) to let you write code in .NET languages such as C# or Visual Basic.The Silverlight features include vector graphics, text, animation, layout, video playback, audio playback, data access, and controls for your media and rich Internet applications.
In addition to running Silverlight content inside the Web browser, you
can install a Silverlight 4 application on your computer and run it when not connected to a network.



Example Silverlight sites shown at
http://silverlight.net/showcase


Silverlight Principles
With Silverlight, you can write applications that
• Deploy through a Web browser.
• Run in a secure environment.
• Are visually appealing media and rich Internet applications.
• Are easy to develop and maintain.
• Run on a variety of operating systems and Web browsers.

Obtaining and Running Silverlight
As does Adobe Flash, Silverlight runs as a plug-in within the browser and needs to be installed the first time any Silverlight application is run. A plug-in is a piece of software that is not part of the Web browser but can be added to it to run additional applications. When a user visits a Web site that needs the Silverlight plug-in, the Web browser will prompt the user to install it.
After the plug-in is installed, visiting any site that hosts a Silverlight application causes Silverlight to start up in the browser seamlessly. The plug-in itself is
around 4MB, and in addition to the Silverlight runtime (which is responsible for running the Silverlight application), the application itself needs to be downloaded from the site that hosts the application. Modern popular browsers such as Internet Explorer, Firefox, Safari, and Chrome support Silverlight while running on Microsoft’s Windows operating systems 2003, XP, Vista, and 7) or on Apple’s Mac OS X. Recently, Silverlight has also been rewritten to run on browsers in Linux-based operating systems. With Silverlight 4, the application can also run as a stand-alone application — that is, it can be run outside the browser.




Silverlight prerequisites and installation for web application development
1.Install a version of Silverlight:
·        Silverlight 4.0 for Windows
·        Silverlight 4.0 for Mac
Silverlight Tools for Visual Studio 2010: This is a package that adds the necessary items to Visual Studio to teach it how to handle Silverlight projects.
The package includes a number of items, some of which are listed below:
Silverlight 4 Runtime: Required on every computer that wishes to view a Silverlight-enabled web application.
Silverlight 4 Software Development Kit: This SDK is a collection of samples, Silverlight QuickStarts, documentation, and controls that are used to develop Silverlight applications.
Silverlight Project Templates for Visual Studio 2010: This adds the Silverlight templates in Visual Studio. As an example, it will add the template that enables you to create a Silverlight project from the “Add New Project” in Visual Studio.

To be downloaded at http://www.galasoft.ch/sl4-tools
          (Silverlight 4 Tools for Visual Studio 2010).
2.Install Expression Blend 2 May Preview* (25.5 MB)



Overview
Microsoft has released Microsoft Expression Blend 2. It is an editor to develop very rich silverlight-based applications and also we can export content from Microsoft Expression Design in a format that can be used in Silverlight-based applications that we create in Expression Blend 2 Preview. Microsoft has introduced Microsoft® Expression® Media Encoder. It is useful when we are working with video.



3.Install Visual Studio 2010 for developing Silverlight applications.

New features of Silverligth 4

§  Hardware Access
o   Web Cam
o   Microphone

§  Improved data binding
o   Better bindind support in Visual Studio 2010
o   Better bindind support in Expression Blend 4
§  New Events
o   Rigth mouse button
o   Mouse wheel
§  Support for drawing vector graphic images and doing 3-D perspective Transformations
§  Support for creating storyboards and animations
§  A full suite of controls, such as text boxes and buttons, and support for creating your own controls
§  Layout management support, which allows you to lay out controls in a variety of ways Styling of controls, which allows the properties of your controls to be standardized and reused Skinning, which allows you to change the complete appearance of controls
§  Multi-touch support, which allows you to use hand gestures and touch interactions on hardware that supports it
§  Support for hooking on to webcams and microphones to share video and audio with others
§  Support for media streaming, allowing audio and video to be streamed ccording to the optimal bit rate based on the network speed
§  The ability to create Silverlight applications to be run on mobile phones that are part of the Windows Phone 7 series.
§  Manged Extensiblity Framework (MEF)
§  Com interop
o   Excel , Outlook , etc
o   Shell


Adobe Flash
This is the obvious contender, the one technology that is most often mentioned when Silverlight is compared to other frameworks. Adobe Flash is installed on a huge number of computers and various operating systems. It is also a well-known environment, and many companies develop applications in Flash for the Web.
As mentioned when Silverlight 2 was released, Flash is not going to be killed by Silverlight, and in fact this was never Microsoft’s intention. Rather, Silverlight provides a welcomed alternative to firms who do not want to invest in two very different technologies for the desktop and the Web.
In that sense, Silverlight is a great choice because it is developed with the same languages and the same tools as the well-known Windows Forms, ASP.NET, and WPF.
Silverlight and Flash are coexisting on the Web, sometimes even in the same web pages.Thankfully, this is easy to realize, and there is even a possibility to let these mixed applications communicate together through JavaScript. This allows a gradual modification of existing websites from Flash to Silverlight, without breaking the functionalities or forcing the users to adapt to large-scale changes. We actually saw some striking examples of this at Microsoft itself, with existing Flash applications being gradually converted to Silverlight without disruptions.
Silverlight Toolkit

The Silverlight Toolkit is a collection of controls and utilities for Silverlight that supplements what is already present in the core Silverlight libraries. The Silverlight Toolkit includes additional controls (such as charts) that are very useful but aren’t used daily by applications. If Microsoft had included these controls in the main Silverlight runtime application, it would have become unwieldy and too big to download in a reasonable amount of time. By separating this set of controls from the main application, Microsoft left it up to developers to decide which parts to include in their application. In addition, it allows Microsoft to make frequent updates to the toolkit outside the release cycle of Silverlight

WCF RIA Services
When you start creating large applications that have multiple screens and that connect to a database to read and write data, you need to design your application well. As part of this design, you need to divide your application into multiple layers, or tiers. An application is typically divided into the following tiers:
§  Presentation: Focuses on the user interface
§  Application: Focuses on application logic, such as validating user input or performing calculations
§  Data: Focuses on how to read and write the data used by the application
WCF RIA Services is a framework for creating multitier applications in Silverlight, incorporating data operations such as authentication, authorization,data validation, and other essential services across the different tiers. It integrates with ASP.NET and provides ways to share code among the different tiers.

0 التعليقات: