A while back, a client asked my company if we could help them with a feature for a web application they were using. They needed to make audio recordings online. Basically the application shows off users portfolios online, and offers the ability to add comments about their work.
So far, all comments and graces have been made using text. But now they wanted to move it into a somewhat more interactive solution, making it possible to record audio comments and thoughts about the users portfolio.
And obviously, being a Microsoft focused company, we came to the conclusion that this would be an easy thing to do in Silverlight. Especially since we all know that Silverlight in later releases gives us access to the users microphone and webcam. So this would be a piece of cake…or would it…?
More...
Everyone, and by that I mean anyone that has been coding for more than a year, talks about decoupling and layers. It’s all about building an n-tier architecture, and about decoupling the layer so that they can be changed later on.
And however much I understand this, and like it, and use it, I still argue that it is sometimes overkill. And even though I definitely can argue both sides of this topic, I am not even going to get started doing so. Maybe I will in a later post, when I feel like getting flamed… :)
This post is about how decoupling your view from your view logic using MVVM can really be helpful. And I am not going to talk about how unit testing will help or anything like that. I am going to explain why MVVM is more important than just testing by showing an example…
More...
I have recently worked on several projects that have been built to utilize the Microsoft cloud platform called Azure. Azure offers a lot of really interesting benefits, and especially when it comes to being elastic. You can basically throw however much data you want at it, and as long as you are willing to pay for it, it will handle it. It doesn’t matter if you throw data at it that needs to be computed, or if you throw vast amounts of data that needs to be stored. Azure will handle it for you.
On top of that, it is really easy to build for. There isn’t really a whole lot to learn before one can get up and running in the cloud. Microsoft even offers a sweet SDK that gives you access to the cloud based services locally on your machine. It offers you the ability to deploy your webroles (web applications) straight to a local “cloud” and debug it. So you don’t even need to have an Azure account to starting to work with it.
More...
Tonight, I presented a talk about MVVM “in the real world” at the Silverlight and Mobile Developer user group on Wellington.
For those of you who were there, I am sorry that it wasn’t better organized. I just ended up with way too much work the last 2 weeks, so I didn’t have enough time to structure it all enough. I decided that it was more important to get the code built than to have a lot of PowerPoint slides.
As I did promise, I you can download the code below and I have also added the IDispatchService that I talked about as well. It will give you the ability to marshal execution back to the UI thread from a ViewModel. Just call IDispatchService.BeginInvoke() and pass in a lambda expression or a method to execute on the UI thread.
For those of you who weren’t at the user group, or were there and thought that what I said was completely impossible to understand, I just want to explain what is in the download.
More...
A couple of weeks ago…ehh…well…let’s at least call it a couple of weeks ago (it might have been longer to be honest) I posted a blog post about using push notification on the Windows Phone 7 platform. It included more or less everything you needed to start sending push notifications on the pre-beta version of the platform.
However, about a week ago (once again…+- a couple of days) Microsoft released the new beta version of the developer tools as well as the emulator. And I assume they also pushed I to the lucky bastards that already have phones.
In this new beta, they have changed the API for the notifications, and hence destroyed my previous code. So I have updated my sample to use the new tools and the new APIs. So here I go again…
More...
While working on a little MVVM thingy the other day, I ran into a sweet little piece of code that I wanted to share. I have seen several version of this around the web, but this is where I found this particular version. The piece of code gets rid of the ugly part of the INotifyPropertyChanged interface. The part where you use strings to identify what property has changed. I understand that that is how you have to do it, but it feels messy. A common solution is to add constants to hold the strings, but that is not a very much better solution. it is still messy. So how can we handle it in a safe way? Well…one idea would be to do it like this…
More...
A couple of weeks ago, Microsoft asked me to add closed captioning to the videos on the www.office2010themovie.com. And no…not automated subtitles that converts to what is said into text, like YouTube does…just subtitles from a file. This is not very complicated, not even when you add the fact that the videos are actually being streamed using Smooth Streaming. But I wanted roll it al into a control, to make it fast and easy to add subtitles to any MediaElement in future projects…
More...
A couple of weeks ago, I requested to build a code sample for Microsoft. It was supposed to make it possible to restyle a Silverlight application based on a SharePoint 2010 theme. In SharePoint 2010, theming is based on OpenXML, and saved as files with an extension of “thmx”.
But I guess the first question would be WHY you would use a huge thmx file just to restyle a Silverlight application… Well, imagine that you are building Silverlight applications that are to be used inside a SharePoint application. Imagine how nice it would be if the Silverlight applications would change appearance if you changed the theme of the SharePoint site. That way, changing the theme would not be a problem, and would not cause a whole lot of rework.
More...
[UPDATE] This post is somewhat interesting, but the idea doesn’t really work in the real world. More info HERE [/UPDATE]
I have tried to stay out of certain areas when I blog. Why? Well, simply because some things are still heavily debated, and some debates even seem a bit infected. Some topics seem to cause people to get somewhat rabid and I don’t feel like causing a big flame war of any kind. But still, I have decided to talk a bit about some of the options we have when binding our views to our viewmodels, or vice versa. I can’t even write that with out having to be careful…
More...
As I mentioned in my previous post, the CommandManager has been moved over to Codeplex. But I have actually created 2 Codeplex projects. I decided to also move the OpenXML code, that I blogged about previously, to Codeplex. It is available at http://agopenxml.codeplex.com/. Initially it is no more than a rewritten version of the code I blogged about, but my goal is to extend it as time goes by. Either by creating extensions of my own, or if I am lucky, by including extensions created by other users.
I am currently working on an article for http://www.openxmldeveloper.org/, which will be about implementing Excel functionality using the library. This article will result in code that will be merged with the current code and extend the Codeplex project with basic SpreadsheetML functionality. I will try to get this up on Codeplex as soon as possible, but I am currently on vacation and will go to Mix10 just after coming back to work. So, if I am lucky, it will go online just before Mix10. If not, it will go online just after…