I recently had cause to look into running dynamic SQL on WP7 for a customer. On a desktop this is easy, you just run some SQL statements through ADO.NET and you’re sorted. On Windows Phone 7 it’s a little trickier. This is because WP7 only exposes LINQ to SQL and it doesn’t support arbitrary SQL execution against your SQL CE databases.

So how to handle it when you have a corrupt DB and want to send a fix to a remote device or you just want to update the DB with some new data.
Continue reading »

 

One of my colleagues recently asked me to look into connecting to a SharePoint site running on Office 365 from a Windows Phone 7 application. Now this is something that the phone has native support for but in this case he wanted to be able to build an application that had added functionality and then called into the SharePoint web service APIs to extract data from SharePoint.
Continue reading »

 

For those people that attended my TechEd Europe session on end to end development in WP7, here is the source code for my demos.

In order to run the demo code you will need VS2010, WP7 SDK, Azure SDK.

Continue reading »

 

Just a quick note to say I’ll get the code from my TechEd session uploaded within the next few days so check back next week.

 

I’m currently prepping for my TechEd Europe WP7 session and I like to prepare for the worst. My demo relies on some cloud services and also on WP7 push notifications. Push notifications are nice but they have one drawback for demos, I need an internet connection.

Now in the real world my application would indeed need an internet connection or it would actually be kind of useless, but in demoland I don’t need one as I can run the cloud services portion in the Azure DevFabric which is nice in case the internet connectivity in the demo room goes down, I have a backup.

The same isn’t true of push notifications, they are managed by Microsoft and if I can’t get to them I can run my demo even though my own cloud services are running locally. In order to get around this I wrote a simple WCF service that also runs in my Azure DevFabric along with my other services that can act as a push notification endpoint. It’s not totally seamless but it works quite nicely for me as I now have a fallback for push notifications as well as for my own cloud services. Continue reading »

 

I recently had a query from a customer that was one of those ones that you think “Aha! That’s easy, you just do this”. Then you think a bit more about it and realise that if you want to do it properly it’s not quite as simple as you first thought.

This particular query related to how to use the navigation framework introduced in Silverlight 3 with the MVVM pattern. For those that don’t know the Model-View-ViewModel pattern is a common pattern often used to build Silverlight and WPF applications since it has strong support for databound UIs and provides good abstraction for unit testing and keeping your view logic separate from the view and the model.

Continue reading »

 

In the first part of this article I discussed how to profile applications using the command line tools for Visual Studio. In this part I’m going to discuss how you can interpret the results from the profiling.

I’ve put together a small sample application that does a few maths calculations and ran the profiling tools in VS2010 against it. Once you have the the .vsp file that the profiler gives you all you need to do is open it in VS and away you go.

The first thing that you will see in VS is the summary report. This looks something like the one shown here. Continue reading »

 

I used the BlogML importer plugin from http://dillieodigital.net/2010/07/03/blogml-importer to import my BlogML from Subtext. However the output from Subtext included Base64 encoded content so I wrote a little C# application to convert the Base64 decode the content before importing it.

The source code is below, the usual caveats about if it blows up your computer don’t blame me etc. apply.


using System;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace UnBase64BlogML
{
    class Program
    {
        static void Main(string[] args)
        {
            XDocument doc = XDocument.Load(@"blogml-b64.xml");
            XNamespace blogML = "http://www.blogml.com/2006/09/BlogML";

            var query = doc.Descendants(blogML + "content")
                .Where(node => (string) node.Attribute("type") == "base64");
            foreach(var item in query)
            {
                string content = Encoding.UTF8.GetString(Convert.FromBase64String(item.Value));

                item.SetValue(content);
            }

            doc.Save(@"blogml.xml");

            Console.WriteLine("Press a key to continue");
            Console.ReadKey(true);
        }
    }
}
 

Ok I bit the bullet and moved to WordPress. I’ve been avoiding it because it’s the main one people use and I like being a little different. In the end though the support for 3rd party publishing apps, the number of plugins and themes etc meant that I’ve done it at last.

All of the posts and comments + RSS feeds etc should have now been moved across but let me know if you notice any problems.

 

VS2010’s built in extensions manager is a really nice addition. There are already a lot of very good plug-ins available on it. Here are some of the ones I have installed that I find useful, you might too. Normal caveats apply about me not being responsible if one of these plug-ins causes your computer to catch fire and runs off with your wife/husband etc.

VS2010 Plugins

*updated* with new plug-ins.

© 2012 Rob Garfoot's Blog Suffusion theme by Sayontan Sinha

Switch to our mobile site