I am going to be writing a book on Silverlight Architecture. I'd like to get my readers/followers to help me figure out what is most important to write about. Please take the following survey if you don't mind:
Since I am never at home anyway, I figured it would make sense to more conferences this year. I love doing talks at these conferences and getting the hard questions from attendees. If you're at any of these events, don't be shy about coming up and saying hi. I'll be at a number of events talking my favorite topics: Silverlight and Data!
The way that events are handled in Silverlight occassionally surprises people. For the uninitiated there are two types of events in Silverlight, direct and routed. Essentially direct events are events that one one type of element can fire and do not support any type of bubbling. The MediaEnded event on the MediaElement is a good example of this. The other type of event is a routed event. In this type of event, the event is bubbled through the visual tree. In Silverlight, the way it works is exactly the opposite of what you might expect from Win32 programming (e.g. WinForms, VB6, MFC, etc.) Routed event bubble from the most deeply nested element to the shallowest element. For example, when a MouseLeftButtonUp event is fired (mouse and keyboard events are routed events), the item directly under the mouse gets the event first, then its parent and so on:
For those of you who have been living in the world of WPF, this post will be old-hat, but for the purely Silverlight folks I am hoping to help you change the way you add functionality to your applications. To do this, I will use Silverlight 4's new support for Commands.
I like to write blog posts where I offer some pragmatic advice. In most posts I try to include tons of code samples and example projects...but this post is different. I am trying to get my head around something so I want to share what is in my head so I can get a conversation started with my readers to help me out. Once you read this post, please comment...
I just found out that in Silverlight 4, the fonts are no longer whitelisted to the ten fonts out of the box. Silverlight will now use any font that it can find on a machine without embedding. For example, in my RIA Services sample, I changed the font to Elysian (a font I have installed) and it picked it up:
As many of you who've been following know, I use a simple database of XBox game data as my example database. I usually remember to include it on the server project but in some examples its been forgotten. In other cases I've shipped with a 2008 version of the database instead of the 2005 version. To address this, I've uploaded .zip'd versions of both the 2005 and 2008 databases for anyone to use for any reason. This includes my RIA Services sample (which is using a SQL Server 2008 version) or my MVVM MSDN article sample which also uses a 2008 version. They include a MDF and a LDF. If you have trouble attaching them to an existing database, try deleting the LDF file. Go grab there here:
I've been looking at RIA Services for a long time now. I had the lucky pleasure of being given early access to the bits for what was then called "Alexandria". As most readers of this blog have read, I have had some issues with how RIA Services works. In the mean time Brad Abrams and the team have certainly responded and have made changes to the way that RIA Services works and much of it is for the better. I can see pretty simply how you can use RIA Services to build applications that are really architected well, with true separation of concerns. But there is blood in the water.
Now that the big news of the Silverlight 4 Beta release is out, we can announce that we've been working hard to update our course to include Silverlight 4 material. Since Silverlight 4 is only in Beta (and no go-live license to boot), the Silverlight Tour will continue to teach Silverlight 3 and show the Silverlight 4 material in addition. This way whether you're building a short-term application you can get your Silverlight 3 needs met, but if you want to learn Silverlight for a long-term project, you can be sure that the Silverlight Tour will prepare you for the Silverlight of tomorrow.
As many of you don't know, I was previously known as "The ADO Guy" so of course my first jump into the new Silverlight 4 bits was to play with the new Data Binding changes. The improvements aren't dramatic but they do fill several key holes that existed in the earlier versions. Let's take these changes one at a time.
Prior to Silverlight 4, in order to support data binding, the object had to derive from the FrameworkElement class which left out some key objects including Transformations. Now data binding works on any object that derives from DependencyObject (which is most of the Silverlight 4 framework). You can see this in the example below. (Note, you can also see the CompositeTransform which lets you set transformations of all four types in a single transform):
As noted in Scott Guthrie's keynote early, Silverlight 4 is now in beta. But what does that mean to you? Silverlight 4 Beta does not have a go-live license, so if you're building something to be released soon, I would stick with Silverlight 3. In contrast if you're working on a longer term project, especially a line-of business application, you'd be crazy to not look at Silverlight 4. Here are some of the major changes in this release:
|Using Visual Studio Code for ASP.NET Core Projects (new)|
|Implementing and Securing an API with ASP.NET Core (new)|
|Building a Web App with ASP.NET Core, MVC6, EF Core and AngularJS|
|Building a Web App with ASP.NET5, MVC6, EF7, and AngularJS (Retired)|
|Best Practices in ASP.NET: Entities, Validation, and View Models|
|Front-End Web Development Quick Start|
|Lessons from Real World .NET Code Reviews|
|Node.js for .NET Developers|
|Application Name||WilderBlog||Environment Name||Production|
|Application Ver||220.127.116.11||Runtime Framework||.NETCoreApp,Version=v1.1|
|App Path||D:\home\site\wwwroot||Runtime Version||.NET Core 4.6.25211.01|
|Operating System||Microsoft Windows 6.2.9200||Runtime Arch||X86|