O documento fornece uma introdução ao Silverlight, incluindo:
1) O que é Silverlight e como ele permite a criação de aplicações ricas para a web;
2) Os recursos e funcionalidades que o Silverlight oferece, como gráficos vetoriais e animação;
3) Informações sobre como começar a desenvolver aplicações com Silverlight.
4. Material de estudo http://channel9.msdn.com/shows/SilverlightTV/ http://www.silverlight.net/ http://www.microsoft.com/brasil/windows/silverlight/default.mspx
8. O que é? Microsoft Silverlight is a free, cross-browser, cross-platform plug-in that enables rich internet applications and rich media experiences on the Web and Desktop.
9. O que é RIA? São aplicações web que tem a maioria das características de uma aplicação desktop, mas que é entregue via browser, plug-in
14. Microsoft .NET Application PlatformDeliver applications across the UX Continuum Consistent Tools & Application Model Design Develop Deploy Browser Client User Experience Continuum
15. Timeline do SilverlightEm números no Brasil Lançamento do Silverlight em Set 2007 Silverlight 2 - Out 2008 Silverlight 3 - Jul 2009 Silverlight 4 - Mar 2010 Em 3 anos! 54,30% da internet no BRA possuidispositivos com o Silverlight 4 instalado! 11,39% ainda no Silverlight 3 56,31% no Flash 10.1 fonte: www.riastats.com, 14.09.2010
16. O que preciso ter para começar a desenvolver com Silverlight 4? Visual Studio 2010 ouVisual Web Developer Express 2010 Silverlight 4 Tools for Visual Studio 2010 Expression Blend 4 Silverlight 4 toolkit Todosestespassosestãoem http://www.silverlight.net/getstarted
59. DomainService Ele nada mais é do que um serviço WCF encapsulado, eliminando o contrato (que era exposto no WCF por meio de uma interface, e agora é gerado pelo DomainService, ficando invisível para o desenvolvedor) Gera métodos CRUD básicos a partir das entidades, mas permite a customização completa destes métodos Traz todo o poder do WCF, mas elimina as dificuldades Elimina também a necessidade de criar um Service Host, pois já faz isso por default A transmissão de mensagens do cliente para o servidor é feita por BinaryEncoding, o que aumenta a segurança e melhora a performance
81. Permissão elevada para que? Com com integração windows nativa Chamar webservice sem restrições ou necessidade de arquivo de accesspolicy Clipboard, WebCam e Microfone sem perguntar Lendo e escrevendo em pastas do usuário FullScreenmode, sem restrições de teclado e sem pressionar esc para sair
82. Acessando Folders Especiais var music = Directory.EnumerateFiles( Environment.GetFolderPath(Environment.SpecialFolder.MyMusic));
83. Rodando em fullscreen if (Application.Current.HasElevatedPermissions) { Application.Current.Host.Content.IsFullScreen= true; }
RIA (pronounced Ree-a or R.I.A.) stands for Rich Internet Applications. RIA is more of a classification of applications and the definition of what constitutes a Rich Internet Application varies but typically includes an advanced graphics rendering engine for displaying high quality vector graphics and text, some sort of client side storage over and above standard browser cookies, and the ability to serve up high quality audio and video. Silverlight is Microsoft’s implementation of a RIA framework, some other well known entries in this space are Flash/Flex and JavaFX. The code name for Silverlight in development was WPF/e which stood for Windows Presentation Foundation everywhere and Silverlight is considered a subset of the capabilities available in WPF. Silverlight runs client side in the browser but lets you develop your application using your favorite .NET language like C# or VB.NET as well as dynamic languages like IronPython. You can develop Silverlight applications using Visual Studio or Visual Web Developer Express. Visual Web Developer Express is the free version of Visual Studio for building web applications. Another useful tool for Silverlight and WPF development is Microsoft Expression Blend. Expression Blend is targeted at graphics designers and provides them with the type of visual interface that they are used to. Visual Studio and Expression Blend can be used in conjunction easily since they use the same solution and project files allowing for tighter collaboration between developers and designers.For links to downloads of all of the prerequisites for doing Silverlight development you can visit the Get Started page at silverlight.net.
In previous client side technologies like Windows Forms, you would lay out your visuals in the designer and then Visual Studio would generate the code to create these controls and position them properly. You were then told to leave those files alone. This model causes issues every time you want to add support for a new language or create other tools that can work against the same files. To get around these problems and more, Silverlight and WPF have borrowed from the Web style of development and have implemented XAML. XAML stands for eXtensible Application Markup Language and is XML based. One major benefit of XAML is that it lends itself very well to tools and Expression Blend as well as third party tools like Kaxaml by Robby Ingebretsen can work against the same files. You can also edit them by hand in a text editor, something you probably wouldn’t want to do with Windows Forms generated code.We have a sample of some XAML here, there is a Canvas panel with some Ellipses and a Path element and this will render the following visual:(Click to show resulting image)XAML also lends itself well to data binding by providing a simple syntax for describing what data is to be bound. Data binding is an essential concept to Silverlight and WPF and if you take nothing else away from this session I recommend that you get to know and understand how it works.One important key to maintainability of code is to write less code. Less code written means less code to maintain. XAML and data binding when used properly can tremendously reduce the amount of code you need to write and enforce the separation of responsibility between the different layers of your application.
If we have all of these visual elements declared in XAML, how can we access them from code to set properties and do other interaction? This is done through the x:Name attribute. For any element that has an x:Name attribute, a field is added to the class and code is added to the InitializeComponent method to associate the element with this field. This InitializeComponent method is called from the control’s constructor.So we still have a little generated code but it’s much less and it doesn’t prevent the XAML from being edited in Blend or by hand. If you rename or add a name to an element, the generated code will be updated at compile time.Another use for named elements is when using Storyboard animations. Storyboard animations allow you to modify a property value or values over a given period of time. Storyboards require elements to be named so that you can specify which element to perform the Storyboard on.