Accessing Azure Development Storage from Silverlight
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...
Code for the SLAMD session tonight
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...
Windows Phone 7 Push Notifications Revisited
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...
Cool INotifyPropertyChanged implementation
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...
Subtitling videos
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...
Using SharePoint thmx files to style Silverlight
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...
Binding Views and ViewModels
[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...
Codeplex bonanza… OpenXML library hits Codeplex…
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…
The CommandManager that never dies…and ends up on Codeplex…
The other day, a reader called MAX pointed out to me that the CommandManager has a major flaw. It stores all commands in a static list. This keeps the garbage collection from working as it should, as the commands are always referenced. The commands in turn reference the controls that use them. So the CommandManager actually keeps any control that uses commanding from being GC:ed. So, because of this, I have changed the CommandManager code once more. This time however, I have not just added some information here and posted the new code for download. Instead, since the CommandManager seems to never die, I have put it on Codeplex making it available at http://agcommandmanager.codeplex.com.
The CommandManager never dies? …have I forgotten about Silverlight 4? No, not at all. Silverlight 4 has a bit of commanding built into it. It supports binding ICommands to Command properties on some controls, such as Buttons. This is great and will definitely limit the need for the CommandManager. The CommandManager has one thing that Silverlight 4 does not have. It supports binding ICommands to more or less any event. So if anyone needs this kind of flexibility, the CommandManager is the way to go…
Update to the multi-touch development intro
I am apparently a completely useless mathematician, which I actually already knew. I apparently also suck at testing my software before putting it on my blog. There was an error in the TrigUtiltity which caused the application to work less than perfect if we put it like that. And since nobody has complained, I assume that nobody has actually downloaded the code. Or everyone that has, has found the error and fixed it without telling me. Anyhow, this post is now updated and the download is fixed… DarksideCookie.TouchDemo.zip (135.45 kb)