Techworld

First look: Microsoft's sharp, new Windows Phone SDK

Windows Phone SDK 8.0 gives developers extensive features, snappier code, lots of help, and the option to code in JavaScript and HTML

Was it only six years ago that Windows Mobile was a big part of the cellphone business? That was a time when only programmers thought of a mobile phone as a computer. Now we're heading into the second or third generation of the smartphone, and the little thin slabs are becoming even more complex than the desktop. Do you want to edit a document? Find your way home? Take a picture? Send email? Actually talk with someone? Your smartphone is there for you.

We've come a long way from Windows Mobile and BlackBerry. In the meantime, Microsoft looked into the abyss and realized it had no choice but to match the iPhones and Android mobiles feature for feature. The company clearly spared no expense or effort in building something that offers more or less the same extensive list of features as iPhones or Android smartphones. Then Microsoft tacked on a few cool ideas and its own distinctive style that will lure those who love the mod, '60s look.

[ Also on InfoWorld: Review: Visual Studio 2012 shines on Windows 8 | Get expert advice about planning and implementing your BYOD strategy with InfoWorld's 29-page "Mobile and BYOD Deep Dive" PDF special report. | Keep up on key mobile developments and insights with the Mobilize newsletter. ]

This isn't just a challenge for the programmers inside Microsoft. The Windows Phone 8 platform can't become relevant on its own. A smartphone today needs apps from an app store, and an app store needs developers, and developers need SDKs. If Microsoft wants to ship phones, it will need programmers to work with the SDK and start creating apps.

Microsoft just released the Windows Phone 8 SDK last week. The first thing any programmer will notice is extensive breadth and the depth. It's not just a tool for putting some buttons on the screen. Today's developer must be ready to build a slick user interface that can work with the various roles of a smartphone.

Windows Phone 8 languages and runtime The good news is the new version of the SDK includes extensive documentation written with plenty of detail for you to explore as you poke around all the different ways you can build a Windows Phone 8 app. There are hundreds of good examples, though even that might not be enough to cover everything we'll need to learn to work with the SDK. Microsoft thoughtfully includes a separate forum where programmers can write requests asking for new examples and vote for other people's requests. This is a smart feedback mechanism that should help Microsoft develop what the programmers really want to use.

Most of the examples are written in C#, the language that will probably be the first choice for many of the developers. The presentation layer filled with widgets is written in XAML, while the C# code lies bundled in objects waiting for the events to come its way. Microsoft calls this a "managed app." Most of your diddling will probably be choosing the right XAML layout widget so that everything looks just right. You can produce something quite nice by putting the right widgets in the XAML file and letting the OS manage the rest. The C# will pull data in and out of objects, then swap those objects with other parts of the code.

The free Windows Phone SDK 8.0 comes with Visual Studio 2012 Express for Windows Phone (main editor shown), the Expression Blend UI design toolkit, Windows Phone 8 and Windows Phone 7.1 emulators, and plenty of templates to get you started.

C# is not the only choice; C++ and Visual Basic are options as well. Native, C++ apps will probably be the first pick for anyone building a game that requires zippy performance. That said, the arrival of the .Net Framework in Windows Phone 8 promises significant improvements in app performance and responsiveness, thanks to a new asynchronous programming model and a more efficient runtime engine. Microsoft claims Windows Phone 8 apps will launch faster too, since they'll be compiled in the Windows Store cloud instead of "just in time" on Windows Phone 7 devices, though I haven't experienced this.

A more interesting option than C#, Visual Basic, or C++ is the rise of JavaScript and HTML. Microsoft's documentation claims HTML isn't a full-fledged "app model," whatever that means, but also points out it's quite possible to plop a version of IE into a box in your app using XAML. Internet Explorer takes over and does the rest. Windows Phone 8 comes with IE10, which means that many of the new features of HTML5 are available.

I think JavaScript and HTML will be the form in which many of the early apps appear. It's quite simple to take an HTML5 app written in the likes of Sencha Touch or jQuery Mobile and port it to an iPhone, Android, and Windows Phone 8 device. The folks at Sencha, for instance, were given early access to the platform; I think Microsoft knows it's an easy way for people to create cross-platform apps. Tools like Apache Cordova are up-to-date and ready to turn the pile of JavaScript and HTML into a Windows Phone 8 app. Anyone who built a basic HTML5 app with Cordova should be able to port it in just a few minutes.

More than a dozen different coding templates come with the free version of Visual Studio you get with the SDK. If you're looking to create something that pulls data and displays it in a list, there's a template that's done much of the work for you. The IDE makes it pretty easy to pick up the SDK and get something running in the simulator. It should be noted that the simulator is much more responsive than many of the Android or BlackBerry devices around, though for some reason it doesn't accept text from my keyboard. It forced me to use the simulated phone's keyboard. Note too that you'll need to run Windows 8 on a SLAT-enabled CPU (such as Intel's Core I series) to make the simulator go.

Beyond the classic appsBasic data-driven apps are just the first thing you'll see. Microsoft recognized that many smartphones are often more camera than phone today. I'm sure many people use Instagram or the photo-sharing features of Facebook more often than they talk and listen to the voices of their friends who actually ring them on the so-called phone. If you want to develop software that uses the camera on Windows Phone 8 devices, a big corner of the SDK is waiting for you.

Microsoft calls one class of apps a "lens." If you happen to write a lens, it becomes available in the built-in camera application. The user will pop up the camera and swap "lenses." A lens app is more a plug-in for the built-in camera than a stand-alone item.

I think this is a good feature for the user because it cuts down on the clutter. It also simplifies some of the work for the developer, but developers may feel like they're losing their identity in a demotion from full-fledged app to mere lens. The lens creator now has some user interface guidelines to follow. While this may lead to ego deflation, it makes the camera experience simpler and more consistent for the user.

The Windows Phone 8 emulator, which lets you test for devices at three screen sizes, offers a nice way to test the reaction to acceleration. Note, however, that it runs only on Windows 8 and modern hardware.

Some of the lenses will be devoted to nostalgic fiddling with the colors or changing the contrast until it looks like a picture from a disposable plastic camera made in 1974. But a Lens app can be much more than a color filter for postprocessing. You can add controls that will do anything you want to do with the image, including posting it to a website.

The camera is not the only part given special treatment. You can now write "VoIP apps" that integrate directly with the phone. Although Microsoft paid plenty of money for Skype, the company is ready to give any VoIP app first-class standing in the API. I'm not sure how this might upset the people who own the cell towers and pay for them by selling minutes. However, it's a forward-looking solution that recognizes there's more than one way for a mobile phone user to place that one telephone call they make each year on Mother's Day.

The tower owners might also take note of the Data Sense feature, a meter that tries to track how many bytes are going in and out of your phone. The good app developer can use the Data Sense API to check on usage and, perhaps, delay downloading that file until the user is connected via Wi-Fi. If the app developers pay attention -- and they should -- users will like the control this gives them over their monthly ration of cell bits.

App Store in Windows clothing It's not all good news. Microsoft is following Apple down the road to programmer serfdom by adopting strict central control of the Windows Store app store, and early stories are mixed. Some developers are reporting the same kind of frustration that greeted developers at Apple's App Store. The economic model of apps sold at $1 or $2 can't support the lengthy code review that programmers need, so the app store turns into a black box where a bunch of overtaxed reviewers reject items with inscrutable messages.

The economics will take some time to work out. Microsoft is offering a steep discount for developers who want to start submitting apps; it's just $8 to join. The game for the company is to attract as much talent as possible to build a viable app store, though the move seems also to have annoyed a fair number of Windows Phone developers who recently paid $99 for the same privilege.

Despite these economic challenges, programmers with experience developing for Microsoft's platforms should be overjoyed by this SDK, especially those who are well-versed in XAML, C#, Visual Basic, or C++. Finally there's a good path to using that knowledge to create an app running on a thin tablet or a mobile phone.

The SDK, though, is more than just an opportunity to catch up with the iPhone or the Android world. Some parts of it offer new features such as lenses and VoIP apps that will create a unified world that's simpler and more harmonious for the user. This alone promises that Windows Phone phones will have some advantages -- if Microsoft can attract enough programmers and phone owners to nurture an ecosystem.

This story, "First look: Microsoft's sharp, new Windows Phone SDK," was originally published at InfoWorld.com. Follow the latest developments in Windows, mobile technology, and application development at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.

Read more about application development in InfoWorld's Application Development Channel.

Comments are now closed.
Related Coverage
Related Whitepapers
Latest Stories
Community Comments
Tags: Mobile Development, application development, mobile technology, Microsoft Windows, Microsoft, software, operating systems
Whitepapers
All whitepapers

Top Whitepapers

Twitter Feed

Featured Whitepapers