In-Depth

Working the New Framework

What early adopters are saying about the new development technologies for Windows.

They don't call it the cutting edge for nothing. Just ask the developers who've been along for the three-plus-year ride as Microsoft has conceptualized, rethought, renamed and finalized the .NET Framework 3.0 (.NET FX 3.0).

.NET FX 3.0, the set of technologies formerly known as WinFX, ultimately will make many developers' lives easier, according to both Microsoft and developers themselves. The goal of the framework-which consists of Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), Windows CardSpace and the .NET Framework 2.0-is to raise the abstraction level to which developers need to write. The theory: By sheltering developers from more of the in-the-guts plumbing at the core of next-generation software, .NET FX 3.0 will allow them to focus on their actual apps rather than their underpinnings. (For details on the framework, see ".NET FX 3.0 in a Nutshell.")


Unlike the .NET Framework 2.0, which Microsoft released in October 2005 as a separate downloadable add-on to Windows XP, .NET FX 3.0 will ship as part of Windows Vista, due out in November. That move-coupled with Microsoft's 2004 decision (spurred by the developer community) to back-port the new framework to Windows XP and Windows Server 2003, rather than making it a Vista/Longhorn Server deliverable only-has created a wider pool of potential users who will be able to run .NET FX 3.0-based applications.

"A lot of what you can do with .NET FX 3.0 you could do before, but it was prohibitively difficult," says Ami Vora, Microsoft's product manager for the new framework. "It makes the hard stuff easier and the impossible stuff way more possible."

Those are some big claims. Is .NET FX 3.0 living up to them? Developers who've been mucking around in the .NET FX 3.0 trenches are the best judges. But there seem to be few who've done more than kick the tires of WPF or dabble with WCF code samples.

Not many code jockeys seem to have tried to build anything substantial using .NET FX 3.0 -- outside of those who have developed demonstration prototypes for Microsoft conference purposes or the handful of customers and software vendors with whom Microsoft has built examples of killer Vista apps showcasing WPF. Among the latter category are The New York Times Reader, a news-distribution application co-developed by Microsoft and The New York Times; a virtual sports car test-drive site created by Mercedes-AMG; a health-monitoring application from Allscripts Healthcare Solutions Inc.; and a CRM app developed by Dollar Thrifty Automotive Group Inc.

Which Comes First: the Tool or the Technology?
Currently, it's not so easy to use .NET Framework 3.0 components. No surprise, the new framework has been a true work in progress, with different Community Technology Preview (CTP) test builds adding new features that other subsequent test builds just as quickly removed. Some CTPs worked with only certain test builds of other Microsoft products, and not always the most current ones.

Scott HanselmanThe changing and morphing feature set has posed a challenge to early adopters. Even some of Microsoft's creme-de-la-creme developers, like Scott Hanselman, who's both a Microsoft Regional Director and a Microsoft Most Valuable Professional (MVP), admit that .NET FX 3.0 is not kids' stuff.

"The installation of the whole stack, particularly the development tools, was a pain," says Hanselman, chief architect with Corillian Corp., a Hillsboro, Ore.-based financial-services integrator. "Each CTP required the un-installation of the previous stack-often in specific order. It'd have been nice if they'd built a wrapper around the entire thing."

Those hassles will almost certainly be resolved in the final product, but the issue of development tools remains. While developers can and have been using current Visual Studio releases in building their .NET FX 3.0-centric applications, the family of tools optimized for the new framework isn't done yet. Visual Studio, code-named "Orcas," which Microsoft watchers are expecting to ship some time in 2007, is the tool suite tailored for .NET FX 3.0. Other .NET FX 3.0-specific development tools, such as Visual Studio Designer (code-named "Cider"), which will complement WPF, are still in testing. Microsoft has hinted that there will be other, as-yet-unannounced modeling and development tools that will be customized for specific .NET FX 3.0 subsystems, such as WCF and WF.

"Microsoft hasn't really talked much about what kind of support the Orcas release of Visual Studio will have for these technologies," says Greg DeMichillie, an analyst with Directions on Microsoft, a Kirkland, Wash., research firm focused exclusively on Microsoft.

"The main 'gotcha' that we've seen has been the relative lack of development tools in the ecosystem specifically ready for WPF," says Brad Wardell, CEO of Stardock Corp., a Plymouth, Mich., ISV best known for its software for customizing the look and feel of Windows.

"It was a challenge as we moved forward with the technology having compatible tools for each CTP where we were able to keep our workflow going," Wardell says. "What slowed us down most were the times we had to resort to more basic methods when updated versions weren't yet available and the output of the past tools had been rendered incompatible. There were the occasional and, unfortunately, inevitable times when we had to completely stop our workflow due to lack of information and proper, up-to-date tools."

Building on the .NET FX 3.0 Foundation
Still, some developers have managed to build applications atop the house of cards that is .NET FX 3.0.

Hanselman is helping Corillian develop a .NET FX 3.0-based version of Voyager, a platform for consumer online banking, alerts, statements and bill payment that Corillian sells to banks, credit unions and other financial institutions. Corillian claims that roughly 25 percent of U.S. retail online-banking traffic passes through servers running Corillian software.

The current version of Voyager is based on COM and DCOM, Microsoft's Component Object Model infrastructure for connecting clients and servers, which Hanselman describes as "still working great and scaling to great heights."

Windows CardSpace
[click image for larger view]
The ultimate goal of Windows CardSpace (formerly known as InfoCard) is to furnish users with a way to provide their digital identities to online services in a simpler and more secure way.

But Corillian was interested in the flexibility and security of the WS specifications, which are at the heart of WCF.

"We've actually been preparing our platform and our development experience for WCF for almost three years. We moved to a Contract-First design approach years back and we use XML Schema and Web Services Description Language to describe our services -- even our non-Web service services," Hanselman explains. "Our developers use a programming model that is very similar to WCF today, creating service proxies with clear delimitation between service boundaries, like WCF. We've created an SDK with a very specific facade that will allow us to move to WCF without disrupting -- and possibly without changing -- our existing application stack. WCF will just slide in cleanly, offering all its goodness without hassle."

Corillian is also integrating WF into Voyager and has started exploring how to get banks to adopt CardSpace as the core of their future identity platforms.

"There are dozens of great ways to make a workflow engine work for us," Hanselman says. One example: Small-business approval workflows that set perimeters such as: "Fred can pay PGE up to $500, but anything more requires a manager approval."

"But WF can also be used to describe lower-level technical workflows like 'authenticate, audit, route' that an implementation can then extend with a visual designer," Hanselman adds.

Getting Dirty with WCF
Another development shop that has gotten its hands dirty with WCF is Flowfinity Wireless Inc. of Vancouver, British Columbia, Canada. The company is priming the next version of its core Flowfinity Actions application to take advantage of the new communications and presentation technologies in .NET FX 3.0, says President and CEO Dmitry Mikhailov.

Flowfinity Actions manages data flow for process-oriented business teams, especially when these teams combine mobile employees, deskbound workers and their business managers. Several Fortune 500 companies are using the current version of the app on wireless handhelds and desktops, Mikhailov says.

Flowfinity is optimizing the Actions integration interface -- the component that integrates Flowfinity Actions with ERP, CRM and other proprietary business applications -- for WCF. The company's goal in doing this was to streamline and simplify the developer experience for customers and partners who customize Flowfinity's application. Exchanging XML documents over Simple Object Access Protocol (SOAP) was just too complicated.

"COM was never considered. We needed server-side integration capability and we knew it had to be Web services," explains Mikhailov. "The question was which Web services technology would best meet our requirements for the level of required developer skills and amount of code that needs to be written by our customers."

His company looked at many other options, including .NET 2.0, Axis and BEA, among others. "With WCF we are best positioned to meet budget and time limitations of our enterprise customers," he says.

Kevin Hoffman is a research developer with Liquidnet Holdings Inc., a New York City-based electronic brokerage built exclusively for institutional equity trading. He's another early WCF and WF adopter. In his off hours, Hoffman is developing Ulysses Agenda, a peer-to-peer networking game that highlights its creator's trading background.

"It's basically a space trading game where the goal is to completely annihilate all of your competition, both financially and with as many big guns as you can muster," Hoffman explains.

The game relies on multiple peer meshes for communicating player location details, combat data and other informational messages. The target audience is developers who like to game. Hoffman's goal is to publish the full source code on Microsoft's CodePlex code-repository site, so that "developers can not only have fun playing it, but learn a truckload of cool code in the process," he says.

Beyond proof of concept, why go the still-untried and unproven WCF route?

"If you're thinking of creating a peer-to-peer application using managed code, it's a virtually foregone conclusion that WCF is the framework for new applications in this space," Hoffman says. "WCF is easy to use, has a pretty low barrier to entry, there are tons of samples available online, and it's 100 percent managed code. It doesn't get much better than that."

The "Universe Server" part of the game is a WCF service, "though it's a more traditional service that provides TCP-based RPC-style method invocations used when global game state needs to change," Hoffman says. But, he adds, "without WCF, I wouldn't have even bothered getting into that space without evaluating using someone else's middleware tool or using something like DirectPlay."

.NET FX 3.0 in a Nutshell

.NET Framework 3.0 (formerly WinFX) is the new managed code programming model for Windows. At its heart is the .NET Framework 2.0, which consists of Microsoft's Common Language Runtime (CLR) virtual machine and associated class libraries. Microsoft is building a number of new, higher-level subsystems around the .NET Framework 2.0 center. These include:
  • Windows Presentation Foundation (WPF) user-interface piece, code-named "Avalon"

  • Windows Communication Foundation (WCF) communications subsystem, code-named "Indigo"

  • Windows Workflow Foundation (WF) workflow subsystem, code-named "WinOE"

  • Windows CardSpace digital-identity component, code-named "InfoCard"
The new framework will be part of Windows Vista and Longhorn Server and will be available as a downloadable add-on for Windows XP and Windows Server 2003.
-- M.J.F.

Hoffman's biggest challenge: utilizing Peer Name Resolution Protocol (PNRP). "This is the service that is responsible for managing the names of all your meshes, as well as who is using them," he explains. "The node optimization actually happens in the WCF client code and in the messages themselves. I ended up deciding to write my own name resolver so that I could keep the mesh resolution private to just users of my game."

The Workflow Foundation component of .NET FX 3.0 also has figured in Hoffman's development work. He's using WF to control the behavior of the game's non-player characters (NPCs) -- that is, characters who don't belong to any particular player. "Workflow gives me a visual surface to lay out the logic that controls my user interface. With a state machine workflow, I can visually model how a user can get from point A to point B in my application. If I'm a good little programmer and design the GUI to be properly subservient to the workflow, then if I need to change the logic of how the transitions all work, it's just a matter of tweaking the workflow," Hoffman says. "Using the workflow in an application with GUI forces me to make better decisions about separating business logic from the interface-something we should all be doing regardless of the underlying technology," he adds.

Whether they're coding a game, a Windows skin or a financial app, the .NET FX 3.0 pioneers agree on one thing: Even with its rough spots, the new Microsoft framework ultimately will let programmers focus on what they do best: write apps, not struggle with plumbing.

As Corillian's Hanselman puts it: "The higher Microsoft raises the water level, the higher our boat floats."

Reader Comments:

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above