Patrick Godwin's Blog-O-Rama!

Developers, developers, developers!

How I wrote and deployed a cloud powered app in just six days

So, I was sitting around on the Friday before Labor Day, when suddenly, I thought: “I should make an app!”. And six days later, I had the app published:

image

But how did I build a cloud powered Windows 8 App in just six days? It was actually really easy, thanks to the new Windows Azure Mobile Services preview.

If you don’t know what Windows Azure Mobile Services are, I highly recommend you check it out. It enables you, the app developer, to develop a rich, cloud powered application without building any of your own infrastructure. If you need a SQL database to store data? Mobile Services takes care of that for you. Need to do push notifications? Azure can take care of that too.

Essentially, you build your data model all in your application. You simply mark your class with the new DataTable attribute, and mark the members with DataMember, and Azure Mobile Services handles the rest. What happens, is the new SDK takes your data and serializes it to JSON. It then makes various REST API calls to the Azure service you’ve set up, allowing it to store data in SQL Azure without having to write a data access layer. If you need to perform more powerful data validation or push notifications, you can use write scripts on the web service to perform these tasks with each call to GET, POST, DELTE, or UPDATE.

By using Azure Mobile Services, I spent part of Friday and Saturday writing authentication and data access code. From there, I was able to focus on my applications actual user interface and logic. I didn’t have to spend any time fiddling around with SQL databases, writing my own API methods, or rolling my own OAuth code. It was all taken care of by Azure Mobile Services and  The core of the application was done by mid-Monday, and sent into certification later that evening.

You may be wondering, why did it take until Thursday to get the app into the store. The simple, scary answer? Certification. Windows Store certification is no easy task, especially for an app that was thrown together over one weekend. I failed it twice. This was of course due to bugs that hadn’t creeped up during my own testing, which takes me to one important point:

TEST FOR EVERY POSSIBLE USE CASE

I could have saved myself an entire day in certification time if I had realized that some people wouldn’t want to necessarily authenticate with Windows Live. Had I tested this, I would have seen that exiting a certain dialog crashed my app. Another important point to note when trying to certify an app that does ANYTHING with user data:

WRITE A PRIVACY POLICY

I got failed for this on this app. It makes sense that I failed because of this, but when you’re writing code, a privacy policy doesn’t always cross your mind.

All in all, I have to say I was quite impressed with how flexible and easy to use Azure Mobile Services were when it came to writing an app like this. I highly encourage you to sign up for a Windows Azure 90 day trial, and try out the Azure Mobile Services preview. The best part? You’re not tied down to Windows 8. You could use Android, Windows Phone, or even iOS. Because it’s REST based, it’s a very flexible framework. If you need any resources to get started with Windows 8 app development, check out the new 30 to Launch program.

Also, I’d really appreciate it if you went ahead and give my app a try. It’s free and fun, and it’s the only one like it on the Windows Store. And, it’s powered by the cloud. Yay cloud!

Windows 8 Professional and Visual Studio 2012 Professional now Available to DreamSpark Premium users

For those of you enrolled in a higher learning institution, you’ll be happy to know that, if your university has DreamSpark Premium (formerly MSDN Academic Alliance), you now have access to Windows 8 Professional. Simply log into your school’s DreamSpark Premium Portal, and you’ll see the following:

After that, just click the product you want, and enjoy the new bits.

MonoGame: XNA for Metro Style apps

As most of you may know, XNA is not supported as an option for Windows 8 Metro Style apps. As a result, those who use C# for game development have very few options with Metro Style apps. Wondering what alternatives there are to XNA, I did some scrounging around the internet to discover that MonoGame, an open source game development framework developed alongside Mono, was working on a Windows 8 branch of their technology. This is a great find for any C# developers looking to write games on Windows 8. So here is what you need to do to start porting your XNA games to Windows 8:

Prerequisites:

Windows 8 Release Preview
Visual Studio 2012 Release Candidate
MonoGame Template for Metro Style apps
MonoGame Binary (Built 6/7/2012 for your convenience)

Instructions:

Once you have installed and downloaded the required materials, we can get started. First thing you need to do is extract the MonoGame Template for Metro Style apps attached above to the folder

“%UserProfile%\My Documents\Visual Studio 2012\Templates\ProjectTemplates\Visual C#\”

like so:

image

Next, you can open Visual Studio and create a MonoGame Metro Style app, like so:

image

Now that you’ve created the project, you simply have to add a reference to MonoGame.Framework.Windows8.dll, located in MonoGame.zip:

image

Once that is complete, all of the errors should go away and the app should build without any problems. You’ll recognize the familiar cornflower blue background, except now it’s running as a Metro Style app!

image

Conclusion:

From here, the MonoGame APIs appear to be one to one with the XNA APIs. The only thing to note that, as of this posting, MonoGame for Windows 8 is still lacking support for the Audio and Effects API. That will soon be fixed, and a follow up post will be published.

Keep an eye out for the stable release of MonoGame for Windows 8 by checking the MonoGame GitHub and Codeplex pages in the next few weeks. Until then, you can always build from the Develop3D Branch.

Possible Kinect Fun Labs Dev Kit in the works?

If you haven’t heard, Microsoft announced yesterday that the Imagine Cup will now have a “Kinect Fun Labs Challenge” for this years competition. Students are tasked to “solve some of the worlds toughest problems” through the help of technology, in this case Kinect. I personally think this is incredibly exciting, because it gives students a chance to build innovative solutions with the Kinect Sensor.

First thing I did was browse the rules of the contest, wanting to get as much information as possible. I learned that all participants who move on to Round 2 of the competition will receive a free Kinect for Windows Sensor… and something a bit interesting. The following is taken from the official rules for the contest:

GAK

I’m not reading much into this, but it’s interesting to see that students will be getting a new SDK for Kinect Fun Labs. Perhaps we’ll see something come out for all developers in the near future? Only time will tell.

In the meantime, if you are a student passionate about changing the world through technology, sign up for the Imagine Cup today. Not only can you win a Kinect for Windows Sensor, but if your idea is great enough, you could win a free trip to Australia, as well as up to $8,000 USD. Sign up today!

Poking around in the Windows 8 Simulator

Over the last few months, I’ve been playing around with some of the new WinRT/Metro Style APIs that are introduced in Windows 8 Developer Preview. The end to end developer experience resembles the one introduced with the Windows Phone 7 tools, including a tool for testing your code. One such tool is the “Simulator”

The Simulator is a tool that resembles the Windows Phone 7 Emulator, in both look and functionality:

simulator_start

It looks like a Windows Slate chassis, and includes emulation ability for touch gestures, mainly Pinch to Zoom and Rotate. While sideloading the App to debug on the local machine is fine and dandy, it’s nice to be able to test things like Orientation change and touch.

One thing that took me by surprise with the Simulator is in the way it functions. When using it, I expected a similar environment the Windows Phone 7 emulator, I was surprised. I opened up the Desktop “app” on the simulator, only to be greeted with this:

simulator_desktop

That’s a fully functioning version of my desktop… running inside of a simulator…. running on my desktop. Desk-ception? What on earth is going on here? There is no way we’re virtualizing a full instance of Windows just to test apps. So what is the simulator doing?

I decided to peek around, only to discover that the Simulator is creating a Remote Desktop Session on the local machine. It looks for some entries in HKEY_LOCAL_MACHINESoftwareMicrosoftWinSimulator (Or HKEY_LOCAL_MACHINESoftwareWow6432NodeMicrosoftWinSimulator if you’re on 64-Bit), namely the DWORD DisableChildSession. If that DWORD is set to 1, it will then look for the RemoteMachine value (string), UserName value (string), Domain (string), and the PathToPasswordFile value (string). Using these values, I’m sure you could point the simulator to another machine running Windows 8 for debugging.

It’s also worth noting that the Simulator has a dependency on WinRT. While it just appears to be a normal .NET Application, if you try to move it to any other versions of Windows, it will not run.

Go ahead and mess with those registry keys and see what kind of results you can get. I’m curious to see what the Beta build brings around CES. Perhaps there will be more goodies or secrets hidden.

Spotlight Imagine Cup: Team GreenWorld

greenteam

The Imagine Cup Game Design competition is one of the most unique parts of the competition. Competitors have to think outside of the box to create fun, engaging games that also help solve world issues.

Team GreenWorld has built a solution that aims to help improve environmental conditions through education and motivation. They were partially inspired by the Sofia spring cleaning. They saw how people from all over the community would work together to clean their area.

Their game allows players to clean up and tend to a virtual world. The players go on quests with other players in the virtual world, and through these activities they can earn achievements and badges. The game seems to be styled in a similar fashion to the Farmville and Cityville social games.

I feel this game has a great amount of potential. While they may not have advanced beyond the first round of the competition, they still plan on bringing their game to market. You can read more about the project at there blog, here.

Until Next Time,
Patrick Godwin

Team Hawk Interview: Part 2

Part 2 of my interview with Team Hawk is up now! Check it out above.

Spotlight Imagine Cup: Team Walk2Help

TeamWalk2Help

Team Walk2Help is a Bulgarian team entering the World Wide Imagine Cup with a neat Windows Phone 7 application. They aim to help reduce carbon emissions while helping out charities.

I was able to sit in on Walk2Help’s presentation, and got quite a bit of insight as to what the project is about. They built a Windows Phone 7 application that tracks the amount of CO2 you save when walking. When you walk, you earn “credits”, that you can then redeem on their website to help charities. The more people walk, the more carbon we save, and the more people we’re able to help.

While they may not have made it much further in the competition, they did an amazing job building their project. The app is available now on the Windows Phone marketplace. Just search fro Walk2Help and make a difference.

If you support Walk2Help, please vote for them in the People’s Choice Awards here.

Until next time,
Patrick Godwin

Spotlight Imagine Cup: Team Hawk

(Photo from Tom Ziegmann’s Flickr stream)

This Imagine Cup is special in more ways than one. After all, it is the first time the worldwide event has been held in the United States. It’s also the first time Iraq has had a presence at the World Wide finals.

Team Hawk, a team from Iraq, has traveled far and faced many challenges to come here to the United States. They built a Windows Phone 7 application for easily registering and  tracking refugees in camps.

The team aims to “help refugees change their life for the better”. By registering refugees, they are able to get them welfare. Until a refugee is registered at a camp, they are essentially non-existent. Team Hawk wants to speed up this process, and help them get welfare as quickly as possible.

I sat down and interviewed Team Hawk. You can watch part one here:

 

While they may not have made it further, they still have overcome amazing obstacles and have great ideas. You can support them by voting for them in the People’s Choice Award voting here.

Until next time,
Patrick Godwin

Spotlight Imagine Cup: Team LifeLens

team1

One of my favorite things about the Imagine Cup is the amazing goals many projects carry. The spirit of the competition is in the innovative thinking of each of the competitors. They come together with the common goal of “Solving the world’s toughest problems”.

Team LifeLens exemplifies this theme greatly. They have decided to tackle Malaria, hoping to make detecting the disease a relatively simple and affordable task. They developed a Windows Phone 7 application that takes pictures of different blood samples and sends them up to a cloud service for processing.

The cloud service then uses computer vision image processing to count the blood cells in the sample. It then goes through and searches for infected cells. The algorithm they developed is currently 98% accurate, as opposed to 62% accurate when they started.

Since arriving in New York for the finals, the team has been excited. They feel that they are “one of the stars of the show”, which they really are. They, along with the over a hundred competitors are all winners on their home turf. Whatever happens now, they’ve all succeeded greatly.

Team LifeLens was featured on CNN the day of the 2011 Opening Ceremonies. They, along with some other Imagine Cup competitors, presented their projects to the world. You can take a look at it here:

Students with Microsoft CEO Steve Ballmer.

You can read the full article here.

LifeLens is already in talks with organizations to promote and test the solution they’ve developed. They believe that, after the Imagine Cup, they can change the world.

If you support their cause, please vote for them in the People’s Choice Awards here. I’ll be bringing constant updates about them, and other competitors, as a part of my coverage of the World Wide Imagine Cup Finals with the Student Partner Social Media Team. You can follow our coverage using the #mspsmt hashtag.

Until next time,
Patrick Godwin

Older Posts »