Monday, 9 November 2009

When Visual Studio Insists on Starting Two Copies of Your Application

Some months back I had a nasty problem where every time I tried to run my Silverlight web application two copies of the browser would start up. The only way to stop this happening was to run the application in Release instead of Debug mode, which isn't really an acceptable solution when you're writing new code and need to step through it.


The problem started occurring just after I'd installed an extremely buggy Silverlight control suite from a 3rd party vendor (no names or I'll be accused of just wanting to 'pick a fight' or being 'uncivilised'! ;-)), so I put it down to the 'cost' of using these particular controls.


It turns out I was wrong (that'll teach me!). I didn't think any more about it since the problem finally went away when I repaved my PC with Windows 7, but a couple of days ago Microsoft's Jeff Handley hit the same problem and asked if anybody else had experienced it.


Earlier today he tweeted that it looks like the problem is caused by installing Windows Live Toolbar, and now that I come to think of it I DID install the toolbar around the same time I installed the 3rd party controls. And I didn't bother to reinstall the toolbar when I repaved my PC with Windows 7.


No doubt Jeff will be publishing some more details on his blog when he's dug a bit more into it, but I thought it worth posting about the issue here, because when I hit it Google certainly wasn't my friend. Good to get to the bottom of the issue, and hopefully there'll be a fix soon.

Saturday, 7 November 2009

3rd Party Vendor Controls (and why I've finally given up on Telerik)

Tweeting up a Storm


Those who follow me on Twitter will have seen me posting a lot of exasperated tweets about the quality of Telerik's Controls for Silverlight suite earlier this week, when the company released the latest version of their control suite (their third and final release for 2009) with lots of hooplah on their blogs, main web site and various employee Twitter feeds.


In some ways it was probably unfair to pick on Telerik, when other vendors seem to be even worse (especially when it comes to support), and an interesting Twitter debate on not just Telerik, but the whole area of vendor controls, followed. The unanimous concensus was 'Just stay away from third party vendor controls', which is a really depressing thing to have to report.


This blog entry was originally an indecently long rant about my experiences with ASP.NET controls from Infragistics and Silverlight controls from Telerik, concluding that neither had been anywhere near fit for purpose.


When a few people tweeted that they were in agreement and saying 3rd party vendor controls should be avoided, two received a response from an Infragistics employee calling them 'whiners', and saying the company had tens of thousands of satisfied customers. I resisted the temptation to ask if the employee had spoken to each and every one of them to prove they were 'satisfied' and to provide their contact information so I could check with them myself ;-)


But 'whining' doesn't achieve anything, and the original version of this post, which summarised a pile of problems with just the handful of the Telerik controls for Silverlight I'd looked at, was too detailed to be of any value to anyone other than make me feel better by venting.


It's time to move on and do what so many other developers have recommended I do. Ignore 3rd party controls (or at least the ASP.NET and Silverlight ones) and just write my own. It will result in a lot less stress, wasted time and frustration and much happier clients, even if initially it looks like too much time and effort to undertake.


In the meantime to anyone thinking 3rd party controls are fit for purpose I'd say spend just an hour looking at the demo code and the documentation the different vendors supply by looking at an evaluation version. Ideally try just a few basic customisations - you might be surprised at what you find (or don't find!) Also look at the vendor forums to see (a) how many people are actually using that vendor's controls (b) how many problems people are having. If a vendor doesn't allow access to the forums that purchasers use then you've got a pretty strong clue as to what customers are saying about the quality of what they've bought!


Peace!

Sunday, 27 September 2009

PRISM Documentation: The 'Missing' Table of Contents

For some reason (several actually!) PRISM is largely being ignored by many Silverlight developers. In my talk on PRISM (which I'm repeating at the next meeting of the Silverlight User Group this coming Tuesday - more information here) I talk about the documentation, and the fact that it seems to prejudice people against PRISM, when in fact it's an excellent resource. I talk about the fact there are two ways of looking at it.


PRISM Documentation - half full or half empty?

The 'glass half empty' crowd see how much documentation there is (assuming they can even find it - it's pretty much hidden in a totally inappropriate chm file format by default) and panics that there just isn't enough time to read and understand all this stuff when their Silverlight application needed writing yesterday, and dismiss PRISM as a result.


The 'glass half full' view usually discover the pdf version and realise they're getting a really good full-colour 300+ pdf electronic book with lots of useful advice and guidance for free. For more information on how to get the pdf version see the excellent Downloading and Building PRISM Guide from the folks at Sparkling Client.


One disappointment of the pdf version is that, unlike the traditional e-book, when printed out it doesn't contain a good table of contents. This makes treating it like a book, and finding a specific 'How to', or getting even a basic idea of what's covered in the 'book', is a bit of a nightmare.


I use the documentation a lot, so to avoid wasting time thumbing through my dog-eared copy when I want to look-up something specific, I've put together the 'missing' table of contents as a pdf, which you can download by clicking on the image below. I've taken the liberty of changing some of the "Composite Application Library' headings to instead read 'PRISM' as I think PRISM is pretty schizophrenic with regards to its identity (and think 'Composite Application Library' is too much of a meaningless mouthful). Let me know if I've missed anything!


Download PRISM Table of Contents..

Sunday, 20 September 2009

My SketchFlow Comments: Christian Schorman of the Blend Team Responds

On Friday I posted a quick report on my impressions of the Silverlight Firestarter event, which included my expressing surprise at what appeared to be a fundamental shift in the way SketchFlow was being promoted.


Christian Schormann from the Blend team sent a detailed response to those comments, which I am happy to reproduce below. Unfortunately it is not obvious from this blog that you can easily comment to a blog entry by clicking on the "0 comments" (hidden) hyperlink at the end of a given blog entry (blame Google for the UX, me for the fact I haven't customised things from the basic templates they provide!), which is why I received the email rather than a comment directly on the blog itself.


In any event I think it makes more sense to post this response as a separate blog entry, rather than as a somewhat hidden comment to the original blog entry


"Hi Ian,

I wanted to respond to a few questions regarding SketchFlow you brought up on your blog. I am part of the Expression Blend team, where I am responsible for product design and strategy.


You write:

"One thing that did alarm me somewhat, was the seeming step-back by Microsoft from the whole 'Sketch your application and then make it real - don't throw all that hard work prototyping away' story. Suddenly the story was that we should be re-using assets used in SketchFlow applications and not turning 'sketch' controls into 'real' controls as documented in the Blend 'Help' feature. Given that most of these assets are produced in Adobe Photoshop and other tools outside of Blend it kind of begged the question 'So the real advantage of SketchFlow over Balsamiq is...what exactly?'."


Let me comment on the last point first.

Balsamiq creates static mockups of UI. It does so very fast and with minimal learning effort.


SketchFlow is meant to make it more cost effective to create, explore, evolve and communicate deep dynamic prototypes. In SketchFlow, designers can model high-level flow and composition (from a product design perspective) of a user experience. They can use animation to illustrate their design intent. They can model and experiment with states and state transitions. Using sample data and behaviors, they can create compelling prototypes of serious interactivity. With the SketchFlow player and feedback tools, other stakeholders in the process can evaluate prototypes effectively. SketchFlow thus has a very different goal than Balsamiq. SketchFlow certainly can be used to simply create static mockups, but it is much more special for prototyping dynamic interactivity.


We believe that both mockups and dynamic prototypes have their place in the design process – they are complementary. They are often not created by the same people, and they are usually artifacts of different stages in the design process.


Regarding prototype re-use, I don’t think our story has ever changed. We believe that the whole point of a prototyping process is to quickly generate and explore a multitude of ideas. Often, it is a good idea to not over-invest in such explorative prototypes, and to avoid getting attached to any given prototype: the longer one stays with a given idea, the harder it is to discard it when it fails. Introducing architectural or production constraints into the prototyping process too early risks reducing the productivity and effectiveness of prototyping. Also see Bill Buxton’s book on Sketching User Experiences for more on this argument.


Our general advice therefore is that in strict idea generation / verification scenarios, it is often better to not plan on re-using a prototype as the blue pause for an application. This is not an advice based on technical criteria or limitations of tool or platform, just a recommendation from a design process perspective.


However, we also recognize that SketchFlow is used in scenarios that are more RAD-style development than prototyping. Also, there are applications where the structure of a prototype naturally is similar enough for re-use in production. Because we know that there are certainly valuable cases for re-using prototypes as part of a production-oriented scenario, we enable conversion of prototypes into navigation applications. The process is currently not automatic, but it is feasible and documented in the manual.


In summary, our message is that if you want to prototype efficiently, we recommend that you focus on the design problem at hand, rather than trying to build architecture (or even think about architectural concerns) as part of the prototyping process. However, this decision is of course entirely up to you.


Should you, at the end of the design process, decide that either the prototype as a whole or individual assets are useful in production, we enable this re-use. It is a decision in the hands of a designer, based on the goals and complexity factors of the prototyping work actually undertaken. The tool enables re-use of projects and assets, but we believe it is not always a wise choice to expect to do so.


You also comment that most assets are created in Photoshop et al. There is of course no doubt about the prominence of Photoshop et al, but in many cases these assets undergo significant pre-processing . Visuals often need to be packaged into control templates, equipped with transitions, animations and behaviors, before they can be used efficiently. And there are many assets (for example UserControls or resource dictionaries) that are even more entirely “native”. In this sense we see a lot of asset re-use that would not easily be possible with pure artwork.


Finally, you write regarding a conversion problem with the metrics of the SketchControls. I will look into this – I have not heard about this so far. In practice, we have not heard that from many users, but then again, many SketchFlow users do not spend much time getting their layout to be very precise – SketchStyles are generally meant (and used) in the first place to convey the notion that the visual design (and the exact layout, as part of it) is just a sketch, and precision of layout is somewhat antithetical to this. That said, I still agree that the metrics should match, so I will look into the issue.


Christian Schorman"

Friday, 18 September 2009

Silverlight Firestarter and a few other bits and pieces

This is going to be a very hasty blog post because it's being written in my lunch hour. Why? Because I desperately need a break from trying to convert a complex Silverlight 'storyboard' application to use a separately developed .NET RIA Services prototype application whilst also introducing the use of PRISM modules and regions usng MVVM inside the Silverlight 3 navigation framework using .NET RIA Services!


And there in that opening paragraph you perhaps have a clue as to why folks aren't rushing to jump on board the 'Silverlight in the Enterprise' bandwagon, and didn't seem to be rushing into this 'Silverlight Firestarter' event the way you'd expect given the very high profile speaker list (at least if the lack of much real activity on the pre-advertised Twitter #slfs stream was anything to go by).


Microsoft's 'silo' approach to Silverlight architectural guidance/marketing/development really doesn't help and I haven't even added MEF into the mix yet. This, and the whole Microsoft 'La! La! La! Can't hear you!' approach whenever someone mentions the 'Blend' or 'Sketchflow' words and how all this 'architectural' stuff is intended to fit together will no doubt be the subject of a future rant - sorry I mean 'blog entry' ;-)


So (see how I'm trying to embrace the whole Microsoft employee thing there!) Silverlight Firestarter was Microsoft's annual day-long event featuring all the big Silverlight rock stars (Scott Guthrie, Tim Heuer, Brad Abrams, Adam Kinney) and held at Microsoft HQ in Redmond. This year it was streamed live to us mere mortals outside Redmond between around 5pm and 1am this morning.


After an initial experience that looked like this was going to be another over-hyped seethelight.com fiasco all over again (no international users could access the live stream because someone had hard-coded an assumption that we were all running Windows in US date format mode into the Silverlight streaming application!) - things went very smoothly and the quality of the video and audio of the speakers, if not the blurry, pretty indecipherable code walkthroughs and laptop screen captures, were excellent :-) As was the support on the #slfs Twitter stream. The folks behind this event have every right to pat themselves on the back for an excellent inaugral event and I'm sure future events will be even better!


If you were wanting a whole day of 'overview' material of the various Silverlight bits and pieces including Blend and .NET RIA Services the speakers all did great jobs and the download videos, planned to be available in a week's time here are 'must see's and will be a great way of getting 'the big picture' around a lot of this new stuff.


The event was, in many ways, much like the excellent WPF Training course recently held at Heathrow: Touted as an 'introductory' course, the event was swamped (these words are all relative!) with those of us who regard ourselves as well beyond the introductory level these things are aimed at, attracted by the high-profile speakers in the hope that some as-yet-unrevealed gems will emerge from the paucity of information that's available to help us with our 'real world' problems, or at least give us an opportunity to get long-simmering issues and questions answered. As a result, if the associated Twitter stream is any indication, the event was really very much a case of 'preaching to the converted' rather than one bringing new folks on board, which is nobody's fault, but somewhat disappointing if, as some of us believe, Silverlight is going to take over the world at some point!


On the plus side, the Twitter stream was pretty lively (with comments, if not number of different people) and fun. On the downside the event itself was, for the most part, pretty much the same old canned 'not real world' demo's most of us have seen several times now, albeit slickly presented and delivered.


New information was almost non-existent, despite promises that it would be casually added in (the old 'Oh! I ran out of time!' excuse is getting so lame now :-P) and the Q&A session was, for me, a huge disappointment because instead of addressing the (admittedly more complex) issues some of us were trying to raise we got stuff like 'How do I become a Silverlight MVP?', 'How do I get to talk on the main stage at MIX?' or 'Ask the MVP lead who her favourite Silverlight MVP is'? (no! really!). Honestly I expect this sort of 'Me! Me! Me!' nonsense at mainstream fan events like Comic Con, but not at a technical developer event. We have truly entered a world where 'the cult of celebrity' is taking over everything - even our everyday developer work lives :-(


So, for the record, here are the main bullet point items I 'learnt' during the long 8 hour event:



  • Scott Guthrie (VP, .NET Development Division) claimed Microsoft are "on track to having Silverlight installed on 50% of all machines within the next couple of months". Others are already treating this remark with some cynicism and demanding to know the source of the data Microsoft keeps touting, as for me ... well everyone knows how cynical I am! I'd like to believe it's really true, but...

  • Brad Abrams promoted (and Karl Schifflet gave us an excellent overview of) New XAML PowerTools for Visual Studio 2008 with Silverlight and RIA Services support which will be made available this Sunday. Karl heads up the “Cider” (XAML Visual Designer) team.

  • The Silverlight Toolkit (containing open source Silverlight controls) now has a shiny demo site for all controls complete with "View XAML" and "View code" functionality.

  • .NET RIA Services RTM ship date is still "early next year" but Microsoft are not prepared to commit to any firmer date than that at this stage.


One thing that did alarm me somewhat, was the seeming step-back by Microsoft from the whole 'Sketch your application and then make it real - don't throw all that hard work prototyping away' story. Suddenly the story was that we should be re-using assets used in SketchFlow applications and not turning 'sketch' controls into 'real' controls as documented in the Blend 'Help' feature. Given that most of these assets are produced in Adobe Photoshop and other tools outside of Blend it kind of begged the question 'So the real advantage of SketchFlow over Balsamiq is...what exactly?'.


In truth for Enterprise apps I don't see reusing SketchFlow as an option anyway (no MVVM, PRISM, .NET RIA and all that other stuff that's really likely to be needed) but it seemed odd for Microsoft to so publicly step away from what had been the initial message, and one that is very easy to sell and promote as unique. Since I tweeted about this I've had a response to the effect that this was just a sensible bit of guidance based around concentrating on the real benefits of wireframe prototyping ("We enable conversion but caution that having reuse in mind might cause you to lose the quick & dirty mindset"), but even so...


Interestingly one of the questions asked on the Twitter stream that didn't get asked (for very obvious reasons - there goes my cynicism again!) was why the 'sketch' styles were different from 'real' styles to the extent that if you DID do the conversion of a Sketchflow application from using 'sketch' styles to 'real' ones your hard-fought work in layout would get totally screwed! Eeek! Who knew?! I suspect Microsoft aren't being totally honest with us in this rush to over-sell SketchFlow as the panacea to all designer problems (which gets them to actually use Blend instead of ruddy 'Always used it. Not budging!' DreamWeaver). I need to find time to investigate how serious a problem this reported 'change of layout' problem is!


Outside of the event itself, several other bits of interesting news occurred. Most exciting was the news that John Papa has joined Microsoft. Almost single-handedly John's blog has been trying to make sense of how the hell anybody's supposed to build a Silverlight application that uses MVVM and PRISM and works with Blend too - so his move to Microsoft will hopefully help resolve the paucity of any real official information around this whole problematic area.


And just after the event First Floor Software announced they had documentation for their 'must have' Silverlight Spy 3 tool. You can download it here and it will be automatically included in an updated release of the installation msi coming soon. To put it bluntly, if you don't have this tool then I don't think you have the right to refer to yourself as a Silverlight developer :-P


Apologies for the lack of links to people and blogs in this post: lunchtime has been slightly longer than intended and I need to get back to my PRISM/SL3 Navigation/.NET RIA Services integration exercise!

Thursday, 20 August 2009

A Couple of Issues Discovered While Playing with .NET RIA Services

Installing Windows 7 (which is a breath of fresh air after the nightmare I've had with Vista) and reinstalling all my software on different PCs probably wasn't my best idea given that I had a talk, which needed research, looming. As a result of the best part of a week rebuilding a ton of PCs, I left playing with .NET RIA Services (currently a July 2009 Preview with a 'use at your own risk' 'Go Live' license) much too late (Note to self: You ALWAYS underestimate how long it will take to prep a presentation. Take note!)


The talk, which I gave last night, was An Introduction to PRISM and .NET RIA Services at Vista Squad, which has just renamed itself to "Edge UG" - Die Vista die! ;-) For those who missed it - don't worry - it wasn't one of my best efforts, and although folks were kind about it afterwards and tweeted nice things, the reality is the complexity levels of different sections were too at variance with each other and because I was running out of time I skipped an important initial .NET RIA Services demo which then made the demo I did give confusing as hell, mainly because I skipped about too much (not literally - stop making your own jokes up at the back there!)


Bad preparation aside, when I was researching .NET RIA Services I hit a couple of problems in the most basic demo's almost immediately :-(


The first problem was that the generated proxy code class for Silverlight which the .NET RIA Services produce as part of the Server project build process wasn't being recognised by my Silverlight code that needed to use it. I was getting errors whenever I tried to reference the client-side Proxy classes, or even just add a 'using' statement for the generated class namespace.


After a couple of hours banging my head against a brick wall (this stuff had been working fine on another PC, I just hadn't twigged that the other PC was configured with different software!) I raised a question in the lively .NET RIA Services support forums and thanks to help from Colin Blair discovered the problem was down to my having installed JetBrains Resharper.


It seems that Resharper and .NET RIA Services don't play well together, although in this case I think Resharper is doing what you'd expect it to do (the generated classes aren't included as part of the project and only show up when you click on 'Show hidden files' - so why should Resharper recognise they're there just because some clever hackery is going on within Visual Studio?). There are reports this might be fixed in Resharper version 5 but in the meantime including the file in the project gets you up and running.

Build failure screenshot when Resharper is installed


The other issue I hit was to do with using a System.ComponentModel.DataAnnotations reference to resolve the [Key] attribute required on my POCO properties that I wanted to bind to in my Silverlight-generated class. It turns out that .NET RIA Services installs a newer version of the DataAnnotations class (version 99!) but I was referencing the original 3.5 version. Doh!


DataAnnotations dll version numbers (Add Reference dialog)

Hopefully this blog post will alert others. I found a few folks with the 'cannot resolve Key attribute' DataAnnotations problem when I did a Bing search, but never any responses on what the cause might be. Big thanks to Colin for diagnosing the issues almost immediately.

Wednesday, 5 August 2009

Monthly Catch Up

Yikes! It's been over a month since my last post. Alas most of my blogging these days seems to be in the form of micro-blogging via Twitter


The Silverlight project I've been working on finally launched last week (hope to have the URL for the public version to show any day now) and I'm in that strange limbo-land known as being 'between contracts'. It's nice to actually have some time to catch up and reflect on the work done over the last 3 months. Bizarrely my first week off seems to have been even more hectic than when I was working full-time!


There's been the usual user group meetings - UK Azure User Group, Silverlight User Group and VistaSquad, with me recording/editing video for all of them over the last 3 weeks (I would particularly recommend watching the video of Bert Craven talking about Easyjet's vision for improving their customers' airport user experience and how they're using Azure to achieve this).


The last few weeks saw the official UK launch of Silverlight 3 and Expression Studio 3 and the latest weekend-packed ALT.NET Conference. This latter event saw announcements about the launch of several new ALT.NET initiatives such as The ALT.NET Society and The Alternative Network Group. It all feels a bit like a Monty Python-esque 'People's Liberation Front of Judea' vs 'Judean People's Liberation Front' situation is developing - let's hope not!


The UK Silverlight Launch event was good fun (with free champagne and canapes too) and it was good to network with folks who've worked with Silverlight, and to see some good customer demo's. But the launch felt like a bit of a missed opportunity to me because the audience seemed to mainly comprise knowledgeable geeks, where the launch talks were more geared towards 'overview' material. I felt that the real target audience for the launch should have been journalists from computer design magazines and professional bloggers rather than the group of developers it appeared to be (and of course, by saying this, I'm admitting I probably shouldn't have been invited there myself :-(). You can see video's of all the talks at the launch event here or of course there's my own video of the one-hour 'reprise' of the event for the Silverlight User Group here


Microsoft have got Silverlight BRANDING so right. Everyone's aware of it, where nobody outside the Microsoft dev world seems to know what WPF is! So it's frustrating that they don't seem able to follow through on the MARKETING side of things.


The initial version of the official US Silverlight 3 launch site SeeTheLight.com, was pre-advertised with a countdown clock and much hoop-la about how great it was going to be. The eventual launch was a calamatous affair, with the Silverlight implementation being so bad it was taken down within hours and replaced with an HTML version that's still there a month later.


It's frustrating for those of us who love the technology, but keep seeing these 'shoot yourselves in the foot' scenarios happening around us! And even the Microsoft developers don't seem convinced about the technology either. At the ALT.NET Conference, in a session on 'The Future of Web Technologies' Silverlight was dismissed VERY quickly, with a brash (and seemingly inaccurate) 'Office 2010 isn't using it which says all you need to know about Microsoft's confidence in it'.


There's a lot of work needs doing to get developers behind the technology and even pointing out statements from the likes of Scott Guthrie about its long-term strategic future, the evolution of products like .NET RIA Services, MEF for Silverlight, XBox support, iPhone support through MonoTouch etc isn't getting people past the perception that 'Its just a weaker version of Flash that's on far fewer desktops and not worth the time looking at because Microsoft will probably abandon it'. There's a lot of work to be done in changing people's attitudes!


If I felt the UK launch for Silverlight was a bit of a missed opportunity, I had no such reservations about the ALT.NET UK Conference 2009. It was a total blast from start to finish. Kicking off with ALT.NET Beers and some lively 'Park Bench' sessions with the infamous SerialSeb holding court, the weekend got off to a good start. I missed most of the Open Space Coding day (but looking forward to attending the Azure-themed one in Birmingham later this month) but by all accounts people got a lot out of it. And then there was the Open Space conference itself. Lots of lively debate and discussion. I thought this event was even better than the last one although the inability to stream the sessions (my HP Dv2 laptop refused to connect to Conchango's wireless router, even though my iPhone had no such problems) was frustrating. Kudos to Alan Dean, Ian Cooper, Ben Hall, Serial Seb, Michelle Flynn and all the generous sponsors for all their hard work in putting together such a great event.


On the 19th August I'm giving an introductory talk on PRISM and RIA .NET Services for VistaSquad. As of yesterday, there were apparently only 7 places left so if you want to come along you need to be quick. You can reserve a place here


Tonight sees what will probably be the first of many Tesco TJAM developer events, with Tesco allowing sign-up for use of their API and presenting ideas from customers about what they'd like to see implemented. Should be fun!


In the meantime, I'm busy redesigning/re-implementing the company web site which is suffering badly from 'The Cobbler's Childrens' Shoes' syndrome (ie it's crap because I've had no time to sort it out when paying work keeps distracting me!) I shall be using Silverlight 3 and PRISM of course, and it's a good excuse to catch up on all the Silverlight 3 activity now that the Silverlight 2 project I've been working on has been (pretty effortlessly) migrated to Silverlight 3.


I'm still waiting for the good Silverlight 3 books to appear. Since my last blog entry, strongly criticising Introducing Silverlight 3, only one new title has been published. Apress have released Accelerated Silverlight 3 and it's a huge disappointment. If I'd checked who the author was (the same author as wrote Silverlight in the Enterprise - never have so many words at such high cost been used to say so little) I'd have realised what I was letting myself in for. Although the book's cover and back page talk all the time about 'Silverlight 3' as soon as you read the actual content the talk is only of 'Silverlight 3 beta' and 'Expression Studio 3 Preview'. The book was out-of-date even before its publication date, and its dry, 'let's just cut and paste MSDN content' style isn't going to turn anybody on to Silverlight. If you're looking for a Silverlight 3 book and need one today, my recommendation would be to get the 'early access' chapters from either Hello! Silverlight 3, Essential Silverlight 3 or Silverlight 3 In Action.

Saturday, 20 June 2009

One Month On... Why Silverlight Development Can Be Painful

What happened to the daily link dumps?


It's over a month since I posted my last set of daily link dumps. Not through choice! Google decided that a blog with lots of links indicates spam, and it took more than 3 weeks to get this blog unblocked. Needless to say I'm now looking at moving my blog to somewhere that gives me more control (and responsibility :-( ) as part of migrating my embarrasingly poor company web site (shoemaker's shoes and all that!) over to Silverlight. I need a framework where I will not be at the mercy of some unresponsive remote conglomerate that gives no direct route for problem escalation or even point of contact and can arbitrarily shut me down for no meaningful reason! More on this site migration when the current workload subsides in a couple of weeks!


Why no recent blog entries?


The last few weeks have involved some pretty crazy hours working to get a Silverlight 2 application delivered to constantly changing requirements (or 'minor tweaks' as the customer likes to call them!), and whilst I've mostly been enjoying it (it's hard to 'enjoy' layout tweaking at the pixel-perfect level!), I've been somewhat frustrated at the amount of time the project has taken - all detracting from personal time that I'd rather spend getting involved in research and online conversations around Silverlight 3, MVVM, Blend 3/SketchFlow, PRISM 2 and .NET RIA Services. These are all technologies which are going to become VERY important to the long term future of Silverlight, which I see as playing a large part in my company's future.


Silverlight 3 'Launch Date' is July 10th


July 10th is the date being officially touted as the 'launch date' for Silverlight 3 and it was almost amusing to see the explosion of information across Twitter and various blogs in the days following discovery of the original press release (I think Ziff-Davies were the first to go public with it). The launch date almost inevitably ended up being 'spun' as the official release-to-web date of Silverlight 3 (and even the associated Blend 3 tooling!) by some of those who didn't actually bother reading the press release in their rush to spread the news!


So let's be very clear here: launch date does NOT mean release date, as anybody who attended the SQL Server 2005 launch event only to find it would be several months before RTM of that product will remember! All that is certain is that July 10th is the date where a much more interesting date is likely to be announced!


Silverlight 2 Books and Web Searching


One thing that has impressed me on my Silverlight 2 learning experience has been the quality of most of the books out there on the subject. Admittedly most (all?!) suffer from having been released based on Release Candidate rather than the final release of Silverlight 2, but fortunately changes were relatively minor, and most of the books out there at least do a great job of covering the fundamentals and minimising the errors in the code listings and examples they use. Some of them have even used colour, and used it effectively (alas, not for any of the Blend books, which is where colour is really needed). All of this is a real move forwards from the bad old days of production line 'just commission and rush it to market based on flavour of the month rather than quality' that Wrox in particular seemed to get into before it went bust the first time (presumably because the target market woke up to the fact we were just being ripped off and stopped buying).


I'm often asked which of the many Silverlight 2 books I've purchased (I buy too many books!) is 'the best' one to purchase for the beginner. I hate to be drawn on this because the answer is nearly always 'it depends' (on what your background is, and what you want from the book). You really can't go wrong with any of the main ones from Apress, Manning or SAMS for the basics and John Papa's book on Data Services Access from O'Reilly is essential too, and not just because it's the only book covering its subject matter. However I do feel I should give special mention to the Silverlight 2 Recipes book from Apress here, since it rarely (never?) gets mentioned in despatches, presumably because the title/formula of the book is off-putting to those just wanting to learn a new technology fast. What I like about Recipes is it has most of the stuff that the main books have, but with a lot more depth tucked away in its pages and copious code examples. I hope there will be a Silverlight 3 version, but suspect the title is compromising its sales success.


Searching on the web for information is far more problematic. One of my great frustrations has been the number of high-ranking articles, even in the official QuickStarts or MSDN articles, that turn out to contain significant misinformation because they were written based on a beta version not the final release. Simply having Visual Studio upgrade the obsolete downloadable source code doesn't work, especially if we're talking custom controls which the books tend to be exteremly 'light' on. I'm guessing these problems are because generic.xaml had its location forcibly changed to comply with WPF's Themes folder at the last minute, but haven't had the history with Silverlight 2 or the time to research it to know if this is the reason. Too often basic tutorials (want a 'glass button' anyone?) turn out to have step-by-step instructions that don't work, bear little relation to the associated code download (which does work despite containing such gems such as placing controls using Grid.Row=3 when the grid is zero-based and only has 3 rows defined!). The quality of this stuff is extremely low, despite the high search rankings and hits on Google and the like.


The biggest problem/cause of time-wasting with Silverlight 2 education is that on the web nobody goes back to update the articles they wrote when they were playing with beta 2. Probably the worst offenders are those authors who happily take your book money hiding the fact they weren't written to the released version on some obscure page inside the book, promising 'updates available on my site' never to be heard from again! Do I sound bitter yet? (I really should have learnt my lesson from the WCF initial release days, so have nobody to blame but myself!)


The real problem with Silverlight development, if there is one (I'm willing to conveniently forget the buggy controls and complete lack of printing support, if you are ;-)) is that the release schedule is so fast that any 'expert' who's doing stuff beyond the most basic examples is rushing onto the next beta as soon as the previous one goes RTM. If my experience is typical most of the Silverlight 2 articles/code samples are not just poorly written and explained, but will lead you down blind alleys, quite aside from any problems inherent in not working as promised when applied to your own scenarios. In this instance, Google is NOT your friend (but Community is :-))


Ironically, there's a wealth of really good Silverlight 3 stuff published, but, again, it's BETA stuff. Alas, for those of us developing real applications to real delivery dates using a beta technology for which there is still no 'go live' license or even likely release date this does NOT reflect any kind of real world that we work in. Frankly I'm amazed that Microsoft seem to think, and not just think - positively encourage - the illusion that it does! If Microsoft want people to take Silverlight 2 seriously - and Silverlight 2 is still the officially released and available version at the time of writing - please guys at least go back and update your own 'official' quickstarts so they work (and don't contain comments about 'updating this beta 2 code when the release candidate becomes available in a few weeks'!?!) Yeah, I know you're all so busy trying to get your head around the crazy number of technologies Micrsoft keeps throwing out, but so are hundreds of thousands of developers! And a few hours of the one person controlling this stuff NOW will save HUNDREDS OF THOUSANDS of hours wasted by those trying to get to grips with the stuff based on what's being sold as the 'official' documentation today!


Introducing Microsoft Silverlight 3 (Book Review)


Which nicely brings me on to Laurence Moroney's Introducing Microsoft Silverlight 3 book, published by Microsoft Press, and already in stores despite no date for even a 'Go live' license for this technology having been announced. In its favour it does highlight the fact that it is 'Based on' a beta on the cover. This appears along with a promise that updates will be available online. Given my previous experience of such empty promises and - forgive my cynicism - the fact the author's last blog update was back in March, I'm not entirely convinced the promise is anything more than the usual empty guff designed to encourage you to part with an outrageously high asking price of 40 dollars. Like I said, I'm bitter after my WCF experiences in this area (where one author even stopped comments on his blog to avoid addressing the issue of having sold a book and downloadable code samples that never worked!)


I would argue that Introducing Silverlight 3 is not so much a book, as an extended marketing brochure for the technology, written by someone obviously so busy in his day job he just didn't have the time required to put together AND PROOF-READ/TEST an introductory book like this. It's effectively an extended marketing brochure that you're expected to pay 40 dollars for! I could, and perhaps should, forgive it such sins. After all the title and the Microsoft Press record on these things pretty much gives the game away. But when the book contains so many inconsistencies, errors and lack of anything approaching appropriate instruction for a beginner I feel it's justified as the target for a full-on rant masquerading as a blog entry! ;-)


First, I should probably justify my 'it's a marketing brochure masquerading as a book' comment. Well, here's the book explaining the new 'Code Behind' feature of Blend 3


You can also edit the code-behind with Expression Blend 3, a new feature that wasn't available in previous versions. For example, originally the text block in Figure 1-6 had no name set. You can change this to txtHello and then open the Page.xaml.cs file.


Fair enough, you might think. But where does the author explain HOW to do this? He doesn't! He moves onto some other subject in the next paragraph. The book is too much 'you can' not 'you do'. Given the fat volume's 356 page count I'd expected rather more, but with each sentence being presented as a new paragraph (I reformatted the above italicised snippet from two different paragraphs) it's not hard to see how the seemingly high page count and volume thickness has been achieved.


I could perhaps forgive the lack of real 'meat' if what little meat that was presented wasn't so obviously out-of-date - even at this early stage where we're still in beta and not all changes to the core product have been made! But any newbie is going to get totally confused by the so-called explanations that permeate this book. The author is in a permanent state of confusion about whether the default page created in the simplest application is called Page, MainPage or MainControl!


Did ANYBODY bother proof-reading this book? (that's a rhetorical question, as it's obvious within minutes of starting to read it that the answer is most definitely 'No'!)


Even the most rudimentary code block appears to have been published unchecked. You want an example don't you?! One of the first code snippets shows what gets generated for you automatically in your application. It has four lines showing the auto-generated class MainPage that works for you in a default application. Which is pretty neat given that it shows the class's constructor is called Page!


Suffice to say, if you're excited about the upcoming release of Silverlight 3 (and you should be!) then the best thing to do is wait for books based on the reality of the product to be released after the release date, not this sham of a cynical exercise in making money (or over-hyping 'free book' chapter extract giveaways at costly conferences!) by exploting the current buzz around the new technology.

Thursday, 14 May 2009

Ian's Link Dump 14th May 2009

WPF/Silverlight


MVVM with Slider that Chooses Which Model to Display (Ed Tanguay)

MVVM Approach: Big Smart ViewModels, Dumb Views and Any Model (Ed Tanguay)

So What is XAMLFest?

First Virtual Silverlight Developer and Designer Network Meeting

Flash vs Silverlight on Smashing Magazine

nRoute and MVVM - A Match Made in C#

15 Excellent and Useful Silverlight Tutorials and Resources

New York Times Silverlight Kit Now Open Source

Customising DataPager

RadScheduler for Silverlight

Building a Data-Driven Expenses App With Silvrlight 3 (MSDN Magazine)

Alpha Video with Silverlight 3 Pixel Shaders

.NET


Two Fixes You Must Have for Visual Studio 2008

New Version of AJAX Toolkit

The Identity Developer Training Kit

Visual Studio 2010 Beta 1 Expected as Soon as Next Week

Grid Computing on the Cloud Platform Part 1

Entity Framework 4: What Is and Is Not Supported

Update on the Entity Framework V2 in .NET 4 and Visual Studio 2010

A Lap Around the Entity Framework from the DBA's Perspective (screencast)

Sneak Preview: N-Tier Development with Entity Framework V4

Microsoft Visual Studio AJAX Profiling Extensions Power Tool

Why Messaging #4: So How's It Going?

Windows 7


Installing Windows from a Flash Drive

Web


Styling Your Lists

Video


Learn to Create the Film Look

Design


The Evolution of a Web Site Design (StackOverflow DevDays)

Six Things to Think About When Building a Web Site

10 Ways to Launch a New Blog with a Bang

25 Logos with Hidden Messages

10 Things to Check Before Using a Captcha

Wednesday, 13 May 2009

Ian's Link Dump 13th May 2009

WPF/Silverlight


How to Show the High Score of a Silverlight Game on a Web Site from a Different Server

Silverlight ClipToBounds - Can I Clip It? Yes You Can!

Silverlight ValidateXAML Error

Silverlight Using WCF with Windows Authentication

SQL Server Value Tool Written in Silverlight

New York Times Switches from WPF/Silverlight to Flash and AIR for Reader 2

Silverlight Unit Testing, RhinoMocks, Unity and Resharper

An MVVM Structured WPF Application with Timer

CoverFlow - Built Using Silverlight 3's Projection Feature

Matchingo - A Silverlight Memory Game (using PRISM, MVVM, Dependency Injection, Unit Tests)

Pineapple Upside-Down Chart (How to: Invert the Axis of a Chart for 'Smaller is Better' Scenario)

Notes on Aricle: MVVM Toolkit Documentation from Codeplex (Ed Tanguay)

Logging Navigation in the Silverlight 3 Beta

Expression Blend 3: Trying a Drag and Drop Behavior Part 2 (Mike Taulty)

Silverlight 3: Template Binding vs Relative Binding

.NET RIA Services Simplifies Web Development Efforts

Silverlight 3 RIA Services: DataForm, Validation

'RoutedCommands and RoutedEvents are not used in MVVM' (StackOverflow Discussion)

.NET RIA Services ViewModel Pattern Part 2: Testability, Server Mocking and Dependencies (Nikhil Khotari)

.NET


Announcing the SQL Server 2008 Developer Training Kit

SQL Server 2008 Developer Training Kit (MS Downloads)

SQL Server 2008 R2 Announced

Adding Captcha to Your Web Forms

Why These jQuery Worst Practices Aren't!

Sneak Preview: Model First in the Entity Framework 4.0

Sneak Preview: Deferred Loading in Entity Framework 4.0

IE8: Nine Things You Didn't Know You Could Do

Free Products from Telerik

Web


Google Search now Supports Microformats and Adds 'Rich Snippets' to Search Results

Ten Usability Heuristics

12 Breeds of Client and How to Work With Them

Agile Processes


Pomodoro Technique Illustrated (free ebook)

Pomodoro Timer for PC

Design


Free 'Futurista' icons

Sunday, 10 May 2009

Ian's Link Dump 10th May 2009

WPF/Silverlight


'Odin' Unit Test Runners for the Silverlight Unit Test Framework

Document Toolkit for Silverlight 2 and Silverlight 3

Silverlight Toolkit Overview Part 3: Theming

Creating Circular Rotating Text in Expression Blend (Silverzine)

Silverlight Slider that Snaps to Rounded Value When Dragged

User-Initiated Actions in Silverlight

'Great video about using Silverlight Graphics

Programming Silverlight with the Core CLR

Colorful Expression Add-in for Blend and Design

Supporting ScreenReaders in Silverlight

Microsoft


Windows 7 Upgrade Advisor Beta

15 Things You Need To Know About Windows 7

Design


Is Information Visualisation the Next Frontier for Design

50+ Posters 'Graphics Design is...'

Color Tools, Resources and Tutorials for Photoshoppers

Ian's Link Dump 9th May 2009

WPF/Silverlight


New Training Resources on Silverlight

Debugging Silverlight in IE8 (on Windows 7)

How to Define the Stule of the Selected Item in a XAML ListBox or ListView

Expression Blend 3: Trying a Drag-and-Drop Behavior (Part 1) (Mike Taulty)

Flash vs Silverlight: What Suits Your Needs Best?

Beat Box Application Part 3: Playing Media Elements

Other Microsoft


SysInternals on the Web

Update Live Template for NUnit in Resharper

jQuery Worst Practices

Windows 7 RC1: 10 Things You Need to Know

Web


Mozilla Labs Prism (turn any web site into a Prism application)

How to Get Started with iPhoen Development

Design


30 Cool Creative Cartoon Character Tutorials

Monday, 4 May 2009

Ian's Link Dump 5th May 2009

WPF/Silverlight


A Quick Note on Namespaces in Silverlight/WPF

'Convert Brush to Resource' button in Blend 3

Getting the Most out of the Vector Tools in Expression Design

Using Vector Graphics from Office Clip Art in Silverlight/WPF Apps

Using Wikipedia as Clip Art Source for Silverlight/WPF Apps

ASP.NET Membership and Roles in Silverlight 3

Notes on Blend and Expression Video Tutorials

XPath (barely) in Silverlight 2

Validation - Hey, You're Done (Silverlight 3) (Jesse Liberty)

Data Binding Data Validation in Silverlight 2 (Jesse Liberty)

More Validation Fun - But Not Done Yet (Shawn Wildermuth)

Silverlight DataGrid Control

Add a WMS Layer in Silverlight

WPF/MVVM - How to Get Data in Design Time

WPF Discussion 1st May 2009

Brian Noyes on Selecting the Right Client Technology (video)

MIX09: Principles of Microsoft Silverlight Animation

.NET


Getting Started with Azure .NET Services Platform

Using jQuery with Client-Side Data Binding Templates

Video


The Best Adobe After Effects Tutorials

Design


Pro Tips to Breathe New Life Into Your Web Site

Star Trek Icons for Free Download

Best Tutorials for Cinematic Visual Effects

Large and Growing Collection of Free Photoshop Brushes

Ian's Link Dump 3rd May 2009

WPF/Silverlight


Rooler Utilities for Measuring and Analysing On-Screen Graphics (Peter Blois)

First Smooth Streaming User-Generated Content

Silverlight Error Codes Explained

Silverlight Beat Box Application Part 2: Custom Panel Hit Testing

MIX09: Sharing Skills and Code with Silverlight and WPF

.NET


Problem with the Azure Training Kit's IntroAccessControl Hands-On-Lab

Microsoft Source Analysis aka StyleCop

CheckboxList Client-Side Validation Using jQuery

How to Create Tabs with jQuery UI

Saturday, 2 May 2009

Ian's Link Dump 2nd May 2009

WPF/Silverlight


15 Excellent and Useful Silverlight Tutorials and Resources

Extending Silverlight's Mouse Events

SilverlightContrib Star Selector Control Updated

Integrating Silverlight 3 Polling Duplex with Unity Container

Silverlight UK User Group #7 Meeting Agenda Posted

Silverlight Smooth Streaming Showcase Site (720p movie trailers)

Star Wars Crawler in Silverlight 3

.NET


DotnetBlogEngine (Open Source Blogging Engine Written in .NET)

Script and CSS Management in ASP.NET MVC part 2

Other Microsoft Related


90 Videos Added to 'Essential SQL Server 2008 For Developers' Workshop Online

IE8 Installation: The User is in Control

Design


15 Best Places to Get Inspirational Web Designs

20 Excellent Javascript Navigation Techniques and Examples

7 Surefire Web Design Styles That Work

HTML, CSS, PHP, jQuery Killer Tutorials

The Effective Strategy for Choosing Right Domain Names

Design a Beautiful Web Site from Scratch

Free Font: Whiteboard Modern Demo

Ian's Link Dump 1st May 2009

WPF/Silverlight


Model-View-ViewModel Toolkit v0.1 Released

Switching Pages and Passing Parameters in Silverlight

Register Silverlight Controls with Visual Studio and Blend

WEB09 - Silverlight and Blend in Auckland, New Zealand (Tim Heuer)

Expression for Art's Sake: Silverlight and Blend in Wellington, New Zealand (Tim Heuer)

How to Use App.Config in WPF Applications

How to Make a Frameless WPF Application with Custom Close/Drag Buttons

WPF Application based on MVVM that Saves and Writes to an XML File

Locate Me and Virtual Earth Sample for Silverlight

INotifyPropertyChanged Snippets (And Why You Should Use Them Instead of Dependency Properties)

Metadata Classes (in .NET RIA Services) - A Force for Good or Evil? (Mike Taulty)

Forum Post: RIA Service or ADO.NET Data Service?

Expression Blend 3 is Sweeeeeeet

Silverlight MVP and Why I Love Silverlight

A Silverlight TextBlock with Tracking, Surely You Jest?

Silverlight Real time Swine Flu Viewer

Silverlight Real Time Swine Flu Viewer

Silverlight Animation Tip

Using SketchFlow to Create Better Prototypes

.NET


Why Messaging - Part 2: What is a Message?

GeoLocation API

IE8 'Firestarter' Videos now available

Other Microsoft


Windows 7 Setup Secrets

Miscellaneous


SCRUM Cheat Sheet

Design


60 Beautiful Design Tutorials and Resources

350 Ultimate Free Spray and Splatter Paint Brushes

Humour


The Downfall of Agile Hitler