In-Depth

Windows 7 Surfaces

Microsoft's new client OS is flying high, but does it really make sense to migrate your apps to Windows 7?

The Siamese fighting fish that has graced the desktop of beta versions of Windows 7 has come to symbolize Microsoft's latest operating system for many developers.

Like the betta fish itself, Windows 7 is hardly the biggest marauder in the sea. As prominent industry blogger and Redmond magazine columnist Mary Jo Foley notes: "Windows 7 is basically-in spite of Microsoft's claims-a minor update. It is Vista, fixed."

For developers and beta testers, the released to manufacturing (RTM) of Windows 7 in September marked an overdue watershed. It has taken three years and untold millions of dollars in lost sales and additional development, but Microsoft has finally launched the successor to Windows XP. The question now is, will developers flock to it?

Fishing for Insight
If readers of Visual Studio Magazine are any indication, the answer to that question is "yes." We surveyed 450 developers to get their feedback on Microsoft's new OS, and were struck by the overwhelmingly positive response. Two-thirds of respondents found Windows 7 to be either very or somewhat impressive, while only a little more than 2 percent described the OS as disappointing. What's more, nearly 60 percent of respondents said they're either already developing for Windows 7 or expect to start doing so within the next 12 months. Another 18 percent expect to start developing for the OS in the next 12 to 24 months.

Those figures are striking when compared to the reported uptake of Windows Vista, launched in November 2006. Forrester Research Inc., in its annual hardware survey published in January 2009, found that only 10 percent of PCs in the enterprise were running Vista.

In our survey, respondents cited customer install base, lack of hardware compatibility and problems with the Vista OS as reasons for staying with XP. Slightly more than 20 percent of respondents said they were actively supporting Vista. Notably, when survey participants were asked to specify the one aspect of Windows 7 that they were most excited about, a large number basically responded: "It's not Vista."

One respondent claimed interoperability issues with SQL Server CE 2.0 forced his shop to stay on XP, while another described installation and program download issues with Vista machines that ultimately reduced his shop to sneaker net. "We got around [the problem] by downloading and extracting the [installation] package on an XP machine, then moving the folder that contained it to a flash drive and carrying it over to Vista," he explained. "The install on Vista worked fine after that."

Windows 7 has tackled many of the problems that stalled Vista. Stephen Chapman, publisher of the UX Evangelist blog, has been investigating Windows 7 since its early days as a private community technology preview (CTP).

"To put it in terms dev shops would like to hear, Windows 7 is Windows XP with the best of Windows Vista's visuals and the addition of revolutionary usability components, such as the new Taskbar," Chapman says. "There's no negative stigma following around

Windows 7. Development went smoothly and Microsoft ran a tight ship to see to it that a Windows Vista snafu wasn't revisited."

Foley credits the leadership of Microsoft Windows Division President Steven Sinofsky, who was brought over from the Office group to establish a more disciplined and incremental development philosophy in the wake of Vista.

"Instead of continuously changing the Windows code base-making the platform a moving target for developers-Microsoft with Windows 7 stabilized the product very early. It was API-complete last fall," Foley explains. "Sinofsky's discipline and rigor around this approach paid off with Windows 7."

Compelling Case
Microsoft touts a host of Windows 7 improvements, including refinements to the security infrastructure and User Account Control (UAC), optimized I/O handling and trigger-start services that can cut down on the number of constantly open background processes consuming system resources. In fact, performance under Vista was so bad that surveyed developers cited the improved performance of Windows 7 as the most exciting aspect of the new OS.

The most visible change, however, comes in the form of the retooled and feature-laden Taskbar. Under Windows 7, Chapman says, the Taskbar becomes a focal point for application interaction. That has major implications for application developers tuning their apps for the new OS.

"Jump Lists, Progress Bars, Custom Switchers, Thumbnail Toolbars and Overlay Icons are all pieces of the new Taskbar that you should familiarize yourself with," Chapman explains. "It may seem like a lot to take on, but just take a week or two to play with

Windows 7's new Taskbar. In essence, one could interact completely with an application solely through its Thumbnail Toolbars and Jump Lists."

In our survey, respondents asked to name the most compelling characteristic of Windows 7 singled out fundamental issues like system performance, stability and compatibility. However, the enriched Taskbar environment emerged as the most frequently cited feature upgrade in Windows 7.

One survey respondent summed it up well: "The user interface is most impressive, but the added security and stability that we've seen with the testing we've conducted have been extremely impressive, to say the least."

Developers also singled out the new Multi-Touch user interface, which provides a standard way to enable rich, touch-screen interaction with Windows applications. "We write software for a manufacturing environment, with exclusive use of touch screens for user I/O, so we're extremely excited about Multi-Touch UI," wrote one respondent.

For her part, Foley says she hasn't seen a lot of grassroots developer interest in Multi-Touch. In fact, she says, developers seem focused on making sure their current bits will work under the new regime.

"Microsoft is trying to drum up support for new apps that will use the touch/gesture/sensor capabilities built into Windows 7, but I haven't heard developers clamoring to get on board that train," Foley says. "I think most folks are more fixated on making sure apps that work on Vista still work on 7, and apps that work on XP can run at least via XP Mode, if not via some kind of port or update to Win 7."

The situation is somewhat reminiscent of Microsoft's effort to promote Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) development on Windows Vista. Foley says she hasn't seen many WPF-, WCF- or WF-optimized apps. "It'll be interesting to see if rich, fat-client apps materialize for Win 7," she notes.

Native Son
Even as Microsoft touts new features of Windows 7, the tooling to take advantage of these improvements remains in progress. Windows 7 ships with .NET Framework 3.5 Service Pack 1 (SP1), but many new features in Windows 7 aren't supported in this iteration of Microsoft's managed-code framework. .NET-based support for Jump Lists, Multi-Touch UI, Sensor and Location platform and other new functionality will arrive with .NET 4, expected to ship alongside Visual Studio 2010 early next year.

In the meantime, Microsoft has provided the Windows 7 API Code Pack for .NET for free download. The successor to the Windows Vista Bridge project, this library of managed-code wrappers lets .NET developers access native code libraries in Windows 7 that aren't recognized by the current .NET Framework.

Among the supported features in the API Code Pack: Taskbar features like Jump Lists, Progress Bar and Overlay; Sensor Platform APIs; and Direct 3D 11.0, as well as earlier versions. The Code Pack also addresses Windows 7 Libraries and Shell, the Explorer browser, and Windows 7 and Vista Common File and Task dialogs. Support for ribbon toolbars and Multi-Touch is not present.

Rob Sanfilippo, research vice president for Development Tools and Strategies at analyst firm Directions on Microsoft, says the lack of .NET support for new Windows 7 features won't blunt early development.

"Regarding the Windows 7 API Code Pack, I think this is an acceptable stopgap between Windows 7 and .NET 4 RTM for the first wave of Windows 7 developers. It provides access to many of the interesting new features in Windows 7, such as Jump Lists and other new Taskbar functionality, although it does miss a couple of Windows 7 features like ribbon toolbars and Multi-Touch," Sanfilippo says. "The Code Pack, along with the available .NET 4 beta and Windows 7 SDK, should get .NET and native code development teams ramped up before the Visual Studio 2010 wave of products ships by the middle of 2010. So I don't think there's a need to delay planning and initial development on the new platform," he adds.


[Click on image for larger view.]

Some developers, however, were upset to learn that .NET coders must wait to gain access to features available to native C and C++ programmers.

"This is a bugbear of mine," wrote Kevin Daley, a New Zealand-based developer. "I attended PDC [the Microsoft Professional Developers Conference] 2003 where we were given a very clear message that Microsoft expected developers to go with .NET over native code for everything above the level of device drivers and so on. This was an excellent idea, but sadly it was abandoned. Vista shipped with more native libraries, and Windows 7-which I love, by the way-with a truckload. The .NET wrappers are an afterthought."

Has Microsoft turned its back on managed-code development? Not a chance, says Sanfilippo.

"The support for native code libraries that continues for Windows 7 isn't surprising, since a large portion of new Windows applications, including Microsoft's own offerings, don't employ the .NET Framework," he explains. "I wouldn't go as far to say this is a

reversal of Microsoft's .NET vision, but the reality is there are many development teams that will take more time to gradually adopt .NET-and some that will never adopt it."

Bola Rotibi, analyst for U.K.-based research firm Macehiter Ward-Dutton Ltd., says any effort by Microsoft to iron out all interdependencies between the OS and framework would result in very long release cycles-the very thing that helped tank Vista. Like Sanfilippo, she says the API Code Pack offers a sound transition for .NET coders.

"So long as Microsoft is able to ensure that there's a smooth transition from those using the API Code Pack to .NET 4 when it becomes available, as well as minimize the potential for rework, [it will be OK]," says Rotibi, who adds that developers must architect their applications to streamline this transition.

The developers we surveyed seemed generally unconcerned about the delay. Only 26 percent of surveyed respondents said they were disappointed that .NET 4 was not part of the Windows 7 launch. Many simply want Microsoft to ensure that its platforms and frameworks are fully cooked before they ship.

"Even though it's my understanding that the Multi-Touch UI API will be available in .NET 4, we can continue to build our business objects using .NET 3.5 and implement the UI in .NET 4," said one developer.

Swimming Upstream
In fact, Microsoft has been aggressive in managing the inevitable transitions that are part of the Windows 7 launch. Windows 7 Professional, Ultimate and Enterprise editions offer Windows XP Mode, a virtual instance of XP that allows XP-compatible apps to run natively on Windows 7 desktops. The capability should enable dev shops to maintain a single app code base for XP and Windows 7 clients.

Microsoft is also touting the ability for .NET developers to write Windows 7-savvy applications that scale across all three contemporary OSes: XP, Vista and Windows 7. In a blog post, Microsoft Senior Product Manager Scott Hanselman describes PhotoView, an XP to Windows 7 (XP2Win7) reference application that taps the available features and resources of each OS to provide an optimal experience without requiring discrete code.

PhotoView is a WPF-based image viewer that runs on XP. When running on Vista, the app is able to hook into the UAC infrastructure for security configuration. When running on Windows 7, the app provides Jump Lists, interacts with Windows 7's robust power management, enables rich Taskbar iconography and takes advantage of Windows 7 Libraries-essentially metafolders that provide flexible and intelligent file and content storage. The sample app and source code can be found here.

The upshot is that dev shops can successfully write apps that span XP, Vista and Windows 7, while taking advantage of the extended features and capabilities available in the newest Windows OS.

The combination of Windows 7's XP Mode and scalable feature support should help dev shops struggling with legacy code to move forward more decisively.

"To be honest, we love XP. In our opinion, Vista was just not cut out to be a business-oriented operating system," wrote one developer. "We agree that it's time to retire XP. The question is: Can Windows 7 reach that goal?"

UX Evangelist's Chapman says absolutely. "Windows 7 is everything great about both XP and Vista. All it needs is exposure," he says. "Having used it for my main OS since beta 1, I can vouch for its stability, capabilities and what will hopefully be longevity."

Between the emphatic feedback from Visual Studio Magazine readers and the positive insight of industry watchers, it seems that with Windows 7 Microsoft may have finally created a desktop OS worth targeting again.

Perhaps we were all wrong about the little betta fish on the Windows desktop background image. The play on words may not have been on "beta," but on "better." As in, a better Windows.

comments powered by Disqus

Featured

Subscribe on YouTube