# Tuesday, December 08, 2009

I posted an article on the CLR Team blog on a new scenario that we enabled for sharing assemblies between Silverlight and .NET. This is one of the features that I worked on in the .NET 4 cycle.

http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx

 

Tuesday, December 08, 2009 11:53:02 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, September 11, 2007

More Silverlight exploration.

 

I want to create a user control that has the concept of children that I can add (this.Children.Add()). I see that Panel adds this concept, but that Control is missing it. At the same time, Control provides the InitializeFromXaml helper, which seems to be pretty integral to user controls. Panel and Control are completely disjoint (in terms of inheritance chain), so you cannot nicely merge these two.

 

What are folks expected to do in this situation? Good question. The team is aware of this, and working on a solution. In the meantime, you (and me) will will need to do some hacking to get the control children outcome.

Tuesday, September 11, 2007 10:01:58 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

I had a strange (and not particularly pleasant) morning today, so I quickly decided as I entered my office that I wouldn't be doing any work this morning. Time to open VS and kick on Silverlight a bit more.

I'm thinking that the task for the morning is to write a fancy Image subclass. Sit down, new SL project, add a user control and add ": Image" to my class declaration. Turns out that doesn't work. Huh?

I open up the object browser, and System.Windows.Controls.Image is 'sealed'. Ouch! You have to subclass Control, or MediaBase. This isn't the experience that I was looking for. Hmm. Answer: Send mail ...

From: Richard Lander
Sent: Tuesday, September 11, 2007 10:50 AM
To: Rich's Buddies in Jolt team
Subject: Image is sealed. Why?

 

I was noticing that all the end-point classes (Image, Textblock, …) are sealed. What’s the thinking on that? It definitely inhibits the developer experience.

 

rich

I'm still waiting back on the final answer, but I'm guessing (and hoping) that this is issue is a bug. It has to be.

I also noticed someone else running into a variant of this issue.

I'll keep on pusing on this one.

 

Tuesday, September 11, 2007 7:16:48 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  | 
# Tuesday, August 28, 2007

I imagine that most developers when presented with the concept of Silverlight have a very joyous first response. And then the next thought is a pragmatic one of wondering how much code (source or binaries) can be shared between Orcas and Silverlight. In the past, I've come across some pretty interesting uses of ASP.NET to share experiences across both the server and the offline client. Today, I'm pretty sure that we can offer a better scenario than that.

Before we go into details, let's talk scenarios. My dream scenario is that TurboTax would move their web-based version to Silverlight, and their client version to full WPF. For the Silverlight version, I'm thinking of a pretty immersive application, along the lines of the nibbles tutorial or the new Tafiti search app. I can easily see a major improvement in customer experience, including for me, a multi-year TurboTax customer.

The question on the table is the degree to which Turbotax developers (for my dream scenario) could share code across those two presentations of Silverlight. There are two parts of that: the UI layer (WPF code, xaml and other assets), and then the business logic. Although possibly the most interesting topic, I won't address the UI at this point since the WPF and Jolt teams are still working out the kinks on that issue. The business logic aspect of the issue is well within the purview of what I've been working on.

Our goal for business logic has been pretty simple: subset the existing Orcas stack for the BCL, XML and other base technologies in a very, very compatible way. We want folks to be able to take their Silverlight business logic, and re-use it on the desktop. For Turbotax, you could imagine them being able to port all the code that calculates your taxes against the static IRS tax tables to Orcas. At this point, we're focussed on making source re-use work really well. Binary porting is definitely something that's on our list, but not what we consider to be the mainline scenario since you'll need to re-compile your UI code anyway. I'd like your feedback on it if you have a differing opinion.

You might notice that I'm talking about porting code from Silverlight *to* Orcas. The reverse direction isn't nearly as compelling. By definition, Silverlight will always be a subset of Orcas, and your Orcas code may have a lot of dependencies on types that are only part of Orcas. Starting from Silverlight, you know that all of the APIs that you use will also be on Orcas, and you're experience porting to Orcas will be straightforward.

One kink is that we've added APIs to Silverlight that are not in Orcas. So, my story as described above is actually a little flawed. Naturally, we'll add those to the next desktop release after Orcas, but there is a question of how to deal with that in the meantime. We do have a solution for that that we're working on. I'll post on that when I have firm details available.

Tuesday, August 28, 2007 6:00:00 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, August 08, 2007

I've been working on various aspects of Silverlight since sometime last year. The project has been going on much longer than that. It took a while for the managed API to come online and then even longer for good tools support, and all of this is before the product was announced. And all that time, you'd think that folks close to the product were generating a ton of samples and cool apps. Well, not really. There were some, but most folks (including me) were just cranking on getting the thing ready for Mix and then the refresh/RC that followed.

So, I'm now happily playing with the product. I'm in the middle of creating a photo gallery website for myself to replace the lame DHTML site that I wrote back in 2003 on ASP.NET v1.1.

I'm left with some random thoughts on the product and how it affects and empowers developers:

  • Compatibility between the server, the web-client (Silverlight) and the client (WPF/Winforms) is incredibly important
    • At the very least, developers benefit from knowledge transfer across the platform
    • Compatibility makes life easier for developers
    • More importantly, it opens up a ton of interesting scenarios between the different parts of the platform
  • A highly flexible and easy to target ActiveX control is liberating
    • I've written a bunch of javascript to improve user experience in the browser. I'd be happy to never do that again, given that the development experience is pretty bad.
    • You can create amazing visuals and immersize experiences that would never be possible with Javascript.
  • Silverlight also opens up a lot of questions for its use in the browser
    • Do you use Silverlight for your entire site, or only the parts that make sense?
    • What do you about navigation, particularly as it relates to forward and back buttons?
    • What do you do about folks that what a URL for a specific part of your site to send around, or return to later (bookmark)?
    • Flash has been around for a while, and has all of these same problems. Some sites use Flash for ads, others for widgets and still others that do the whole site thing. I've always disliked the whole site thing as a user.
  • Silverlight has an opportunity to hugely improve on the current Web experience
    • Most importantly, we've just let lose all those managed developers out on that ;)
    • This is the start of real internet applications, and of much more interesting web sites. Cannot wait to see what Amazon chooses to do.
    • This opens up a new x-browser (and OS) application platform to developers
    • Flash isn't always the best experience. It does crash and you sometimes get this dialog about 'waiting for a long-running script'.
  • Is this yet another Microsoft technology that developers have to learn?
    • Yes and no. If you know WPF already, then you'll be at home.
    • If you don't know the .NET Framework, then Silverlight is a great way to learn an impressive set of basics.
    • There are some differences to learn, but it's all minor
  • Is Microsoft serious about x-brower and x-OS?
    • Yes.
  • Are .NET Framework teams stoked about Silverlight?
    • Last time I checked ;)

As I work more on my photo gallery site, I'm pretty sure I'll develop more thoughts and hopefully some answers to some of the questions that I've raised.

Wednesday, August 08, 2007 5:46:30 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [3]  |