Technology Blog

Feb 24

Windows Phone 7–Shake It Like You Mean It!

icon February 24th, 2011 by Alex Blount

Shake Gesture Library Now Available

 

image_thumb27When developing applications for Windows Phone 7 you have access to vast amounts of information about the device through its sensors. One of these is the accelerometer  which can give you information on where the device is moving within 3D space, this can be utilised in many different ways, the most prominent of these being in gaming.

There are however many other ways to use this information, you may want a user to be able to shake their device to update their  twitter list instead of pressing a button, or many other implementations like this.

To make this easier to do you can now use the Shake Gesture Library which is available to download from the AppHub  and there is also a great overview on the Windows Phone Developer Team Blog.

 

The Magic Eight Ball App

 

To show how easy this is to use, lets write a simple app, I want to  ask my eight ball a question, shake my device and have an answer appear.

  • Create a new Windows Phone 7 project in Visual Studio:

NewProj

  • Create a UI which has an image of an eight ball with a TextBlock hovering over the top to show the answer.

 MagicEightBall - Microsoft Visual Studio (Administrator)

  • Add initialisation of a List<string> to hold our responses

MagicEightBall - Microsoft Visual Studio (Administrator) (2)

  • In the Loaded event of our page add the handling for the shake gesture using the Shake Gesture Library.

MainPage

 

That’s our App done, your Windows Phone 7 can now impart you with the knowledge of the Universe. Go Shake!!

Download the sample

Feb 21

Silverlight for Windows Phone Toolkit–February 2011

icon February 21st, 2011 by Alex Blount

A refresh to the Silverlight Toolkit for Windows Phone was released a few days ago which contained along with a few bug fixes some cool new features:

  • TiltEffect
    • Gives you the ability use an attached property to apply a cool tilt animation to most UI Elements.
  • PerformanceProgressBar
    • A highly performant version of the built in ProgressBar
  • VB.Net samples
    • Sample projects for Visual Basic developers

You can download the bits HERE

Jan 20

After presenting at the Bing Maps User Group recently in which i discussed how to implement a custom mapping tile layer using the Deep Earth Silverlight control (http://deepearth.codeplex.com) and the Cloudmade mapping service (http://www.cloudmade.com) I began thinking about using this method to create a mapping application for Windows Phone 7 which more fits in with metro theme.

image

To begin with let’s have a look at the app we are going to build, as you can see the tiles being displayed are completely different to the standard Bing Maps tiles. Not only are you able to choose from thousands of pre-set map styles but you can also create your own too!

Ok lets kick off building this, to begin you are going to need to head off to the Bing Maps Portal to sign up and create yourself an application key. Once you have done this head off to CloudMade and create yourself a developer account. We are now in a position to actually write some code, create a new WP7 project and add a reference Microsoft.Phone.Controls.Maps.dll. We can now add some code to our MainPage.xaml as below.

Add two namespace statements to the top of the page:

xmlns:maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"

 

xmlns:core="clr-namespace:Microsoft.Phone.Controls.Maps.Core;assembly=Microsoft.Phone.Controls.Maps"

 

Then add a map control to the page also, setting the map mode as below:

 

<maps:Map CredentialsProvider="{Enter Your Bing Maps Key Here}"

 

VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Row="1" Name="map1" >

 

    <maps:Map.Mode>

 

        <core:MercatorMode></core:MercatorMode>

 

    </maps:Map.Mode>

 

</maps:Map>

 

If you run the application at this point you will not see a great deal of anything, in effect what we have done is turn off the standard Bing Map tiles. We now need to create our custom tile provider to serve the tiles from CloudMade to our app using the code below:

public class CloudMadeTileSource : TileSource

 

{

 

    private const string _tilePath= "http://{S}.tile.cloudmade.com/{creds}/{style}/256/{Z}/{X}/{Y}.png";

 

    private readonly Random _rand = new Random();

 

    private readonly string[] TilePathPrefixes = new[] { "a", "b", "c" };

 

    public string CloudMadeCredentialsProvider { get; set; }

 

    public string CloudMadeMapStyleId { get; set; }

 

    public override Uri GetUri(int x, int y, int zoomLevel)

 

    {

 

        string url = string.Empty;

 

        string prefix = string.Empty;

 

        prefix = TilePathPrefixes[_rand.Next(3)];

 

        url = _tilePath;

 

        //Randomize to different OSM Servers based on URL prefix

 

        url = url.Replace("{creds}", CloudMadeCredentialsProvider);

 

        url = url.Replace("{style}", CloudMadeMapStyleId);

 

        url = url.Replace("{S}", prefix);

 

        url = url.Replace("{Z}", zoomLevel.ToString());

 

        url = url.Replace("{X}", x.ToString());

 

        url = url.Replace("{Y}", y.ToString());

 

        return new Uri(url);

 

    }

 

}

Here we are inheriting from the TileSource class and overiding the GetUri method which gives the mapping control the uri to the image file for a tile on the map. this is done by taking a URL which has placeholders for the important pieces of information the CloudMade system requires which is described very well on the CloudMade site. we also have properties for setting the CloudMade credentials and style id so these can be set in xaml.

We can now add a a reference to this class in our xaml as so:

xmlns:local="clr-namespace:StylisedMap"

 

Then add the TileSource to the map in our xaml:

 

<maps:Map CredentialsProvider="{Enter Your Bing Maps Key Here}"

 

    VerticalAlignment="Stretch" HorizontalAlignment="Stretch"

 

Grid.Row="1" Name="map1" >

 

    <maps:Map.Mode>

 

        <core:MercatorMode></core:MercatorMode>

 

    </maps:Map.Mode>

 

    <maps:MapTileLayer>

 

        <maps:MapTileLayer.TileSources>

 

            <local:CloudMadeTileSource

 

CloudMadeCredentialsProvider="{Enter Your CloudMade Key Here}"

 

CloudMadeMapStyleId="{Enter Your Chosen Map Style Id Here}" />

 

        </maps:MapTileLayer.TileSources>

 

    </maps:MapTileLayer>

 

</maps:Map>

If you now build and run the application you have a working Bing Map Windows Phone Application with custom map tiles. Enjoy!!

You can download the sample project here.

Dec 14

Uncharted Territory

icon December 14th, 2010 by  

A recent ASP MVC 3 project has required us to create some simple charts. As it’s a .NET 4 project we hoped to use the lovely new charting controls provided by Microsoft. You can read all about them in Scott Guthrie’s blog here and as you can see they look very pretty and appear simple to implement.

NastyPieThat was the theory at least. There is a simple tutorial on how to use the controls in an MVC project here. The problem is that the output looks nothing like the charts in Scott Gu’s blog - far from it in fact with no fancy 3d effects and as a bonus nasty jpeg compression artefacts appear. While eliminating the compression artefacts is straightforward, (pass the write method a parameter of “.png”) gaining control of the styling is far more convoluted process.

The style of the charts is controlled by the chart.theme parameter, with only four themes available. None of them are terribly exciting and there are no obvious methods for customisation. So far so disappointing. Viewing the class definition in Visual Studio reveals that ChartTheme is a static class with each theme being a constant, declared as a string that appears to be XML mark-up. We wondered if it would be possible to extend this class, adding our own new themes along the way. Incredibly, it’s possible to do exactly that by creating a static partial class that mirrors the original with the exception of the tweaks we want to make to the XML.

Vanilla theme from ChartTheme

 public const string Vanilla = @"<Chart Palette=""SemiTransparent""
BorderColor=""#000"" BorderWidth=""2"" BorderlineDashStyle=""Solid"">
<ChartAreas>
    <ChartArea _Template_=""All"" Name=""Default"">
            <AxisX>
                <MinorGrid Enabled=""False"" />
                <MajorGrid Enabled=""False"" />
            </AxisX>
            <AxisY>
                <MajorGrid Enabled=""False"" />
                <MinorGrid Enabled=""False"" />
            </AxisY>
    </ChartArea>
</ChartAreas>
</Chart>";
Of course making those XML tweaks really isn’t easy – there’s a lot there and a trial and error process is always time consuming. Furthermore, guessing missing parameters hasn’t ever really worked well for me in the past and I don’t anticipate psychic coding to bear fruit in the future either.

At this point it seemed sensible to have another look at Scott Gu’s blog. It contains a sample project that demonstrates the features of the ASP.net chart controls. This gives us a way of generating the xml we need to theme our charts. It also has a sort of WYSIWYG editor for each chart so we can style the chart to our taste. The Chart class includes a SaveXml method that predictably saves the chart to an xml file. Inserting a call to this method generates the xml we need for our partial class.

Strip out all the data, leaving just the formatting information and there you have it – a chart theme you can reuse throughout your MVC project. Here is the code for a tasteful pie chart…

public const string JMW3D = @"

<Chart BackColor=""WhiteSmoke"" BackGradientStyle=""TopBottom""
BackSecondaryColor=""White"" BorderColor=""26, 59, 105""
BorderWidth=""2"">
  <Series>
    <Series ChartArea=""Default"" Font=""Trebuchet MS, 4.25pt,
style=Bold"" ChartType=""Pie""  Name=""Default""
Legend=""Default"" XValueType=""String"" YValueType=""Double""
Color=""220, 65, 140, 240"" BorderColor=""180, 26, 59, 105""
CustomProperties=""DoughnutRadius=60, PieLabelStyle=Disabled,
PieDrawingStyle=Concave"">
    </Series>
  </Series>
  <ChartAreas>
    <ChartArea Name=""Default"" BackColor=""Transparent""
BackSecondaryColor=""Transparent"" ShadowColor=""Transparent""
BorderColor=""64, 64, 64, 64"" BorderWidth=""0"">
      <AxisY LineColor=""64, 64, 64, 64"">
        <MajorGrid LineColor=""64, 64, 64, 64"" />
        <LabelStyle Font=""Trebuchet MS, 8.25pt, style=Bold"" />
      </AxisY>
      <AxisX LineColor=""64, 64, 64, 64"">
        <MajorGrid LineColor=""64, 64, 64, 64"" />
        <LabelStyle Font=""Trebuchet MS, 8.25pt, style=Bold"" />
      </AxisX>
      <Area3DStyle Rotation=""0"" />
    </ChartArea>
  </ChartAreas>
  <Legends>
    <Legend LegendStyle=""Table"" Name=""Default""
IsTextAutoFit=""true"" BackColor=""Transparent""
Font=""Trebuchet MS, 8.25pt, style=Bold"" Alignment=""Center""
Docking=""Bottom"">
    </Legend>
  </Legends>
  <Titles>
    <Title Font=""Arial, 10.25pt, style=Bold"" ForeColor=""black""
ShadowOffset=""0"" ShadowColor=""32, 0, 0, 0"" Name=""Title1"">
    </Title>
  </Titles>
  <BorderSkin SkinStyle=""None"" />
</Chart>";

NicePieAnd it’s results:

It’s admittedly one of the most round about methods I have used for doing, well anything. But it works. Feel free to download a sample project file containing a couple of examples in full.

Sep 13

Windows Phone 7 And IPhone - Sharing Code

icon September 13th, 2010 by Alex Blount

A Match Made In C#

 

I got very exited when i began learning Objective-c, the prospect of being able to write native IPhone apps was very attractive to me. I don’t know why i got exited but like a large proportion of developers (based on the 200k + apps in the store) i did and i set out to conquer the beast.

I am now two commercial apps in using Objective-c and XCode and i am starting to feel like there must be a better way of going around this, With Windows Phone 7 on the horizon and a large user base of the Android platform out in the wild i want to get as close to write once and reuse everywhere as is physically possible. But how is this possible when each platform has its own Language, Framework and IDE?

Enter Mono, this excellent project which allows you to write, build and deploy .net code to non Windows platforms which is spearheaded by Miguel de Icaza means you can now write a large proportion of your code once and it can be reused on the 3 mobile platforms.

To give you an example here is a walkthrough of how you may go about doing this:

note: To follow the below guide you will need a Windows machine with Visual Studio 2010 and the Windows Phone 7 Beta tools installed, also a Mac with the IPhone SDK, MonoDevelop and MonoTouch installed.

 

Open Visual Studio 2010 and create a new Windows Phone 7 project, I have called the project “CodeSharing.WP7” and the solution “CodeSharing”.  I have created this solution in my drop box folder to share with the Mac i am going to be using but when creating a real application this would be done using a version control system.

New WP7 Project

Add a Button called “btnSayHello” and a TextBlock called “txtHello” to the MainPage.xaml.

WP7UI

Right click on the solution and add a new project, select Silverlight Class Library and make sure you have .Net 3.5 selected. When given the Option choose Silverlight 3. I have called this project “CodeSharing.Shared”.

AddSharedProject

Add a class to the new project called “HelloMobiles” and add the code to the class which is below:

ShaedCode

Now in your Windows Phone 7 project add a reference to the new Class Library then add a click handler to the btnSayHello by double clicking it in the designer. You can then add the code below:

WP7ClickHandler

If you now hit F5 and click the button you will see that it has pulled the text through to the TextBlock:

WP7EndResult

So nothing special so far, we have created a very basic Windows Phone 7 Hello World application, so onto the good bit.

If we now open up the solution in MonoDevelop on the Mac you will see the following:

Screen shot 2010-09-13 at 10.37.20

The solution has opened fine but the Windows Phone 7 project has not loaded, This is not a problem as we are going to be adding an IPhone project. Right click on the solution and add a new project. Under the C# menu select IPhone Window-based project.

Screen shot 2010-09-13 at 10.44.33

Once the IPhone project is created add a new IPhone View with Controller called “MainViewController” and then double click on the MainViewController.xib to edit the view in Interface Builder. I am not going to go into here how you create the UI but there is a great tutorial here. You will end up with a view looking like below and outlets for the UIButton and the UITextField specified on your view controller.

Add a reference to the compiled dll of the CodeSharing.Shared project (you cannot add a reference to the project itself as MonoDevelop says that the project is incompatible) and add the following code to the ViewDidLoad method of the MainViewController code behind.

 

Screen shot 2010-09-13 at 11.17.57

And make the FinshedLaunching method in the Main class look like the following:

Screen shot 2010-09-13 at 11.18.35

Set the IPhone project as the start up project and you are good to go.

 

This method is definitely not the best way going about this but it does give you an idea on how we can reuse code between many different mobile platforms using C# and Visual Studio 2010. I am particularly looking forward to getting my hands on MonoDroid so i can start writing Android apps too.

 

Download the sample code here.

Jun 7

 

For many the decision to attend the Microsoft organised two day event was a trivial one, the campschance to learn the most up to date web technologies available in the Microsoft stack for FREE is not something to be sniffed at.

I on the other hand had some concerns. I would not have previously classed myself as a “Country Bumpkin” but since my visit last weekend to the Capital I would say that this is a reasonably accurate classification.

To say that I was worried about the commute would be an understatement, In my head the commute to London was a kill or be killed trample-fest, I do not know where I had gained this mental picture but none the less it was there.

A friend of mine gave me a list of rules to live by, which I did not understand until after my first commute experience, these rules follow in the hope they can help anyone else in the same situation:

  • Stand on the right hand side of the escalator, walk FAST on the left.
  • Morden is in the south, Hendon in the north.
  • Don’t eat the gum you find on the streets, it’s not free candy.
  • Buy a Big Issue, but don’t pay panhandlers.
  • Well known sandwich stores are over priced, look for taxi cafe’s.
  • Tube it, busses are too confusing, taxi’s are too expensive.

I can honestly say though that my nightmare was not realised and I found the experience to be an overall pleasant one.

returning to the event, the WebCamps ethos is to “Learn” then “Build”, this method of teaching seemed to work extremely well especially catching the imagination of everyone who attended the second “Build” day. Some great applications were built along with some excellent friendships.

Day 1 – Learn

LearningDay

Day 2 – Build

Building

Day 2 – Presenting

Presenting

Our team chose to build an application that would be used to arrange and share journeys If you are ever stranded by let’s say for instance a large cloud of ash. You would use this application to enter your journey details which would then be matched to journeys entered by other users. At this point you could contact any matched user to hopefully share a car or bus.

The schematics for this project are here and the CodePlex site is here. The project was undertaken in ASP.Net MVC 2 using Entity Framework 4.

Technology Studio takes prototyping very seriously and an explanation on why and how we do this can be found here.

I would like to thank Jon Galloway and Christian Wenz for an excellent job presenting and support throughout the build. Also Saqib Shaikh from the Bing team who joined our build team and was an amazing person to code with.

Aug 30
51Y PtFdqNL._SL160_

I read the Wrox Professional Silverlight 2 for ASP.NET Developers book about six months ago as my first in-depth introduction to the world of Silverlight, so was looking for a book that could get me up to speed quickly on the new features of Siverlight 3. Having read plenty of Wrox books in the past I looked for their latest and happily found Wrox Silverlight 3 Programmers Reference which looked like it could help me catch up with the latest release.

When the book arrived two things struck me immediately, one it was a bigger book that I was expecting (see more about this later) and two it was in FULL colour. Now you may be saying “full colour, so what?” but believe me, having all the code samples look exactly like they do in Visual Studio, and full colour screenshots of Blend make a massive difference. Every developer I have shown the book to has immediately been impressed by the change and I can only hope this is the future for all technical books.

The book is written by five authors, which to be honest is something I try and avoid if possible when choosing a book as there always seems to be some consistency issues. However, I can appreciate the world of Silverlight requires a lot of skills and finding one person who has all these would be a tough call. I was impressed, however, to see the authors are all developers at Infragistics and it’s great to see such a high profile company committed to helping the developer community. I did notice a reasonable amount of what seems unnecessary repetition in different sections (for example two almost identical sections of Isolated Storage) but it’s always good to have concepts reinforced in a book this big.

There are a few notable chapters in the book that try to widen the understanding of developers about the roles and processes involved in a typical Silverlight development team; especially how designers, developers and integrators work together. There is also a great section on paper prototyping of Silverlight applications including the initial evolution of the design. However, it was strange to see no mention of the new Sketchflow features in Blend 3 and I can only assume these were not known about at the time of writing. Hopefully any future editions will rectify this.

Of course there are a few things, as in every book, I’d think about changing. Firstly the title “Wrox Silverlight 3 Programmers Reference” personally I think the name implies a relatively short book that can be used to dip in and out of when required. Now, it is possible to use the book in that way but really it is a complete guide to Silverlight from the basics to example applications, for someone with existing .net / c# skills. The other feature that was disappointingly missing from the book was any highlighting of the new Siverlight Features. I was hoping to be able to flick through the book, brush up on a few things and read up on the new features but there is no visual highlighting and sometimes even no mention that particular features have been introduced in Silverlight 3.

Overall, this is a really solid book for learning Silverlight development in c# and some basic skills in Blend. There are a few parts of the book that could do with more editing to make a more consolidated read and a few missing features (like Sketchflow and highlight new Silverlight 3 features) that could be added in future versions but none of these change the fact that if you are looking to learn Silverlight this is a great book to start with.

Get yourself a copy at Amazon

Jun 2

We have recently being doing a lot of work with Windows Azure and Silverlight and have found deployment one of the most involved aspects of Azure development. Building and deploying an Azure app currently takes up to 30 minutes and is not the simplest of processes so having to re-deploy every time you make a change to your Silverlight project can start to become a real pain.

So what’s the answer? One answer is to separate your Silverlight XAP file from the Azure project by adding your Silverlight XAP file to the Azure Blob Storage. You can then update your Silverlight host page to download the XAP file directly from Blob storage.

This means you can just upload the latest Silverlight XAP file to Blob Storage and be up and running in a few minutes.

Below is a quick tutorial showing you how to do this:

Step 1 – Getting your Silverlight application ready for external hosting

If you just upload your current Silverlight XAP file to Blob storage and try and include it in your page you will find the page shows the loading screen, right up to 100%, and then just sits there. This is because your Silverlight application needs to be told to allow it to be hosted on a different domain that the Silverlight XAP file is hosted on. Your Azure application will be on myname.cloudapp.net but your XAP file will be hosted at myname.blob.core.windows.net.

To set the Silverlight project to allow external hosting open the App.manifest file (found in “Properties” folder of your Silverlight project ) and add the “ExternalCallersFromCrossDomain” attribute to the xml as follows:

   1: <Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
   2:         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ExternalCallersFromCrossDomain="ScriptableOnly"
   3: >
   4:     <Deployment.Parts>
   5:     </Deployment.Parts>
   6: </Deployment>

 

Step 2 – Uploading the new XAP file

Now build your Silverlight project in release mode and find where the XAP file in creates (usually in the ClientBin folder of your web role project). You need to upload this to your Azure accounts blob storage and the easiest way to do this is by using the “SpaceBlock” tool on codeplex:

http://www.codeplex.com/spaceblock

Download the source code for the latest release (0.2.6 currently) by going to the “Source code” tab in codeplex and clicking the “Download” link next the the latest release.

1

Unfortunately you have to build the application yourself from sourcecode as there is not a version available for download currently with Azure storage support. Once built look for the “CodePlex.SpaceBlock.UI.exe” file and run this. You will need to add your Azure storage account details and then you should be ready to upload the XAP file.

In SpaceBlock open your Azure account in the bottom pane and the location of your new XAP file you want to upload in the top pane:

2

Right  click on the root folder of your Azure storage, in the bottom pane, and click “New Folder”. Give the folder a name like “xap” (be aware use lowercase name, either SpaceBlock or Azure don’t like uppercase). Now with your new folder selected in the bottom pane, right click on your XAP file in the top pane and click “Transfer”. This will open the file transfer dialog where you click “Start Transfer”

3

Your XAP file will then upload to your Blob storage, however by default it will not be publically accessible which you will need it to be.

To make it publically accessible right click on the new folder you created in your Blob storage and click “Edit Azure Container Access” and finally tick the “Allow public access” checkbox.

Your XAP file is now all ready to be used in your Azure web role.

Step 3 – Updating the Siverlight plugin host page

The final step is to update the page that hosts your Silverlight control in your Azure webrole project. For this tutorial I will assume your are using the ASP.net Silverlight plugin control. You need to make two changes to the asp.net control, firstly change the Source attribute to point to your XAP file in the Blob Storage. To get the url for this right click on the XAP file in the bottom pane of SpaceBlock and click “Generate URL”. Copy and paste the url into your asp.net page.

Secondly you need to add the attribute HtmlAccess="Enabled" to the asp.net silverlight control. After both these changes your code should look similar to this:

   1: <html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;">
   2: <head id="Head1" runat="server">
   3:     <title></title>
   4: </head>
   5: <body style="height:100%;margin:0;">
   6:     <form id="form1" runat="server" style="height:100%;">
   7:         <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
   8:         <div  style="height:100%;">
   9:             <asp:Silverlight ID="Xaml1" runat="server" Source="http://myname.blob.core.windows.net/xap/myappname.xap" MinimumVersion="2.0.31005.0" Width="100%" Height="100%" HtmlAccess="Enabled" />
  10:         </div>
  11:     </form>
  12: </body>
  13: </html>

Step 4 – Pulling it all together

Now if you build your Azure project in the normal way, and deploy it, you should hopefully find it is now reading the Silverlight XAP file from your Blob storage!

Next time you need to deploy your Silverlight application purely repeat Step 3 by uploading the new XAP file to the Blob storage.

Summary & Thanks

Hopefully you now see how easy it is to separate your Silverlight project from your main Azure project and you are ready to start saving deployment time. There are however a few downsides with this approach.

The speed of loading the XAP file from the blob storage is visibly slower than loading it from your azure web role, this is something we are happy to live with for the benefits it gives us.

Also by overwriting the old Silverlight XAP file with a new one you have no way to test a new deployment, as you would with the azure project. We worked around this by having the XAP file Blob storage URL as a setting in our ServiceConfiguration.cscfg file so that we could upload a to a new file and once checked change the ServiceConfiguration.cscfg setting to point to the new file. This required us to code the host asp.net to read from the ServiceConfiguration.cscfg file which we can change quickly without a new Azure deployment.

Thanks for this solution have to go to Yi-Lun Luo on this forum post which helped us solve our initial issues.

Mar 1

Web server backup: MozyPro vs JungleDisk

icon March 1st, 2009 by Brian Norman

logos

For a while now I have been using online backup for both our online windows web server, office file server and home desktop. I’ve used a range of products from the very cheap Carbonite to the reasonably priced MozyPro and now the new comer JungleDisk.

In this post Ill compare MozyPro and JungleDisk when used for backing up a web server. The comparison might be very different for desktop or network backups.

Why use online backup?

Our web server has been using mozypro for about a year now to host our clients web sites, as our hosting company still doesn’t offer their own backup solution.

Obviously backup of our databases and files is essential to ensure the safety of our clients data and websites so having a reliable and fast backup solution is essential. However remotely managing a tape backup solution, or paying a 3rd party to do this can be expensive, and getting data from tapes can take forever.

This is where internet backup solutions have become a sensible cost effective solution, files are remotely backed up and can be quickly and easily restore remotely with a few clicks.

MozyPro

As I said we are currently using MozyPro for our online windows web server backups. We backup about 12GB of data, with around 1GB file transfer a day and it costs around $120 USD per year. You basically pay Mozy for the disk space you use, there is no charge for setup or transfer of data.

MozyPro installs a windows client which you use to select the files you wanted backed up, when and how to back them up and various other options for encryption and alerts. The features we really use are:

  • Scheduling backups to run at non peak traffic times
  • Throttling bandwidth during peak times (used if backups are still running during peak times)
  • Bit level changes – it only backups the part of the file you have changed

The Good

  • Simple install and setup
  • Simple pricing structure and purchasing, expanding storage is pretty easy too
  • It “feels” like a single solution for backup
  • Can handle backup of sql databases using VSS
  • Nice online admin area for checking backup status, clients, billing and restoring files

The Bad

  • If you have a large collection of files to backup the configuration client takes ages to load and you see this for at least 5 mins:
    mozyprohang
    MozyPro have suggested ways to reduce this but I just don’t see why it shouldn’t work out of the box
  • For a European user, like us, the speed of uploads and downloads is not great. Im not aware of Mozy having an European data centres.
  • Backups just sometimes seem to hang and don’t work again without a reboot
  • No support for archiving backups (only available in enterprise which is an entirely different product)
  • Its not badly priced but could be cheaper

JungleDisk

JungleDisk have a very different business model to MozyPro, and the other online providers. They basically just sell you the backup software ($20 USD) and then you use (and pay separately) Amazons AWS online storage system to actually store your backups.

At first this seems a bit strange, and a step back from MozyPro, but once you look into it more things make a bit more sense. Essentially rather than creating their own storage system and having all the nightmares of supporting it JungleDisk are using the incredibly well designed and supported Amazon AWS system.

We have been using JungleDisk on our office fileserver for about 3 months.

The Good

  • Its cheaper than MozyPro, we backup 40GB total (about 1GB transferred per day) for $13 USD per month ($130 per year) so half the price of MozyPro
  • Its faster to transfer files than MozyPro as Amazon have a European data centre
  • You can use multiple data centres for ultra redundancy
  • The backup client software is quick to load and easy to use
  • Supports configurable archive backups allowing you to keep more than one version of a backed up file
  • Its never hung once during backup
  • Also supports backup of SQL with VSS

The Bad

  • Its not a “single solution” as it involved 2 companies which may make support more tricky
  • The Amazon AWS pricing structure is really complicated with charges for storage, transfer and querying the data. This can initially be daunting when working out your monthly costs
  • Bit level changes – these are available (in selected data centres) as an extra called JungleDisk plus for $1 per month, would be simpler if just always included but I guess this gives extra flexibility if you don’t need it.
  • Overall its just not a simple a solution, but does give the ultimate in flexibility

And the winner is….

Obviously this is not a simple competition and there are good reasons for using both solutions and I’d recommend you trying both for yourself before deciding.

Overall we will probably be moving all our backups to JungleDisk unless we find a new hosting provider with a better local backup solution. The main reasons are speed of transfers, reliability and value for money.