Apr 24, 2013

Get an MVC web site up and running on Azure in 15 minutes

Updated November 9, 2016 to reflect the changes to Visual Studio, Team Services and Azure.
If you want to set up an MVC web site, this is possibly the easiest way.

I was really impressed after setting up a site this way the other day, and it's completely free (at the time of writing, anyway, and not including domain name registrations or your time). Microsoft are really getting the hang of it this time.

So here are the necessary steps:

  • If not installed, download and install Visual Studio. The community version is fully featured and free for students, open-source and individual developers.
  • Register a free project at Visual Studio Team Services (it's free up to 5 devs). Choose between TFS and GIT as the version control system.
  • Create a new MVC project, and check the box for "add solution to source control". Now paste the URL you got from the last step, to link it to your Team Services account.
  • Add a windows azure web site to your azure account (it's free to create a trial ). Notice that you don't have to specify the kind of web site, Team Services automatically figures that out and configures it from your MVC project.
  • Link it to your project by clicking on "Integrate source control" and select Team Services, then the URL you created when signing up.
  • Create site, check in - and bam! It builds and deploys your web site to the cloud.  

I don't know 'bout you, but I think that's pretty nifty. You can now view your web site in the address you specified for the web site, it should be on the form "myawesomewebsitename.azurewebsites.com".

Optional steps:

Have fun!

Apr 10, 2013

Windows Phone 8 - My Experience

After a long two and a half months of waiting, I finally got my Windows Phone. My previous phone was a Samsung Galaxy S2, before that, a Sony Ericsson W715. And before that, I was a Windows Mobile user with HTC S30 and the Qtek 9100. Those two phones really put me off the thought of  a phone with Windows on it.

But after attending MSDN Live in Oslo 2012, I was intrigued by Windows Phone 8 as well as the hardware from Nokia. I guess the fact that I work as a Microsoft .NET developer didn't hurt, either.

As you can see, the start screen on my phone is quite appealing (at least I think so) - and without a single widget or a grid of stylized iCons.


Windows Phone 8 - Start screen



When I got the phone, my first impressions were all good. I didn't have to charge it before using it for the first time, I didn't have to read any manual, and I already had my Microsoft account, SkyDrive, Office365, and what not. The menus were fast, animations subtle and cool, nothing felt like it was slow or not  working. Integration with Skype and Office products were smooth as expected. Even different social networks and e-mail were supported out of the box. Nice going! (I did run into a small problem with getting my gmail contacts over to Microsoft, but that turned out to be my own fault)

Then, I visited the Windows Phone Store. And, well, I wasn't psyched by what I found. While using Android, I've grown accustomed to some apps and services that I wanted to bring with me to my new device. Particularly, Instagram and Dropbox. Neither are available (officially) on WP8. There are some limited third-party apps that bring some of the functionality, but not the official app. I found the facebook app to be weak compared to the (last) Android version as well, with my feed not being filtered properly any more, and finding people was surprisingly difficult.

Two apps that really deserve praise are Wimp and Skydrive. Skydrive is my new dropbox, and it works much in the same way, except I have much more space there. Pictures and music automagically synced, and the OneNote app is great instead of Wunderlist and Evernote, that I used on Android.

Internet Explorer works fine, though I do wonder if a better solution to tabbed browsing can be made available, and there are some sites that don't play nice (a Norwegian newspaper is all white - http://m.db.no ).

I should mention I also enjoy the Twitter app, but I'm pretty new to Twitter so I don't know the Android version.

However, there are some things that could be improved. Even Skydrive has a big drawback. For instance, I preordered a new album from Steven Wilson, and got a digital copy as well. Downloaded the .zip, sent it to Skydrive, and there it was. But even though my phone recognized it, and even had a zip icon, it was not possible for me to download the file or extract it on my device. I understand, now, that there's no getting access to the file system. No file manager, either. What about File Explorer for Windows Phone? Why can't we have that?

When resuming any app, it takes ages to restore the state. I guess some processing must take place, but in the event that the screen switches off when I'm reading, it's annoying to watch the "resuming..." animation for two seconds.

Connectivity settings (Wifi, GPS, Bluetooth) are well hidden, and you have to go into the settings menu to change them. There should be a way to pin on/off as a tile to the start screen! I know there are apps for this too, but it would be simpler.

The same is true for the sound options, you have to go through the settings menu and turn off vibrate and sound to go in silent mode. Huh?

I've had the phone reboot on several occasions, though it hasn't happened for the last week or so. At one point I was sure it was related to sending MMS to several contacts at once, but that wore off as well. It may in fact be a hardware issue, of course.

I suspect the 4G module to be a little unstable as well, since after turning that off, I have a lot more battery capacity and a lot less reboots.

Some things are rather undocumented features, such as the screenshot (start + power) and the reboot (volume down + power for 10 secs!), while others have gone away  - I used to enjoy that the Lumia would jump straight from lock screen to camera when I clicked the camera button, but that was removed in an update :(

All in all I'm quite happy with Windows Phone 8 as a mobile operating system. Once I got the hang of it, and tuned it to my liking, I'm happily using it every day. I would like to see the minor issues that I've mentioned resolved, especially the "resuming..." is very annoying, and a step back from where I was on my Samsung Galaxy S2.

I wouldn't go back just yet, though, and lately the Windows Phone store has been releasing new and promising apps.