Mike Taulty's Blog
Bits and Bytes from Microsoft UK

August 2008 - Mike Taulty's Blog

Blogs

Mike Taulty's Blog

Elsewhere

  • WPF Airlines

    I often hear of the "Source Code Compatibility" between Silverlight and Windows Presentation Foundation and so today I thought I'd try it out a little bit. Personally, I don't view this as; Take your SL source code, add a few bits and pieces and you have a WPF application. Add a bit of conditional compilation where necessary. I don't have a perfect picture of it in my head but I see it more as perhaps; Build both a Silverlight and a WPF UI. Try and build components that can be built to underpin both. Most of what you've got will build/work on both frameworks and then you'll perhaps have a remaining 10% or so that's similar but different enough to want to separate out to being WPF/Silverlight specific. I still think it sounds challenging and I'm not sure how you'd do (e.g.) source code compatibility between Silverlight controls that are using the VSM and WPF controls that aren't. That feels like a tricky one to get right and I suspect that there are a whole bunch of other areas that need a lot of thought to try...
    Filed under: , ,
  • .NET Client Profile ( 3 )

    I got so excited about the .NET Client Profile that I made a screencast about it and stuck it on Channel 9; http://channel9.msdn.com/posts/mtaulty/WPF-ClickOnce-and-the-NET-Client-Profile/ When will I get a life?
    Filed under: ,
  • Get Your IE8 Beta 2 Whilst It's Hot

    From here . This will be my first leap into the world of IE8.
  • The .NET Client Profile ( 2 )

    Following on from this post I wanted to see if I could get my Client Profile installation to work with ClickOnce. To be honest, I struggled quite a bit with this. Sticking with my "Hello World" WPF application, I made sure that on the Publish tab of my projects' properties I had selected what to do about pre-requisites; and then I altered a few paths to point the ClickOnce process to my web server and told VS to publish it. The publishing process looks to drop out what you'd expect in terms of pushing out the .application file for ClickOnce deployment but you'll find that if you point someone to a .application file and they have IE7 without any .NET Framework then they get a dialog from IE7 saying something like; Hey - you don't have the .NET Framework. Would you like me to go and get it for you and install it? This is not what I want to do here because it springs off into downloading the full .NET Framework ( 3.5 I think but perhaps that'll be updated to Sp1? ) from the web which means the 60MB download and then...
    Filed under: ,
  • My Web Server's Dead - Corrupt applicationHost.config

    Hmm, today I find that IIS on my laptop suddenly won't start as it has a corrupt applicationHost.config file. The event log says; The Windows Process Activation Service encountered an error trying to read configuration data from file '\\?\C:\Windows\system32\inetsrv\config\applicationHost.config', line number '0'. The error message is: 'Configuration file is not well-formed XML '. The data field contains the error number. and that's certainly true because when I look in that file it looks empty but, in fact, it's blanked out with zeroes from opening it up in VS. So...what to do? I've found various posts in forums saying "Reinstall your OS" but I really don't have time for that. Many of those posts link this up with AntiVirus software damaging the file. I switched on my Vista desktop in order to see if I could copy a similar file from there and it "exploded". Something made a very loud bang and there was a strong smell of smoke. Not sure whether the power supply's gone or what but it doesn't smell too sweet so...
  • The .NET Client Profile

    If you're building something like a .NET WPF client application then one of the major bugbears (for both you and for Microsoft - let's be honest here :-)) is trying to get the .NET Framework on to the client machine. We're trying to make this easier but if you were to look at the recent .NET Framework packages you'd perhaps not be able to tell that :-) They seem to have mushroomed up to approximately 230MB in the case where you want to get a package that will install a framework like 3.5 or 3.5 Service Pack 1 without a network connection. In some ways, that's the salient point. If you do have a network connection then it's not quite so bad because you run an online installer which takes a look at your machine, determines things like x86/x64 and then downloads the right bits for your machine and gets out of the way. That tends to feel like 60MB rather than 230MB which is a significant saving. For me, at my download speeds I get 5Mbps so 0.5MBytesPerSecond and hence 30MB == 1 minute, 60 MB == 2 minutes and 230MB...
    Filed under: ,
  • Silverlight Controls from Intersoft

    Some of these controls are very cool - I've not looked at how "declarative" and easy to use they might be in your own apps but there's a very rich experience going on there. Intersoft's Silverlight Controls Demo Take a look at a few of the demos, use the menus as they do a bit more in places than you might think. Performance is pretty good for me as well. There's also the ones from Telerik that I think I've mentioned before; Telerik's Silverlight Controls Demo which also look pretty cool. Update: Ben mailed me and pointed out the strength of the ComponentOne Silverlight controls so I thought I should link to those as well having played with their control gallery; ComponentOne's Silverlight Controls Silverlight's control model is a really strong part of the platform and it's great to see these kinds of controls ( along with others like these from Infragistics ) coming together to really flesh out what you can do without writing a tonne of code yourself. Kind of makes me want to be a Silverlight developer, throw...
  • MIX UK and TechEd Europe 2008

    Following up on this "I will be at PDC" post, I thought I'd do another "Where will I be" style post and say that I'll also be at MIX UK where I'm doing a Silverlight 2 session; It looks like I'm on the agenda on the second day and I'll be doing a talk called "No Silverlight (2) Application Is an Island (of richness)" . This is a bit of a deliberately cheesy title in that we kept coming across this "Island of Richness " term used in conjunction with Silverlight and we found it funny in the team but the talk is really about how Silverlight applications can reach out to talk to; The HTML DOM and Javascript The local machine The network via HTTP, SOAP and RESTful web services and sockets in order to connect to the world beyond the plug-in. Unfortunately, I won't be at TechEd Europe. I went for the first time last year and my sessions went down pretty well and got used on the front page here; but I must have upset the TechEd people as I didn't get invited back this year :-) Maybe next time?
    Filed under:
  • PDC 2008

    It looks like ( fingers crossed ) I will be able to attend PDC in Los Angeles at the end of October :-) I'm hoping to be at the pre-con on the Sunday that's focused on concurrent programming and then to be around for the week until the conference ends on Thursday. I've spoken to a few UK developers in the last couple of weeks who have said that they're going out to PDC and that it'd be good to be able to meet up with other UK folks whilst they're there. I guess one of those fancy, modern social network type web sites might be more than a bit useful for co-ordinating that? Has anyone already set something up for UK people at the PDC? I did a quick search but didn't come across anything obvious. I found a facebook site but there's not much about geography on that as far as I can see. In the meantime, I set up a blog post here as a starting point.
    Filed under:
  • The Curious Incident of the MessageBox in the Silverlight App

    I've been puzzling over how you'd actually do; MessageBox.Show() in a Silverlight 2 application. I don't mean HtmPage.Window.Alert(""). I mean something that stays within the bounds of the SL control but asks the user a question. Naturally, there's many ways of doing this without a MessageBox class but it provided me something "interesting" to play with on the train. The API isn't part of the Silverlight framework so you need to do something yourself. I'd want MessageBox to follow the traditional model as much as possible. That is, what I want to be able to do is just come along and do; MessageBox.Show() and I expect that to "just work" without me having to define anything in XAML or anything like that. It should "just work". However, I'd also like to be able to customise what the message box displayed actually looks like. That is, I'd like it to be a templated control in many ways but without having to define an instance of a control - a bit of a dilemma! I want my MessageBox to appear "in front" of all other...
    Filed under: ,
  • I'm Missing My Default Parameter Values

    I miss default parameter values from C++. In C# if I have some method Foo; static void Foo( int intValue, float floatValue, string stringValue) { } and there's the possibility that all the parameters can be "optional" then I end up writing something like; static void Foo() { Foo(0, 0.0f, null ); } static void Foo( int intValue) { Foo(intValue, 0.0f, null ); } static void Foo( int intValue, float floatValue) { Foo(intValue, floatValue, null ); } static void Foo( int intValue, float floatValue, string stringValue) { } which is a lot of code when I really just want to say; static void Foo( int intValue = 0, float floatValue = 0.0f, string stringValue = null ) { } and my C++ compiler would have been happy with that but my C# compiler isn't going to be. Pity as I think that the single function definition is a lot nicer than the multiple function definitions. With object initialisation in C# V3.0 you almost feel like writing; public class ArgType { public int intValue = 0; public float floatValue = 0; public string...
    Filed under: ,
  • Duplex WCF Services with Silverlight 2

    Hmm. Maybe I'm just suffering a post-holiday motivational low ( which I am, in a big way :-) ) but I've been reading this; Accessing Duplex Services and I'm struggling to see how the "reward" here is justifying the "effort". With Silverlight, it's pretty easy for me to call a request-response service on a polled interval. I just; Write the service exactly as usual. Configure it exactly as usual. Generate a proxy exactly as usual. Call it exactly as usual. Use a client-side timer to call it again after some interval. This is really pretty easy stuff and results in a lot less code than the "polling binding" so I'm struggling to see why I'd bother with it. It seems to be; More code More complexity Same (or very similar) functionality So why would I do it? Anyone? Anyone? :-)
    Filed under: ,