First Code Parts of Prism 2.0

  As I previously posted, Prism 2.0 is shaping up and some of the new Code Parts are already available on CodePlex. Of course this is only a small part but it brings good news like:

  • Multi-targeting quick starts, that explains the structure that a Prism 2.0 project will have in order to be Multi-target for WPF and Silverlight, and in this case is a real state solution.
  • Multi-targeting Visual Studio Templates, in order to be possible to create the Prism 2.0 projects.
  • Project Linker Tool, that provides a guidance on how to structure an application in a way that is possible to link it to other applications in order to make it Multi-targeted.

    Read more about it in the Readme file that defines this first drop, and also David Hill’s blog post about this subject.

Silverlight 2.0 Release Candidate made Available

   One more step towards the RTM version of Silverlight 2.0 was made today with the announcement of the Release Candidate by Scott Guthrie. With this version we can expect several changes, where the major part are not critical since there was already a Go-Live licence for the Beta 2 version, but some of them will impact in important points of the technology. In order to check what has to be changed from one version to another, you can check this blog post by Mike Snow and this document that explains the changes. This will be important in order to start updating the solutions and preparing it for the final version.

    Some of the enhancements are:

  • New Controls
    • PasswordBox – Like a textbox but only with the capabilities and security elements that are needed to work as passwordbox.
    • ProgressBar – Allow us to give feedback to the customer about the status of the work that’s being done
    • ComboBox
  • Security
    • Some Constructors are now made internal
  • Animations
    • Solve some issues with changing properties in active animations

   We are on the road for the new RTM version and so this is great to check if all issues that were present on previous releases are solved.

    Don’t forget to read the elements provided in this post for more informations.

Virtual Earth version 6.2 Release

    There’s already online the new 6.2 release of the Virtual Earth that has some awesome new features that will be briefly described here:

    • First release of the Virtual Earth Web Services, that will allow developers to use Virtual Earth features by using only the Web Services. Can be thought as an alternative to the Map Point Web Service. The features made available by the Web Service are:
      • Imagery Metadata – Information about the map tiles that are served.
      • Geocoding and Reverse Geocoding – Allows developers to request the Geocode based on an address
      • Static Map Generation – Provides the capability of developing our own map because it provides access to all the tiles and data used by Virtual Earth.
      • Search – Allows developers to provide access to search option about where and what  on Virtual Earth.
      • Routing – Provides access to calculate routes by using the Service
      • One-click Directions – Provides one-click directions without having to provide the start point.
    • International Reverse Geocoding – this was an important because it improved the geocoding not only in the US but also in other countries.

      • Rooftop geocoding for something like 85 million locations
      • Improved the near matched – The interest point search in the nearby areas were improved.
    • Maps for Mobile Devices – by using the Virtual Earth Web Services will be easy to develop high performance maps applications for mobile devices.
    • Localized Maps – A major improvement because now we can see the Map information in several languages.
    • Localized Directions – A major improvement because now we can see the directions in several languages. Something like 15 languages.
    • Imagery Metadata – Important because now we can have information about when the information was updated.
    • 3D Import capabilities – Improvements in the process of custom 3D elements import.
    • 3D Imagery – Higher quality in 3D views.
    • Pushpin clustering – Allows to change the pushpin clustering to custom ones.
    • Weather Integration – The 3D view now has the weather information, by having clouds in case of a cloudy weather, and without clouds in case of sunny sky. Doesn’t support for now: Rain, Snow.

    For more information check the official announcement from Mark Brown and Chris Pendleton, and also a Technical WebCast by Mark Brown.

Live WebCast: Discovering Silverlight 2.0 – Developing RIA Solutions – Advanced Topics (Part 2 of 5)

    As I wrote in the previous post this post will be part of a Portuguese WebCasts Cycle  and in this case the topic is:

            “Developing RIA Solutions – Advanced Topics”

    This session had the goal to provide a deep dive on the Silverlight Controls, Browser Integration, Isolated Storage and Adaptive Streaming

    1. Controls

               This is one of the most talked issued about Silverlight version 1.0 since in this version there were lacking several important controls and that in this version 2.0 are placed by default also with the source code made available. They allow 2 ways to change their looks and they are:

      • Styling
        • Changing the looks by using only the available properties
      • Skinning
        • Changing all the elements that represent the control appearance giving a complete creative freedom by change also the elements that are part of the internal of the control.

               These controls are made by two parts, that are:

      • Logic
        • User Controls: public partial class MyUserControl : User Control
        • Custom Controls: public class MyCustomControl : Control
      • Visual
        • User Controls: <User Control> (Ficheiro XAML)
        • Custom Controls: <ControlTemplate> (Don’t have any associated XAML and for that reason the layout will be place whenever the control is used by specifying the ControlTemplate.

               The controls are also composed by Parts, States and Transitions and their purposes are:

      • Create the structure of the control
      • Make a clear separation between the Logic and Visual parts of the control
      • Parts
        • Elements that are part of the Template
      • States 
        • Different ways the controls can look
        • Uses VisualState and VisualStateGroup classes from VisualStateManager
      • Transitions
        • The way that this change is made is by changing from one State to another
        • Uses the VisualTransition class from VisualStateManager

    2. Browser Integration

               The purpose is to allow a perfect interaction between the Silverlight application and the Browser, by considering it as being a first class citizen, with the capabilities to:

      • Provide .NET code to be accessed by the Browser by using JavaScript.
      • Provide the necessary access, in order that call can be made to the HTML or JavaScript code from Silverlight.

               The namespace were all the integration related elements can be found is System.Windows.Browser that contains elements like:

      • HtmlPage – allows access to the page in where the Silverlight solution is placed
        • System.Windows.Browser.HtmlPage.RegisterScriptableObject(identifier, baseVisualElement)
      • ScriptableMemberAttribute – This attribute allow you to mark the methods that can be accessed from the Browser
        • [ScriptableMember]

    3. Isolated Storage

               O Isolated Storage, as it occurs in other types of .NET solutions, it’s a sage place where there can be made IO several changes, like the following:

      • Files 
        • Open, Create, Delete, Exists
      • Directory 
        • Create, Delete, Exists, List contents
      • Site
        • Remove, Verify existing directories
      • Quota
        • Check actual, Raise, Check available space

               The Isolated Store exists in two levels:


    4. Adaptive Streaming

               Adaptive Streaming allows developers to encode all media elements in several bit rates, allowing it to depend on the network and CPU capabilities of the client machine.

               One of the big advantages is the possibility of using any other Adaptive Streaming mechanisms other them the provided by Silverlight.


    To finalize I would only place the resources presented:

     Here is also available my presentation and the samples made.

Live WebCast: Discovering Silverlight 2.0 – Developing RIA Solutions (Part 1 of 5)

   As I wrote in the previous post this post will be part of a Portuguese WebCasts Cycle  and in this case the topic is:

            “Developing RIA Solutions”

    This session had the purpose of presenting an overview of the capabilities and functionalities of Silverlight 2.0, and the talked topics were:

    1. Introduction

               Silverlight 2.0 in the same way that his predecessor, version 1.0, is still a Cross-Browser (IE, Firefox, Safari, Opera) and Cross-Platform (Windows, MAC OS, Linux), allowing rich experiences in terms of Media, and now this versions allows also the needed functionalities and possibilities to develop Line-of-Business solutions in a connected environment, and so there’s no support for “Occasionally Offline” or even “Occasionally Online”, as I wrote in this previous post.

               Basically with this new version we have all the previously known elements and also the following:

      • CLR – Common Language Runtime – This is the .NET Framework embedded on the Silverlight solutions that will allow that you can use .Net languages on the Code-Behind.
      • DLR – Dynamic Language Runtime – This enables a runtime for the usage of Dynamic Languages like IronPython and IronRuby.
      • Controls, in this version by default its made available a complete set of controls in order to help on the LOB solution development, controls such as DataGrid, ComboBox, RadioButton, Calendar, etc.
      • Layout – A set of controls that allow you to define how the controls will be arranged on the solution, and so more than a Canvas (basically a surface for placing object) we now have also a Grid (that allows us to define rows and columns in a way to organize how the controls used will be arranged on the application), StackPanel (Panel that will automatically arrange the contents) and the Border (this allow us to customize the boundaries of the surface area).
      • Editing – Availability of Controls that allow the edition of data like the TextBox.
      • SOAP, WCF, REST, Sockets – Allow us to consume all kinds of services.
      • XMLReader/XMLWriter – Allows us to process XML files on Silverlight.
      • LINQ – Allows the usage of Linq to XML on Silverlight.
      • DRM – Digital Rights Management – This is a mechanism to manage the rights digitally and that is very important in Media solutions.

    2. Application Model

               Silverlight works on a statefull model, and that means that unlike the usual Internet based solutions, it maintains the state. This happens because when the first request is made the solution is served to the client machine, working in a similar way as the Forms solutions.

               The way that the solution is compiled is the following:

      1. When the compolation is made by using the csc.exe (C# Compiler) or the vbc.exe (VB.NET compiler) all the source code, XAML files and also the Media files described as Embedded Resources will be packed in an Assembly that will be the result of the compilation process.
      2. It’s also generated a file with the XAP extension (basically a compressed Zip file with all the needed files) that will be the package of all the elements needed for the solution, and those elements are:
        • Assembly generated on the first point
        • Assemblies that are used as references on the solution
        • Media Eklements placed as content on the solution
        • Manifest.xml file that will contain all the information about the solution and there contents.

               The needs in terms of the Server are that we need to register the following extensions:

      • .XAP with the Mime Type of Application/x-silverlight-app – this will notify the Web Server that whenever he receives a request to serve this type of file he should serve the file that is the Silverlight Application.
      • .XAML with the Mime Type of application/xaml+xml – this will notify that this is a Silverlight page. This is only needed when the Silverlight 1.0 version is used or whenever there is a Spash Screen for a Silverlight version 2.0 solution.

               As for the install and instantiation process what happens is the following:

      • Install 
        • This is made only once
        • It will be on Windows Update after the RTM release, and this will allow the increase of the adoption.
        • The updates are made automatically
        • The Install Experience is 100% customizable (
        • There’s no need for a Browser restart in order to start working


      • Instantiation 
        • Using the HTML Object Tag
        • Silverlight.js – Javascript file used to instantiate the Silverlight solution

    3. Features

               Some of the features are:

      • Full Screen Mode
        • Possibility of viewing the solution on Full Screen, and in this way it will be free of the Browser chrome, but there will be a limit on the input as only the following keys will be available:Left, Right, Up, Down, Page Up, Page Down, Tab, Home, End.


      • Security 
        • In the same way that in version 1.0, this version works inside a Security SandBox that will avoid malicious code from affecting the critical resources of the customer system.
        • Elements that allow this kind of security:
          • Cross Domain – Allows the definition of the permissions whenever calls that need to cross boundaries are made, and they could be cross domain boundaries or even Browser Zone Boundaries.
          • Isolated Storage – Makes possible the usage of a safe place that will allow IO operations without decreasing the security of the customer.
          • Sockets – The need of specifying the cross domain policy file in order to make the call will make the solutions a lot more secure.
          • OpenFileDialog – Allows us to visualize the contents of the customer machine without needing to give dangerous permission to the solution.
        • It doesn’t need Administration privileges because it works in least privileges needed mode.
        • Is possible to have several instances of Silverlight in the same page, as each one will have it’s own AppDomain maintaining the independence between them.


      • HTML DOM Integration
        • Allow the integration between Silverlight and DOM, and what it means is that we can access Silverlight contents from the browser and vise-versa.


      • Deep Zoom
        • Allows the possibility of viewing high resolution images with a high performance even when making zoom on them.
        • Reads only the needed parts of the image that is being viewed.


    4. Tools

               The suggested tools for the development are Visual Studio (Developers) and Microsoft Expression Studio (Designers).


    5. Controls

               This was one of the big issues associated with Silverlight 1.0 and for that reason this version have several controls by default that are made available even with the source code and can be extended. There are 2 ways to change the looks, and they are:

      • Styling
        • Changing the appearance  using only the available properties
      • Skinning
        • Changing all the components that make the control appearance with a full and complete creative freedom.


    6. Data Binding

               Allows us to make connection between properties and other elements on the solution, and can be done in 2 ways:

    • Declaratively

                       <TextBlock Text="{Binding Nasdaq.Points, Mode=OneWay}"/>

    • Programmatically

                        Binding binding = new Binding("Nasdaq.Points");

                        binding.Mode = BindingMode.OneWay;

                        TextBlock tb = new TextBlock();

                        tb.SetBinding(TextBlock.TextProperty, binding);


    To finalize I would only place the resources presented:

     Here is also available my presentation and the samples made.