.net and other musings

Ben Lovell, an agile developer living in the UK.

Category: WPF

Silverlight… Cross-platform?.

Wow! Looks like I missed this somehow… Silverlight, although being touted as “cross-platform” won’t ship with Linux compatible plug-ins. Wise move Microsoft.

I can’t see the YouTube’s (especially given how Google isn’t historically one of the great adopters of MS technology) of this world adopting  your  “cross-platform”  technology? I thought Microsoft were starting to move away from these lock-in encouraging business tactics…

At least drop the “cross-platform” misnomer!

Advertisements

ReSharper 2.5

ReSharper 2.5 has been released for VS.NET 2005. A few neat new things have been added in this release but the one I was most pleased to see is proper support for intellisense in WPF (code-behinds) at last.

If you write C# and don’t use ReSharper, seriously, you are a sadist!

denounce

I won’t say much about this as the best thing you can do is download it and take a look. Basically an ultra cool RSS reader/podcast listener with discovery functionality, all wrapped up in WPF goodness.

 Get it here.

HD video playback… WPF…

OK so it was naive to think the RTM of .NET 3.0 would magically fix our issues with HD video playback in WPF. The 1080p sample clip (which is representative of our final HD file specification) currently runs at around 1fps which probably isn’t ideal for screening content to television buyers.

Playing the content in a blank window hosting a MediaElement works OK, although even then it requires some fairly beefy video hardware but admittedly this is to be expected with HD content. The issue arises when playing the content in the context of our application.

To provide some background: the app loads all screens upon startup and transitions between them as-and-when necessary. Since all the application screens are running concurrently there is a moderate overhead for each screen, but surprisingly even when a screen isn’t the foremost/visible.

Admittedly i’m no expert when it comes to low-level implementation of WPF but it appears although the screens aren’t actually lighting pixels (i.e. visible) they’re still being composited, and this is the overhead we’re seeing. I can understand the reasons for this: by having visual elements paint from the back to the front of the display it simplifies and enables things like transparency and flexibility for clipping etc…

But not without a cost. Thanks to this, the application when sitting idle (although not strictly idle as we have timers running performing minor CPU-bound stuff) is using up about %30 CPU… Not major I hear you say but when we transition in the full screen video playback the CPU is pretty much pegged at 90%+ when playing our HD content, which then drops frames and induces headaches/nausea for anyone watching.

.NET 3.0 has RTM’d!

That most excellent of frameworks, .NET 3.0 has RTM’d at last. Downloading now as I type this post, lets see if it fixes the issues we’ve had with video playback /me prays…

Including WPF intellisense when using ReSharper

To correctly include intellisense for WPF elements when using VS2005 and ReSharper right click your project and click the show all files icon, when the “obj” folder appears right click this and choose “Include In Project”.

Day errrrmmm: The finished product

Ok well due to lack of WiFi in the hotel I was staying in and other commitments my blogging took a slight nosedive during the WPF developments! Anyway, I’ve posted some screen grabs of the finished proof-of-concept product. I’ll post an explanation of what exactly it is within the next day or so!

Search

Little Britain

Planet Earth

Homepage

Feedback

Day 3: Control Templates, Styles & Databinding

So day 3 is over. I’ve spent most of the day creating a custom WPF control to display and let the user chose a selection of events they wish to attend. Throughout the day i’ve been looking at several WPF concepts: control templates, styles, data-binding and triggers. It amazes me how powerful and flexible these concepts are.

Work is split among the other developers, both BBC Worldwide (of which there is one: Darren) and the other three to five Microsoft guys depending on who is there at the time. Everyone seems to be making great progress so far and some of the more complex controls are really coming together (thanks to the Microsoft guys!). Added to this our designer (BBCWW web designer) is producing some really fantastic looking mock-ups for the visual styles.

I spent some of the day trying to draw up some specs for adequate PC’s and monitors to be used in the kiosks. We’re sourcing our hardware from one of Microsoft’s chosen hardware partners Hewlett Packard. I have been looking at small form factor base units, needed to fit in the cabs designed for the kiosks. The machines obviously need some horse power in the graphics department and we’ve specified a preference for DX9 compliant cards with 256MB memory.

The kiosks will initially run Windows XP SP2, it is envisaged that at some point in the future the app will run on Vista units, however, in the app’s current guise the user has no desktop interaction so the benefits of this will only run to deployment of hardware and increased control of machine lockdown via group policy (which has been increased in Vista so i’m told).

I can’t wait for some of the stuff we’ve been doing to come together…

Day 2: Interesting

So I’ve been at Microsoft now for two days with a few of their guys at the MTC working on the proof-of-concept I’d previously mentioned. I’m not sure how much I can talk about the actual purpose of the application right now, however, it’s being designed as a kiosk type app using WPF and the rest of the .NET 3.0/WinFX stack.

The whole engagement with Microsoft has been an excellent experience so far. The proof-of-concept development is precluded by an ADS session where stakeholders, developers or pretty much anyone else representing your business with an interest in the output of the POC gets the opportunity table their vision for the application. During the three day ADS we pretty much covered all the nice-to-haves and proof points for the application and defined a pretty clear scope for development.

Following the ADS, two UX consultants from the MTC spent three days at BBC Worldwide with representatives of our significant business areas and myself covering off the actual UI design and scenarios to take through the application. Between us we thought up some really compelling concepts for the UI and a set of clear deliverables by way of actual screens and controls which would need to be developed to facilitate our requirements.

Bringing you back up to date — we’ve split a good portion of whats required between us and are all badgering away at the individual controls. I’m hugely impressed with WPF so far, it has a fairly small learning curve and most things kind-of work as you’d expect them to which I consider a sign of good API design.

I think WPF will ultimately live or die by the tool support and thankfully the Expression packages are looking very promising. It seems as though we will finally knock down that notional wall between development & design.

Anyway I’ve had a long day 😉 I’ll report back tomorrow evening with the days events!