Scott Hanselman

How To Guide to Installing and Booting Windows 8 Consumer Preview off a VHD (Virtual Hard Disk)

March 1, '12 Comments [69] Posted in Win8
Sponsored By

The Windows 8 BootloaderSo Windows 8 Consumer Preview is out today. You probably read the Windows 8 Consumer Preview Announcement by Steven Sinofsky and then rushed off to Download it.

Disclaimer: Hopefully you are a technical person or you are not afraid of totally destroying your computer with new preview software. Even better, you aren't the kind of person to rage on a stranger's blog when his totally unsupported instructions on how to install the Windows 8 Consumer Preview onto a VHD delete everything you know an love. You're on your own, friend. I don't work for the Windows team and you don't know me. Remember that as you edit your boot records and destroy your PhD thesis. To the cloud!

First, what's the idea here? I'm assuming that:

  • You want to try out Windows 8 on your machine
  • You don't want to take any chance with dual booting or getting a slower experience inside a regular Virtual Machine.

Cool. If you have Windows 7 now then you can "boot to a virtual hard disk (VHD)" and get all the loveliness of Windows 8 running on hardware without any risk to your hard drive. Don't like it? Delete the VHD and update your boot record.

HUH? What does this mean? What this means is that ONLY the Hard Drive will be virtualized. Your Windows 8 system will run ON THE HARDWARE with your real video card, real CPU, real network card, etc. However, it will NOT run directly from your hard drive - it will run from a file on your hard drive. Windows 8 will live and run on its own personal "virtualized hard drive" which is the VHD.

Ok, now that that disclaimer and expectation setting is done. I don't work for the Windows team, and you don't know me. I am just a guy who loves Boot to VHD. I wrote the Guide to Installing and Booting Windows 8 Developer Preview off a VHD (Virtual Hard Disk) that you may have used last year to play with the build of Windows 8 that was released at the BUILD conference.

Updating from Developer Preview? Delete and start over!

If you want to now try using the Windows 8 Consumer Preview and you already have a VHD setup with the Developer Preview from last year, you can simply delete the existing VHD from your hard drive, then run "msconfig.exe" as administrator and delete the existing boot entry as seen in this screenshot.

Then just setup a new VHD all over again for this new Consumer Preview version of Windows 8. That's the magic of boot to VHD. You can just remove the VHD. You can even have multiple versions if you have the disk space. Just make sure your boot record is up to date.

MSConfig and the GUI Boot Manager

Setting up Boot to VHD

Works on My Machine BadgeThe original instructions on how to boot Windows 8 from a VHD still work and are valid for the Consumer Preview. They work on my machine. I did want to slightly update the post with additional information with the help of a number of people internally with some techniques that may make things easier for you. Thanks to Iain and friends.

Why Boot to VHD?

I boot to VHD all the time. It works great, and the idea of booting to some VHD is a supported thing to be doing on Windows 7. Boot to VHD is a great actual feature of Windows 7 and Windows 8.  Why do it?

I could do a few things to work with Windows 8. I could:

  • Try a virtualization solution, but it might not work, I may not have the drivers I need and it won't be as shiny as running "on the metal."
    • In fact, the Windows 8 team says this:  "Our recommendation for the Consumer Preview is to run it natively on hardware if you intend to run Windows 8 on hardware when the product is final. Some of you will run virtualized environments for enterprise workloads or specialized purposes, but we strongly recommend that you experience Windows 8 on hardware, as it was designed to run for the majority of consumer experiences. "
  • Sacrifice a machine I have lying around. I'll probably do that at some point, but I'd like to try it out on my actual hardware that I use all day long.
  • Swap out my C: drive and use my main machine. I don't have a tool-less case, and I'm also very lazy, so, um, ya.
  • Dual boot. Dual booting may feel ninja but it ALWAYS ends on tears. And sometimes blood.
  • Boot on real hardware from a Virtual Hard Disk

It's that last option that is the best one, in my opinion. Windows 7 included the ability to boot windows from a Virtual Hard Disk File (.vhd). You can read more about the Windows 7 VHD boot capability and recommendations from the TechNet article here. The Windows  8 developer preview was downloaded millions of times and the word on the street is that there was a huge increase in installations in virtualized environments. I think booting to VHD is way better than installing in a truly Virtual Machine because it allows Windows 8 (and you) to really access the native hardware and shine.

Requirements (read these!)

Here's the requirements if you want to try this.

  1. You will need to be an Administrator on your Windows 7 system
  2. You will likely need at least 40gb free disk space on the volume that the VHD is going to be stored. As you're likely creating your own VHD and installing Windows 8 Consumer Preview on it, then you will need free space at least equal to the virtual disk size of the VHD that was created
  3. Boot VHDs need to be on an internal drive. USB drives won’t work.
  4. If your system has Bitlocker enabled, you need to suspend Bitlocker while editing boot settings
  5. More importantly, READ THE WINDOWS 8 CONSUMER PREVIEW FAQ!

Get Started

If you like doing things manually, you should directly the Windows 8 Consumer Preview ISO. I'd recommend burning Windows 8 Consumer Preview to a DVD or a USB Flash drive so you can easily install it on other machines easily. You can certainly do other ISO mounting tricks with other tools if you want to, but honestly it's just cleaner and easier to go download the Windows 8 Consumer Preview ISO and do it the regular way. There's less moving parts and all that.

From their site:

How to install Windows 8 Consumer Preview from an ISO image

The easiest way to convert an ISO file to a DVD in Windows 7 is to use Windows Disc Image Burner. On a PC running Windows XP or Windows Vista, a third-party program is required to convert an ISO file into installable media—and DVD burning software often includes this capability. One option is the USB/DVD download tool provided by the Microsoft Store. You can also download Windows 8 Consumer Preview Setup, which includes tools that allow you to create a DVD or USB flash drive from an ISO file (Windows Vista or Windows 7 required).

Take the Leap

Read the disclaimer at the top again. I don't know you and you're installing Beta software. .

Here's the general idea in broad strokes. The tiny details we'll be following are on my Guide to Installing and Booting Windows 8 off a VHD (Virtual Hard Disk).

  • First:  Go Get the Windows 8 Consumer Preview Download

  • Remember: Have a lot of disk space (40gigs or more)

  • Either burn your downloaded ISO to a DVD or make bootable USB Key manually.

  • Create a VHD that you will attach and install Windows 8 into

  • Boot your system of your newly created Windows 8 Consumer Preview DVD or USB Key

  • Attach your VHD during the setup process

  • Select your VHD as the hard drive to install to (make very sure you know where you're installing to)

  • Reboot and pick your operating system with the new lovely Windows 8 boot manager.

Alright. Sound good? You have some bootable media (DVD/USB) all setup with Windows 8 Consumer Preview? Now head over to my original post and start at Step 2. Fun!


Covering your Tush

If you want to be super careful you can backup your Boot Manager Database to a safe place by doing this from an Administrator Command Prompt:

BCDEDIT /export c:\bcdbackup.bak

and if you totally mess things up and you want to put things back the way they were, you can

BCDEDIT /import c:\bcdbackup.bak

Then delete the VHD and and reboot your system. If any of this is scary or you don't know what you're doing, then just stop and go here now.

FAQ

But I use the LILO (LInux LOader) or GRUB (Grand Unified Bootloader).Boot loader

By running the BCDBOOT command, you’ll set the Windows Boot Manager writes the entry to the Master Boot Record (MBR) of system as the default. A system can only have one Boot manager at a time.

If you want to revert to your previous boot loader, just follow that software’s normal installation instructions.

I've heard some reports of GRUB supporting .VHD boot, but we have not tested it. You're on your own.

Can I do this on a Mac?

No. Apple MacOS uses Unified Extensible Firmware Interface (UEFI) which locks the Guid Partition Table (GPT). The GPT holds a similar position in the UEFI systems as MBR for the BIOS systems.

Why does the VHD need so much space?

VHDs are created as dynamically expanding by default, up to 40gb which get expanded to their full size when used as a boot disk. Some people like them to be even bigger.

Note: The reason why the boot VHD gets expanded to its maximum size run running is to avoid the case where the hosting volume runs out of space when it is being actively being used as a system disk. If the hosting volume does run out a space, it would result in an unexpected system reboot. The user would need to boot into an alternate OS or recovery partition to free up space on the hosting volume before he can boot into the VHD again.

Can I use some other tools to do this?

There are a number of tools that do things like bcdedit in a graphical environment. I like Bellavista which I have used on Windows 7. However, do note that I did not test or run the steps above using anything but the tools in Windows.

--

Hope this helps you have fun testing Windows 8 Consumer Preview in a safe way.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Visual Studio 11 Beta in Context

February 29, '12 Comments [53] Posted in ASP.NET | ASP.NET MVC | Microsoft
Sponsored By

Today Visual Studio 11 Beta is released and available for download. Don't want to read a big blog post? Phooey on you then! ;)

Made it this far? OK, cool. I wanted to do a post that would not only point you to a bunch of other resources, but more generally answer the obvious questions. The questions that I asked before I went to work for Microsoft four years ago. I always ask: What's changed, and why should I care?

"One ASP.NET"

One of the things that the fellows and I are working on that will be more obvious  after the beta and even a little after the final release is this idea of One ASP.NET. We're sweeping through the whole framework, samples, templates and NuGet to make sure things work together cohesively. You'll hear more about this as we firm it up.

Some guiding principles for ASP.NET are these:

  • Every reasonable combination of subsystems just works
  • The model is easily extended by community projects (not just us!)
  • Every subsystem or application type includes a *.Sample that works together with others

Here's the boxes diagram I've been playing with.

These principles are some of the things that drove (and continue to drive) ASP.NET this development cycle. We are trying to give you great mobile options, great HTML5, CSS3 and JavaScript support and also including open source libraries like Modernizr, jQuery, jQuery UI and Knockout.

We are working towards a more pluggable, more friendly but still powerful ASP.NET. Again, more on this soon and some surprises. We'll see more interesting uses of NuGet, more plug-ablity, more examples, and more systems working together.

You want to mix and match a ASP.NET Web API, serialization with JSON.NET, use MongoDB, run Web Pages and Web Forms side by side, add some some SignalR and a few WCF enterprise Web Services? Add in ELMAH, Glimpse, Image Resizer and your favorite NuGet packages? Totally. It's Encouraged. It's all One ASP.NET.

.NET Framework 4.5 Beta

For the most part in my experience, .NET 4.5 is a very compatible release. .NET 4.5 upgrades .NET 4 as .NET 3.5 upgraded .NET 3 (and 2, although we're trying to play by the versioning rules now, thank goodness.) The vast majority of .NET 4 apps should work fine on .NET 4.5 unless you are doing something exotic. I haven't had any problems myself, but I've heard of some unusual edge cases with folks doing ILMerge and a few other things.

There's a number of new improvements. Some of my personal favorites and features I'm most interested in are (these are somewhat obscure, but nice fixes, IMHO):

  • Ability to limit how long the regular expression engine will attempt to resolve a regular expression before it times out.
  • Zip compression improvements to reduce the size of a compressed file.
  • Better performance when retrieving resources.
  • Updates to MEF to better support generics.
  • new Asynchronous methods in I/O classes for Asynchronous File Operations
  • Support for Internationalized Domain Name parsing
  • WPF Ribbon Control
  • WCF HTTPS protocol mapping
  • WCF Asynchronous streaming support
  • WCF Contract-first development  as well as ?singleWSDL for service URLs

Test your apps and PLEASE tell us if you have trouble. This is a beta and there is a still time to fix things.

Please don’t hesitate to post a comment on team blogs, or at one of the forums that are actively monitored: Connect (report bugs), UserVoice (request features) and MSDN Forums (ask for help). I know that folks have issues with Connect sometimes, but folks are actively monitoring all these places and are trying to get back to you with clear answers.

ASP.NET Core Framework

Here's a detailed release notes document about what's new in ASP.NET 4.5 and Visual Studio "Web Developer" 11 Beta. The core ASP.NET framework has a lot of new support around asynchrony. Asynchrony has been a theme throughout the whole Visual Studio 11 process and ASP.NET is full of improvements around this area.

There's support for the await keyword, and Task-based modules and handlers.

private async Task ScrapeHtmlPage(object caller, EventArgs e) 
{
WebClient wc = new WebClient();
var result = await wc.DownloadStringTaskAsync("http://www.microsoft.com");
// Do something with the result
}

Even IHttpAsyncHandler (a classic, and a difficult thing to get right) has a friend now:

public class MyAsyncHandler : HttpTaskAsyncHandler
{
// ...
// ASP.NET automatically takes care of integrating the Task based override
// with the ASP.NET pipeline.
public override async Task ProcessRequestAsync(HttpContext context)
{
WebClient wc = new WebClient();
var result = await
wc.DownloadStringTaskAsync("http://www.microsoft.com");
// Do something with the result
}
}

There's security improvements with the inclusion of core encoding routines from the popular AntiXssEncoder library, and you can plug in your own.

ASP.NET also has WebSockets support when running on Windows 8:

public async Task MyWebSocket(AspNetWebSocketContext context) 
{
WebSocket socket = context.WebSocket;
while (true)
{
...
}
}

Bundling and Minification is built in and is also pluggable so you can swap out own techniques for your own, or your favorite open source alternative.

There's lots of performance improvements including features for dense workloads that can get up to a 35% reduction in startup time and memory footprint with .NET 4.5 and Windows 8.

ASP.NET 4.5 also supports multi-core JIT compilation for faster startup and more support for tuning the GC for your server's specific needs.

ASP.NET Web Forms

There's lots of refinements and improvements in Web Forms. Some favorites are strongly-typed data controls. I blogged about this before in my Elegant Web Forms post. There's two way data-binding in controls like the FormView now instead of using Eval() and you'll also get intellisense in things like Repeaters with strongly typed modelTypes.

Web Forms also gets Model Binding (all part of the One ASP.NET strategy) which is familiar to ASP.NET MVC users. Note the GetCategories call below that will bind to a View with IQueryable.

public partial class Categories : System.Web.UI.Page
{
    private readonly DemoWhateverDataContext _db = new DemoWhateverDataContext();
 
    public void Page_Load()
    {
        if (!IsPostBack)
        {
            // Set default sort expression
            categoriesGrid.Sort("Name", SortDirection.Ascending);
        }
    }
 
    public IQueryable<Category> GetCategories()
    {
        return _db.Categories;
    }
}

In this example, rather than digging around in the Request.QueryString, we get our keyword parameter this way:

public IQueryable<Product>GetProducts([QueryString]string keyword) 
{
IQueryable<Product> query = _db.Products;
if (!String.IsNullOrWhiteSpace(keyword))
{
query = query.Where(p => p.ProductName.Contains(keyword));
}
return query;
}

Web Forms also get unobtrusive validation, HTML 5 updates and elements, and those of you who like jQuery but also like Web Forms Controls (as well as Ajax Control Toolkit fans) will be thrilled to check out the JuiceUI project. It's an open-source collection of ASP.NET Web Forms components that makes jQuery UI available in a familiar way for Web Forms people.

ASP.NET MVC and Web API

Last week I blogged about Making JSON Web APIs with ASP.NET MVC 4 Beta and ASP.NET Web API. ASP.NET MVC 4 includes these new features (and a few more) and is included in Visual Studio 11 Beta.

  • ASP.NET Web API
  • Refreshed and modernized default project templates
  • New mobile project template
  • Many new features to support mobile apps
  • Recipes to customize code generation
  • Enhanced support for asynchronous methods
  • Read the full feature list in the release notes

Matt Milner has a great post on where ASP.NET Web API and WCF proper meet and diverge, and why you'd use one over the other. I'll be doing a more detailed post on this also, but I like Matt's quote:

WCF remains the framework for building services where you care about transport flexibility. WebAPI is the framework for building services where you care about HTTP.

ASP.NET Web Pages 2

New features include the following:

  • New and updated site templates.
  • Adding server-side and client-side validation using the Validation helper.
  • The ability to register scripts using an assets manager.
  • Enabling logins from Facebook and other sites using OAuth and OpenID.
  • Adding maps using the Mapshelper.
  • Running Web Pages applications side-by-side.
  • Rendering pages for mobile devices.

There's lots  more to talk about in Razor and Web Pages 2 that I will talk about when Web Matrix 2 comes out.

Visual Studio - for Web Developers

Lot of new Web Features - Hello Opera users!There's an extensive list of features and fixes on the Web Developer Tools team Blog. Here are my favorites.

The HTML Editor is smart about HTML5 and you can develop smart HTML5 sites with any ASP.NET technique.

The CSS Editor has a new formatter, color picker, better indentation, smart snippets and vendor-specific IntelliSense. That's Webkit and Opera in the screenshot over there.

The Javascript Editor has IE10's Javascript engine and supports Javascript as a 1st class citizen with all the support you get in other languages like Go To Definition, brace matching, and more.

Page Inspector is all new and lets you to see what elements in the source files (including server-side code) have produced the HTML markup that is rendered to the browser. IIS Express is now the default web application host.

All the Links

General Info

Download

Secondary Downloads (for the IT folks)

Got Visual Studio issues? Complain (kindly) and vote up features and concerns at their UserVoice site.

Got ASP.NET issues? Complain to me (kindly) and vote up features and concerns at our UserVoice site or ask questions in the ASP.NET forums. There will also be new videos, tutorials and information at http://asp.net/vnext and we are continuing to update the site with fresh content.

Hope you enjoy the Beta. Please do take a moment to install it, try it out, and offer feedback. There is time for us to make changes, fixes and improvements but only if you give feedback.


Sponsor: My thanks to DevExpress for sponsoring this week's feed. There is no better time to discover DevExpress. Visual Studio 11 beta is here and DevExpress tools are ready! Experience next generation tools, today.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

"I can't even think about switching phones without these apps." Windows Phone 7, a Nokia Lumia 800 and the Essential Apps

February 28, '12 Comments [60] Posted in Tools | WinPhone
Sponsored By

Lots and lots of Windows Phone 7 AppsI'm still using my iPhone 4s mostly but a Nokia Lumia 800 showed up in the mail last week. I'm looking forward to the Nokia Lumia 900 as well. Turns out that Nokia was giving away new Lumias to folks that had written Windows Phone 7 applications in the month of January as a part of their "WPNewYear" promotion. Since I wrote Lost Phone Screen - The customizable Windows Phone 7 lock-screen I qualified for a free phone. Now I've got a Samsung Focus and a Lumia 800. This isn't a review of the Lumia 800 (I'll do that later) but I will say initially that this is a nice piece of hardware. It's got heft, it's got a crazy bright screen, good glass, 8 meg camera, glass lens, it's fast. It feels right. Better than the Focus. The Lumia 800 can stand up against the iPhone for most users. It's only major lacking is a front facing camera.

The thing that keeps me from switching over to some other phone always comes down to apps. Apps apps apps. Everyone's got that app or apps that they just "can't live without." The general belief is that Windows Phone doesn't have the essential apps with the big name services.

I took some time and listed out all the apps and social services that I use on my iPhone and found them for my Windows Phone 7. This is the "I can't switch even think about switching phones without these apps" list.

While l realize the irony of being on the "mobile apps update treadmill" and would prefer a world without apps, this is the world we have today so here are the apps to navigate it.

Basics

Get these obvious apps first. Facebook, YouTube, Acrobat, XBox Live Extras, and Vimeo. Also NetFlix if you have it.

The Essential Apps imageimage

Foursquare

There is a standard first-party Foursquare app on Windows Phone, but the BEST app for Foursquare is called 4th & Mayor. It's a gorgeous and meticulously well-designed application that is arguably the best example of an excellent Windows Phone 7 app there is today. If you are writing an app and are wondering how to do something in the UX, just refer to 4th & Mayor. It also takes excellent advantage of the WP7's Live Tile concept. I've pinned a "Check In Now" tile to my home screen which makes Foursquare check-ins just two clicks.

4th and Mayor

Twitter and Facebook

Windows Phone 7 People HubTwitter and Facebook sharing and contact management is built into Windows Phone 7's People Hub. You connect accounts together (this happens automatically) so if your friend Bob is on Facebook, Gmail, Outlook, Twitter and LinkedIn, rather than opening separate apps. Rather than app-focused it's people-focused. I use this for Family and Co-workers. It's nice to just see a Person and what's up with them.

You can see in the screenshot at the right that one person is automatically associated with four services and all their updates are under What's New. Same with pictures, I see their Facebook, etc, all in one place.

For power Twitter use though, I use an app. There's an official Twitter app which is fine for regular folks. For the more hardcore tweeters, I recommend Rowi. There's a free ad-supported one and a paid-for version. It has notifications, toast, tile updates, photo uploader and more. I've used the 2.0 beta (coming soon) and the future is bright as Rowi is actively developed.

Weather

The Weather Channel app is excellent, includes an updating animated Live Tile, radar maps, forecast and all the usual stuff - and more - you'd want from a Weather app.

971ff6f8-de15-483b-96a4-52f1a43a962d

Movies

There are two great movie apps and I move between them, but Flixster is pinned to the home screen. Flixster's LIve Tile is a current movie's poster, which is a nice touch. It supports fast app switching on Mango, has all the showtimes, favorite theatres, but most importantly Rotten Tomatoes movie scores. Fandango is also nice if you want to buy tickets, and they now support Pinning your ticket confirmation for easy access when you get to the theater. Also grab the IMDb application so you can argue a bout who That Guy is in the movie.

Flixster on Windows Phone 7

TripIt Travel with My Trips

TripIt is the greatest thing to happen to travel since Expedia. I blogged about it in my 10 Guerilla Airline Travel Tips for the Geek-Minded Person and I still recommend it today. On Windows Phone 7, use My Trips for access to all your travel, ticket, gate and flight status info on the go.

My Trips for TripIt on Windows Phone 7

News

I've just got room for a few good news apps in my life, so on Windows Phone I go with the same apps I have on my iPhone.

BBC News Mobile is an excellent 3rd part BBC news reader. Clean, fresh, looks good, supports Mango and has Live Tile support so I can get news headlines pushed to my home screen without launching the app. I also have NBC Nightly News because it includes the full show.

BBC News for Windows Phone

Engadget, well, is Engadget. It's tech news, gadgets and consumer electronics. Nice Live Tile with pictures pushed to it and fast, good-looking application.

Engadget for Windows Phone

I recommend AP Mobile with a caveat. It's a great looking app, one of the first with a Live Tile. It pushes a new daily photo to the tile, which is nice. It's got lots of great AP photography and has worked fine for months. However, in the last few weeks the photo quality has gone down the toilet. The photos are freakishly JPEGed and there's not a peep from AP about it. Something is clearly being proxied and double compressed ,  perhaps in an attempt to save bandwidth. I hope they fix it soon because it was/is a great app.

AP Mobile for Windows Phone

News Reader/RSS Reader/Google Reader

Pulse is a lovely aggregating reader that sits somewhere between regular RSS reader, magazine, and News App. Looks great on my Windows Phone as it did on my iPhone.

Pulse News Reader for Windows Phone

Wonder Reader synchronizes with my Google Reader account. It's got lots of cool features and uses of LiveTiles and allows you to pin feeds, categories, and favorite blogs. It's also got a nice collection of pre-loaded categories for jump starting. It's not Reeder for iPhone, but it is the best Google Reader client on Windows Phone. Even better, it has Instapaper support!

Wonder Reader google reader for Windows Phone

Instapaper

I am a heavy Instapaper user and recommend it highly. I've blogged about it in my Two Must-Have Tools for a More Readable Web. I pay Marco at Instapaper happily, and was thrilled when I found Stacks for Instapaper. If you are a hardcore Instapaper person, you'll agree that having Instapaper on your phone is required. This is a "first page app" for my iPhone and an "above the scroll" app for my Windows Phone.

Instapaper for Windows Phone

Nerd Social

What is a phone without Reddit? Baconit is a Reddit app for Windows Phone. It supports Live Tile pinning of subreddits and a clean UI.

Reddit for Windows Phone

Perhaps you prefer Hacker News? That's available now too with the Hacker News Reader.

Hacker News for Windows Phone

Music - Spotify and Vevo

Windows Phone 7 has deep integration with Zune and the Zune subscription music service (you pay $9 for all the music you can listen to...you're leasing music rather than buying) but I am a Spotify user. I've got Spotify on four other devices and my PC so I need it on my phone too. Finally, it's here. It plays music in the background and under the lock screen and it integrates with the existing Music Hub so it doesn't feel like a 3rd class citizen.

Spotify for Windows Phone

Vevo is like Hulu or YouTube for Music Videos. When I get tired of Spotify, sometimes I'll just let videos play with Vevo playlists. It also has a nice Live Tile. There is also Last.fm and IHeartRadio.

Vevo for Windows Phone

Photography - InstaCam and Pictures Lab

Pictures Lab is a nice effects and editing application (if not THE BEST editing app) for Windows Phone. All the functionality is there and cleanly integrated with the Photos Hub. Crop, Rotate, Effects, etc. It's a must-have if you are doing any photography on your phone.

Pictures Lab for Windows Phone

Say what you will about using a supercomputersmartphonewith8megapixels to take crappy Polaroid pictures but I'm a big Instagram fan. It is a fun social network and I use InstaCam on Windows Phone to explore it. Unfortunately it doesn't appear that Instagram (the company) is interested in fostering a 3rd party client application ecosystem because their API is effectively crippled with no upload support. Seems odd. It's also odd that you can visit a photo of mine on Instagram, but can't follow me from there OR see my  other photos!

Instagram for Windows Phone

Also consider Flickr if you use that service.

Cloud Storage - Dropbox and SkyDrive

I'm a paying Dropbox user and a big fan. There's a few Dropbox clients on Windows Phone but I use BoxFiles for DropBox and so far it's worked just fine. I can pin Dropbox folders to the start screen and email links to files in my Dropbox.

Dropbox for Windows Phone

I've got a few files on SkyDrive including some photos and OneNote files, so there's an official SkyDrive client as well. This app particularly shines when editing Word and Excel documents from the cloud on your phone.

SkyDrive for Windows Phone

Communication - Skype and GroupMe

Yes, Skype, baby. It's beta as of the time of this writng, so you can't search for it, you need to go get Skype for Windows Phone from this link or read their help page on Skype for Windows Phone. I'm less interested in the Video part, although that's cool, and more in the audio calls part. Whenever I'm overseas I always make Skype calls to my family from the hotel Wi-Fi. It's completely cut out international long-distance from my life, and I still get to talk on my same phone.

Skype for Windows Phone 7

GroupMe might not seem obvious or essential at first, but my team uses it all the time. It's a grouped IM service, except it will use the app OR SMS to communicate with the group. That means you can put together a group of family members and start a chat without paying for SMS costs, and everyone can talk to everyone at the time time across platforms. I create GroupMe Rooms for conferences that I attend so my friends/co-workers can have a private backchannel. It's fantastically useful, especially if you want to include non-smartphone-using Dad or Mom on the social.

GroupMe for Windows Phone

Amazon

Ya, they get their own category. I've got both the Amazon Mobile shopping app (a best-of-breed app on Windows Phone) and the Amazon Kindle app. Both apps are of exceedingly high quality. The Amazon Mobile app has UPC scanning as well as the ability to pin a scanning tile to you rhome screen so you can scan with one click.

Amazon Mobile for Windows Phone 7

The Kindle app is as you'd expect. It has a very nice theme but then turns into a clean reader when you are in the book with options for fonts and colors. Best part, it syncs you pages between all your Kindle devices.

Kindle for Windows Phone 7Amazon Kindle Reader on Windows Phone 7

As an honorary mention to the Amazon section, check out Craigslist Mobile. A very attractive and polished app (more than the CL website!) that lets you query and shop on Craigslist.

Craigslist Mobile for Windows Phone 7

Also  useful because my wife uses it is Groupon. I was impressed they had a native app.

Groupon for Windows Phone

Must Have Utilities

There are a couple of Utilities I've discovered for Windows Phone that GREATLY enhance the experience.  They are almost so useful that they should be built into the OS. (That's when I know a utility is work my time...when it just belongs.)

Ok, I'll cheat, the first one is mine. It's http://lostphonescreen.com/ and it's a customized Lockscreen for Windows Phone. I always think it's silly to get a fancy phone with a GPS to track it when it's lost. Why not just put your phone number on the wallpaper?

Customizable Lock Screen for Windows Phone

ConnectivityShortcuts gives you Live Tile links to stuff like Airplane mode, Wi-Fi and Bluetooth. Absolutely essential.

Wifi Shortcuts for Windows Phone

Wiztiles Pro is a little hard to understand but if you use the phone for more than a day you'll immediately want what it has to offer. It's essentially a shortcut creation kit. For example, I added custom shortcuts to my browser with a custom downloaded theme icon, added a directly link to Share Status. You can customize anything you like, even break large pictures up into tiles. You can customize the phone's tiles in ways you didn't think possible. It's really amazing.

Extreme Windows Phone Customization with Wiztiles ProExtreme Windows Phone Customization with Wiztiles Pro

Food

If you want Recipes, it's all about BigOven and AllRecipes. I use both regularly.

f87dbb70-e61a-4c6e-b672-d2cb52e7757738758da3-24f5-47b5-9daf-76035781b28a

Conclusion

If you've considered making an application of your own for the Windows Phone, here's a write-up on how I wrote my first app's first version in about 6 hours. I also have some podcasts you might be interested in:

Hope you enjoyed this list. I was pleasantly surprised how many apps that I already use were available. My wishes for the future are, 360Panorama from Occipital, Eye-Fi, Comixology (They already have a DC Comics viewer, so the hard work is done), Mint, and Hulu.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

How to upgrade an HP TouchPad to Android Ice Cream Sandwich

February 27, '12 Comments [24] Posted in Android | Open Source
Sponsored By

A while back I picked up an HP TouchPad for $99 during the great "HP Tribulations of 2011." It was a fire sale and I was lucky enough to grab one on Amazon. I really like the HP WebOS and I enjoyed overclocking the TouchPad to get more performance out of it. For $99 it's an insane little piece of hardware. I wanted to see if taking over the hardware and putting Android's Ice Cream Sandwich would make the TouchPad even more useful. Plus, it's a hacker's dream, so why not.

The folks making Ice Create Sandwich work is the Cyanogen team. Here's the main link to their HP Touchpad page, although they do lots more.

Here's the process. This one assume you're starting from an HP TouchPad that has TouchOS on it or one that already has a built of Android on it but you don't mind messing it up.

When you have Java installed you can now double click on the UniversalNovacomInstaller.jar file.

Run the JAR file

Say yes and Download the Drivers, and wait.

Download Drivers_ (24)

When it is done, you'll be left at the Install button again. Just close the app.

The Novacom stuff is installed to C:\Program Files\Palm, Inc. You'll want to copy your ACMEInstaller2 file into that folder where novacom.exe is located. Also copy the gapps zip file into the root of the HP TouchPad's drive.

Plugin your HP TouchPad to you PC's USB while in Web OS. Select USB Drive mode. You should get a USB Symbol on your TouchPad. Open the new drive for your TouchPad in Windows Explorer and make a folder "cminstall". Copy moboot, clockwork, and the main CM update zip into that new folder.

From the Settings Menu in TouchOS select Settings | Device Info | Restart. When the screen goes black, hold down the Volume Up button until a USB Symbol appears again. This one will be white with no border.

Now, while your TouchPad is connected to your PC and showing the USB symbol, go back to your Windows machine and open a Command Prompt. Go to C:\Program Files\Palm, Inc type novacom.exe boot mem:// < ACMEInstaller2 like this:

C:\Program Files\Palm, Inc>novacom.exe boot mem:// < ACMEInstaller2

After you hit Enter a lot of text will appear on your TouchPad.  This it's working. When your TouchPad reboots into Ice Cream Sandwich, go through the setup.

If you want to install the extra Google Apps stuff, reboot. From the mooboot 0.3.5 menu you can launch ClockworkMod and install Google Apps from that zip file.

Ice Cream Sandwich on HP TouchPad

It's very very early, but it's pretty cool that it works this well at all. I'm looking forward to seeing if they can get it completely working and reasonably supported on the HP TouchPad. I think for browsing and goofing around HP Web OS is fine, but if you have a TouchPad and you are already invested in Google Apps and the Android Marketplace, you should be keeping an eye on this project.

I have already had dozens of crashes (it's an Alpha) so I wouldn't recommend making this your primary tablet. I also can't get my Google Apps (Gmail, etc) to synchronize as I'm using 2 factor auth and there's some subtle bug. I'm also unable to get Google Chrome for Android to work because it's version check doesn't seen this build of Ice Cream Sandwich as a legit version that's > 4.0. There is a fix for Chrome on the HP TouchPad if you really need it, though.

However, Browsing, Flash, many apps and Video works fairly well. Plus, I can always reboot back into HP Web OS so I can't really hurt the tablet.

If you're really hardcore, there are now CM9 Nighty Builds. You can follow the nightly builds on Twitter and read more on their thread and also in the unofficial thread in the forums. Have fun!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

One ASP.NET - Making JSON Web APIs with ASP.NET MVC 4 Beta and ASP.NET Web API

February 25, '12 Comments [47] Posted in ASP.NET | Javascript | Open Source | Web Services
Sponsored By

ASP.NET MVC 4 Beta came out last week. It's got lots of new features as well as some surprises that move us closer to the "One ASP.NET" idea. I talked about this a little in this week's MSDN Flash email newsletter (you can subscribe to MSDN Flash here; it's reasonably high signal, low noise). Here's part of what I said:

Don't think of ASP.NET as an island. It's a citizen of the larger community. More and more of ASP.NET is open source, and we push hard every day to stay open and be open. We want to make ASP.NET more pluggable, more open, more fun. We've got big things planned - some that will surprise you. I hope you'll join the conversation and the community.

Here's some of the stuff that's been improved in MVC 4.

New Features in the Beta

  • ASP.NET Web API
  • Refreshed and modernized default project templates
  • New mobile project template
  • Many new features to support mobile apps
  • Recipes to customize code generation
  • Enhanced support for asynchronous methods
  • Read the full feature list in the release notes

You may have heard me talking about LEGO in the past, and showing how you can fit things together better with NuGet. I've mentioned One ASP.NET in the context of the new features in Web Forms as well. Here's a diagram I've shown internally a few times. We'll keep adding more information about how these fit together and what you can build with them on http://asp.net/vnext.

All the parts of ASP.NET, all the subsystems are all part of the larger ASP.NET community

In fact, in the interest of focusing on One ASP.NET, the "WCF Web API" is now ASP.NET Web API and it comes with ASP.NET MVC now. Even though it ships with MVC 4 Beta today, don't let that take away from the One ASP.NET vision. You can use Web API in ASP.NET Web Forms no problem. That's kind of the point. ;)

Why do you want a Web API?

If your app - your business's data model - has an API, then suddenly your Web API is opened up to native apps, iPhone apps, Windows 8 apps, whatever, apps. It's Web Services. Remember those?

I can use XML or JSON or something else with my API. JSON is nice for mobile apps with slow connections, for example. You can call an API from jQuery and better utilize the client's machine and browser. You can make a Gmail type single page, or a hybrid; it's up to you.

How it all fits into One ASP.NET

The idea behind One ASP.NET is that I want folks to be able to make apps that have real-time components with SignalR, clean, simple APIs with Web API, all in one pages with KnockoutJS, pages with MVC, Web Forms or Web Pages, as well as existing ASP.NET systems like OData, ASMX, and more. I want open source projects like JSON.NET, KnockoutJS, SignalR, Backbone, MongoDB, Scaffolding, NHIbernate, Ninject (and the list goes on) to all play in the same ASP.NET LEGO sandbox. We'll put all these subcomponents on NuGet and they'll live alongside community components and you'll be able to build ASP.NET applications starting from some base template and add just the pieces you want. We are getting there. I want folks to use the parts they want, and swap out the parts they don't. Everything should work together. I've always said I want to open source everything we can as fast as Microsoft can take it, and I'll keep pushing if it kills me my boss.

NotTwitter

Lemme make a NotTwitter app real quick. Here's a quick model:

public class NotATweet
{
public int ID { get; set; }
public string Username { get; set; }
public string Text { get; set; }
public DateTime Published { get; set; }
}

I'll use the default scaffolding to get the UI, but then I'll install the MvcScaffolding extra NuGet package and scaffold it using a Repository pattern.

PS>Scaffold -ModelType NotATweet -DbContext NotTwitterContext -Scaffolder Repository -Force 

Then I'll scaffold a controller that uses this Repo (you can do this from the UI or from the NuGet package console):

Scaffold -Controller NotATwitter -ModelType NotATweet -DbContext NotTwitterContext -Scaffolder MvcScaffolding.Controller -Repository

And here's the resulting Scaffolded UI.

It's Not Twitter

The controller for my pages is standard fare. Now I'll add one via Add Controller to make an API for my NotTwitter application.

I'll change my route to make /api go to my app's API controller;

routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{id}",
defaults: new { controller = "NotATwitterAPI", id = RouteParameter.Optional }
);

Here's my Web API controller code. A few things to notice. I'm talking to the same IRepository that the page controller uses. I'm returning HTTP Status Codes that are appropriate for each response. See how after the Create (where I POST a JSON representation of NotATweet) that I return HttpStatusCode.Created 201 and set the header's location to include the location of the new resource?

public class NotATwitterAPIController : ApiController
{
private readonly INotATweetRepository notatweetRepository;
    public NotATwitterAPIController(INotATweetRepository notatweetRepository)
{
this.notatweetRepository = notatweetRepository;
}

// GET /api/notatwitterapi
public IQueryable<NotATweet> Get()
{
return notatweetRepository.All;
}

// GET /api/notatwitterapi/5
public NotATweet Get(int id)
{
var notatweet = notatweetRepository.Find(id);
if (notatweet == null)
throw new HttpResponseException(HttpStatusCode.NotFound);
return notatweet;
}

// POST /api/notatwitterapi
public HttpResponseMessage<NotATweet> Post(NotATweet value)
{
if (ModelState.IsValid)
{
notatweetRepository.InsertOrUpdate(value);
notatweetRepository.Save();

//Created!
var response = new HttpResponseMessage<NotATweet>(value, HttpStatusCode.Created);

//Let them know where the new NotATweet is
string uri = Url.Route(null, new { id = value.ID });
response.Headers.Location = new Uri(Request.RequestUri, uri);

return response;

}
throw new HttpResponseException(HttpStatusCode.BadRequest);
}

// PUT /api/notatwitterapi/5
public HttpResponseMessage Put(int id, NotATweet value)
{
if (ModelState.IsValid)
{
notatweetRepository.InsertOrUpdate(value);
notatweetRepository.Save();
return new HttpResponseMessage(HttpStatusCode.NoContent);
}
throw new HttpResponseException(HttpStatusCode.BadRequest);
}

// DELETE /api/notatwitterapi/5
public void Delete(int id)
{
var notatweet = notatweetRepository.Find(id);
if (notatweet == null)
throw new HttpResponseException(HttpStatusCode.NotFound);

notatweetRepository.Delete(id);
}
}

Then I'll hit /api with Fiddler. Notice how JSON popped out the other end?

ASP.NET Web API in Fiddler

I'll change the accept header to Accept: application/xml and xml pops out. You can plug in your own and make Web API spit out iCal or whatever you like. You can make media formatters or even plug in others for the defaults. For example, here's a JSON.NET Formatter for Web API.

GET returns a 200 and an XML list of NotTweets

Now can we make NotTweets? You can use tools like the JSON Formatter to handcraft JSON for testing. Now I'll POST a Json serialized NotTweet:

POST gets back an HTTP 201

Notice that the result is an HTTP 201 Created. If I then GET /api, I can see it's there:

Standard /api GET

I can also affect things with the URL and query strings like this GET /api?$orderby=Username HTTP/1.1 so I can so query composition without totally buying into OData-style URLs if I don't want to.

Web API with an orderby querystring

As I mentioned, I can use XML or JSON or something else with my API. JSON is good for mobile apps with slow connections, for example. You can call this API from jQuery and better utilize the client's machine and browser.

There's also the "calling" side of this, which is HttpClient. You can call out to other APIs like Twitter and authenticate using OAuth. Other people might call your API from the client side using jQuery and Javascript or from the server side using HttpClient.

Web API has many more possibilities than this example. Spend some time on Henrik's blog (he helped invent HTTP! Listen to him on his episode of the Hanselminutes Podcast)

We've got a new section up on the ASP.NET site http://asp.net/web-api with a lot of info. Here's some resources for easily adding an API to your app. You can even self-host your own Web API without IIS in a service or other application!

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.