WINDOWS SURFACES Microsoft’S New Client OS Is Fl Ying High, but Should You 7 Rush to Migrate Your Apps to Windows 7? OCTOBER 2009 Volume 19, No
Total Page:16
File Type:pdf, Size:1020Kb
VisualStudioMagazine.com PLUS Four ways to synchronize threads with your app’s UI Inside Microsoft’s .NET Rx Framework WINDOWS SURFACES Microsoft’s new client OS is fl ying high, but should you 7 rush to migrate your apps to Windows 7? OCTOBER 2009 Volume 19, No. 10 2009 Volume OCTOBER Project5 8/24/09 2:17 PM Page 1 Project5 8/24/09 2:18 PM Page 2 Project6 8/13/09 12:37 PM Page 1 ESRI® Developer Network Integrate Mapping and GIS into Your Applications Give your users an effective way to visualize and analyze their data so they can make more informed decisions and solve business problems. By subscribing to the ESRI® Developer Network (EDN SM), you have access to the complete ESRI geographic information system (GIS) software suite for developing and testing applications on every platform. Whether you’re a desktop, mobile, server, or Web developer, EDN provides the tools you need to quickly and cost-effectively integrate mapping and GIS into your applications. Subscribe to EDN and leverage the power of GIS to get more from your data. Visit www.esri.com/edn. Copyright © 2009 ESRI. All rights reserved. The ESRI globe logo, ESRI, EDN, and www.esri.com are trademarks, registered trademarks, or service marks of ESRI in the United States, the European Community, or certain other jurisdictions. Other companies and products mentioned herein may be trademarks or registered trademarks of their respective trademark owners. October 2009 // Volume 19 // No. 10 Contents { FRAMEWORKS } 14 Michael Desmond, Editor in Chief, Visual Studio Magazine All I Really Need to Know In 1986, author Robert Fulghum published FEATURES the series of essays entitled “All I Really 14 Windows 7 Surfaces Need to Know I Learned in Kindergarten.” The book posited that success in adult life Microsoft’s new client OS is flying high, but does it really make sense can, in fact, come by following the guidance to migrate your apps to Windows 7? we were all given as children. Play nicely with BY MICHAEL DESMOND others. Share your toys. Put things away after you use them. Clean up your own messes. It’s taken 30 years, countless lawsuits and more than a few Steve Ballmer tirades, but it seems that Microsoft has taken many of Fulghum’s insights to heart. Since 21 LANGUAGE LAB announcing the Microsoft Interoperability Initiative early last year, we’ve seen the On VB PAGE 21 company move in a consistent and tangible Threading and the UI direction toward greater openness, Four ways to synchronize threads cooperation and interoperability. with your app’s user interface. You don’t have to be a cynic to spy a BY BILL MCCARTHY profi t motive in all of this. Redmond has Ask Kathleen PAGE26 never been in the business of leaving Getting Current on MEF money on the table, and some of Microsoft’s Readers explore Managed Extensibility most touted interop eff orts—cough, Open Framework, using callback delegates XML, cough—bear the clear marks of intense and how to create the equivalent of a self-interest. More recently, we’ve pondered C# partial interface in Visual Basic. decisions like Microsoft ending support for BY KATHLEEN DOLLARD its Oracle data provider in ADO.NET, forcing dev shops to seek a third-party provider. Yet, for every Machiavellian maneuver, DEPARTMENTS there’s a jQuery, an ASP.NET Model-View- Controller or a Mono Project. Microsoft 8 DevDisasters seems intent on winning developers from OldMail Method every quarter, be they .NET loyalists who BY ALEX PAPADIMOULIS (THEDAILYWTF.COM) can choose between Windows Presentation 6 Letters to the Editor Foundation and Silverlight, or Linux 10 DevInsight DEVELOPER NEWS, REVIEWS, PRODUCT BRIEFS die-hards who can turn to MonoDevelop or News: .NET Rx Framework: A Watershed Advance Eclipse-based Silverlight tooling. in Asynchronous Programming PAGE 10 Ten or even fi ve years ago, these Product Review: Turbo Charge Visual Studio with DevExpress CodeRush PAGE 12 kinds of cross-platform eff orts would have 31 Index of Advertisers been hard to imagine. Today, it’s hard to imagine Microsoft maintaining the loyalty of the developer community without them. COLUMNS Is Microsoft open enough or does it 3 Frameworks BY MICHAEL DESMOND need to go further? What would you like to see Redmond do to ensure the viability of 32 Redmond Review BY ANDREW BRUST your app dev over time and across platforms? COVER PHOTO: SHUTTERSTOCK PHOTO: COVER E-mail me at [email protected]. VisualStudioMagazine.com · October 2009 · VISUAL STUDIO MAGAZINE 3 Online Contents Get the complete picture — the latest dev news, analysis and how-to content—at VisualStudioMagazine.com and our partner sites in the Redmond Developer Network. VISUALSTUDIOMAGAZINE.COM REDDEVNEWS.COM ADTMAG.COM PHP Cache Accelerator RDN Express: VS2010 and .NET 4 Oracle 11gR2 Database Released for Windows Unveiled Beta 2 Expected Soon BY JEFFREY SCHWARTZ BY KURT MACKIE BY KATHLEEN RICHARDS Oracle Corp. released the fi rst major The new “Windows Cache Extension for Scott Guthrie, Microsoft’s corporate vice update of its fl agship database in two PHP” solution, currently in beta release, is president of the .NET developer platform, years with an upgrade focused on server an accelerator that works with the PHP answered a wide array of developers’ consolidation, improved storage and engine in Windows and Windows Server. questions in a Linked .NET Users Group extended data warehouse performance. webcast. Of particular interest was the But it remains to be seen what percentage FindIT code: Mackie1009 time frame of the Visual Studio 2010 and of Oracle’s installed base or whether other .NET 4 releases. enterprises will move to the latest version. Classic VB Corner Thoughtful UI Tweaks Can FindIT code: Richards1009 FindIT code: Schwartz1009 Make All the Diff erence BY KARL E. PETERSON Microsoft Releases Preview of IBM Launches Cloud-Based Desktop The diff erence between a successful pro- Windows Embedded Standard 2011 BY JEFFREY SCHWARTZ gram and a complete fl op may come down BY KURT MACKIE IBM Corp. released a virtualized client- to how you treat your users. Here’s how Windows Embedded Standard 2011 is computing off ering it touts as a cloud-based to make sure your app’s UI doesn’t annoy Windows 7-based, supporting both 32-bit desktop. The new service will let business users more than it helps them. and 64-bit x86 hardware. users log in to their desktops from either a thin-client terminal or low-end PC. FindIT code: Peterson1009 FindIT code: MackieB1009 FindIT code: SchwartzB1009 Practical ASP.NET RDN Express: In Sync with the Cloud Databinding Without Tables: BY KATHLEEN RICHARDS Red Hat Launches Linux Release Updates and Deletes The Live Framework SDK, tools and with KVM Hypervisor BY PETER VOGEL controls—including Contacts, MessengerChat, BY JOHN K. WATERS A look at the code required to support IDLoginStatus, IDLoginView and Red Hat Inc. released the fourth update of changing and deleting records. It’s here SilverlightStreaming—will no longer be the Red Hat Enterprise Linux (RHEL) plat- you’ll reap the benefi ts of converting XML available. Live Mesh, which is still in beta, form, which the company is calling the data into a DataTable in a DataSet. remains part of the Azure story. foundation of its virtualization portfolio. FindIT code: Vogel1009 FindIT code: RichardsB1009 FindIT code: Waters1009 VisualStudioMagazine.com RedDevNews.com ADTmag.com 4 VISUAL STUDIO MAGAZINE · October 2009 · VisualStudioMagazine.com Project2 8/24/09 10:57 AM Page 1 VisualStudioMagazine.com Letters October 2009 • Volume 19 • No. 10 Editorial Staff Vice President, Doug Barney Editorial Director Editor in Chief Michael Desmond Executive Editor Kathleen Richards News Editor Jeff rey Schwartz Managing Editor Wendy Gonchar Associate Managing Editor Katrina Carrasco Contributing Editors Not So Clear Andrew J. Brust, Ken Cox, Kathleen Dollard, A VSM reader responds to the September 2009 cover Roger Jennings, Jeff Levinson, Bill McCarthy, Karl E. Peterson, Keith Pleas, Peter Vogel, story on how to use the Repository pattern to eliminate Bill Wagner, Dan Wahlin, dependencies in Test-Driven Development. John K. Waters Art Staff This approach makes a ton of sense to me if you’re doing Creative Director Scott Shultz data access in the traditional ADO.NET fashion. But I’m not Graphic Designer Erin Horlacher as clear about how to use it when you’re using something Online/Digital Media like the Entity Framework (EF) for your data access (which Editor, VisualStudio Becky Nagel is obviously another Microsoft-recommended best practice). It Magazine.com Executive Editor, New Media Michael Domingo seems to me that you’d need to throw another two layers on top of the EF- Online News Editor Kurt Mackie generated objects for this to work (the repository plus the object facades), and that Associate Editor, Web Gladys Rama sort of misses the point behind letting the EF do the work for you. In other words, Web Producer Shane Lee I’d appreciate any suggestions on how to use database mocking with the EF. Ken Smith Woodinville, Wash. President Henry Allain Posted online Vice President, Publishing Matt N. Morollo Director of Marketing Michele Imgrund Online Marketing Director Tracy S. Cook ‘New’ and ‘Diff erent’ Is Windows 7 a fresh start for Microsoft and developers, asked VSM Editor in Chief Michael Desmond in his September Frameworks column. Here are a few of the responses that we received from VSM readers: President & Neal Vitale Chief Executive Offi cer Senior Vice President Richard Vitale How can a company that reinvents its products ever hope to make something & Chief Financial Offi cer work? Had development continued on XP, it could have evolved into Vista and Executive Vice President Michael J.