Shake and Skip to Interact with Your Music Codee Covera Gee Forr
Total Page:16
File Type:pdf, Size:1020Kb
Accelerometers Synchronization Coverage COLUMNS Toolbox Shake and Skip to Interact with Your Music Distributed Caching, Object-Object Chris Mitchell page 40 Mapping, Blogs and More Scott Mitchell page 9 Parallel Debugging CLR Inside Out What’s New in the .NET Framework 4 Base Class Library Justin Van Patten page 15 Cutting Edge Exploring ASP.NET 4.0—Web Forms Code Coverage for Concurrency and Beyond Dino Esposito page 22 Chris Dern & Roy Patrick Tan page 46 The Polyglot Programmer Event Tracing Event Tracing for Windows Concurrency with Channels, Domains and Messages Ted Neward page 32 Security Briefs Debugging Task-Based Parallel Applications in Visual Studio 2010 A Follow-on Conversation About Threat Modeling Daniel Moth & Stephen Toub page 54 Michael Howard page 68 Extreme ASP.NET Search Engine Optimization with ASP.NET 4.0, Visual Studio 2010 and IIS7 Scott Allen page 72 Foundations Charting with DataTemplates Charles Petzold page 79 MSDN Magazine Core Instrumentation Events in Windows 7 Dr. Insung Park & Alex Bendetov page 62 Windows with C++ Drawing with Direct2D Kenny Kerr page 86 at msdn.microsoft.com/magazine: THIS MONTH Going Places USABILITY IN PRACTICE: The Tao of Screen Design An Introduction to IPsec VPNs Dr. Charles B. Kreitzberg & Ambrose Little on Mobile Phones MESSAGE ORIENTATION: Decouple Applications with Ramon Arjona page 91 SQL Server Service Broker SEPTEMBER Juan Carlos (John Charles) Olamendy Turruellas 2009 SEPTEMBER 2009 VOL 24 NO 9 Vol 24 No 9 Vol SEPTEMBER 2009 VOLUME 24 NUMBER 9 LUCINDA ROWLEY Director EDITORIAL: [email protected] HOWARD DIERKING Editor-in-Chief NANCY MICHELL Senior Editor TERRENCE DORSEY Senior Editor WEB SITE MICHAEL RICHTER Webmaster CONTRIBUTING EDITORS Don Box, Keith Brown, Dino Esposito, Juval Lowy, Dr. James McCaffrey, Fritz Onion, John Papa, Ted Pattison, Charles Petzold, Jeff Prosise, Jeffrey Richter, John Robbins, Aaron Skonnard, Stephen Toub MSDN Magazine (ISSN # 1528-4859) is published monthly by TechWeb, a division of United Business Media LLC., 600 Community Drive, Manhasset, NY 11030 516-562-5000. Periodicals Postage Paid at Manhasset, NY and at additional mailing offi ces. Back issue rates: U.S. $10. All others: $12. Basic one-year subscription rates: U.S. $45. Canada and Mexico $55. Registered for GST as TechWeb, a division of United Business Media LLC., GST No. R13288078, Customer No. 2116057 Canada Post: Publications Mail Agreement #40612608. Canada Returns to be sent to Bleuchip International, P.O. Box 25542, London, ON N6C 6B2. All other foreign orders $70, must be prepaid in U.S. dollars drawn on a U.S. bank. Circulation Department, MSDN Magazine, P.O. Box 1081, Skokie, IL 60076-8081, fax 847-763-9583. Subscribers may call from 8:00 AM to 4:30 PM CST M-F. In the U.S. and Canada 888- 847-6188; all others 847-763-9606. U.K. subscribers may call Jill Sutcliffe at Parkway Gordon 01-49- 1875-386. Manuscript submissions and all other correspondence should be sent to MSDN Magazine, 6th Floor, 1290 Avenue of the Americas, New York, NY 10104. Copyright © 2009 Microsoft Corporation. All rights reserved; reproduction in part or in whole without permission is prohibited. POSTMASTER: Send address changes to MSDN Magazine, P.O. Box 1081, Skokie, IL 60076-8081 READERS: Order, renew, or make payment for subscriptions; order back issues; and submit customer service inquiries via the Web at http://msdn.microsoft.com/msdnmag/service. PUBLISHER: Jill Thiry [email protected] 650-728-7368 ADVERTISING SALES: Ed Day Western US Accounts/[email protected]/785-838-7547 Brenner Fuller Eastern US Accounts/[email protected]/603-746-3057 Michele Hurabiell Key Accounts/[email protected]/415-378-3540 Wright’s Reprints 877-652-5295 ONLINE SERIVCES: Meagon Marshall Online Accounts & Programs/[email protected]/ 785-838-7524 MANUFACTURING: Pete C. Scibilia Production Manager/[email protected]/516-562-5134 MARKETING: Jon Guerringue Marketing/[email protected]/516-562-5957 Laura Robison Marketing/[email protected]/415-947-6182 AUDIENCE AND SUBSCRIBERS SERVICES: Karen McAleer Audience Development Director/[email protected]/ 516-562-7833 Andrew Athanasiou Audience Development Assistant/[email protected]/ 516-562-7981 SUBSCRIBER SERVICES: 800-677-2452 TechWeb, a division of United Business Media LLC.–The Global Leader in Business Technology Media Tony L. Uphoff CEO Bob Evans SVP and Content Director Eric Faurot SVP, Live Events Group Joseph Braue SVP, Light Reading Communications Group John Siefert VP and Publisher, InformationWeek and TechWeb Network Scott Vaughan VP, Marketing Services John Ecke VP, Financial Technology Group Jill Thiry Publisher, MSDN Magazine and TechNet Magazine John Dennehy General Manager Fritz Nelson Executive Producer, TechWeb TV Scott Popowitz Senior Group Director, Audience Development Beth Rivera Senior Human Resources Manager 4 msdn magazine Printed in the USA EDITOR’S NOTE Find Your Anchors I recently returned to work aft er be- number of technologies. And while I believe that being a general- ing gone for four weeks on paternity leave. ist is a good thing to a point, as the number of metaphorical My job during this time was to assume e-mails increases, it becomes even more necessary to have a solid responsibility for our older daughter, who anchor technology (or a small handful of technologies) where you is now 2 years old, so that my wife could can go deep. Of equal importance is, I believe, making sure that focus more of her attention on caring for you are going deep on the right technologies. Th us, you should the baby. Now, 2-year-olds have fairly defi ne and prioritize your anchor technologies in terms of what little observable pattern or structure in how you want to be known for, and also be aware of what’s coming and they want to spend their time. As such, managing the day-to- plan accordingly. day feels a lot like stream processing or like managing your My wakeup call came when I started experimenting with the workday from your e-mail inbox—you’re in a constant state .NET Services stack and, more recently, the ADO.NET Data of reacting. I’m sure that there are job roles out there where Services stack. In both of those endeavors, I very quickly got past the this pattern of work is considered normal and becomes easier controlled sample applications and ran straight into a fundamental to deal with. However, I found it to be incredibly draining— deficiency in my own skillset—Windows Communication both physically and mentally. Foundation (WCF). As you know, this technology has been around As I write this, Windows 7 has recently been released to for quite some time. However, for whatever reason, I had simply never manufacturing and those of you who are MSDN subscrib- given it the focus necessary to really understand how it was used ers will likely have already downloaded and installed it by behind the scenes in the cloud and with RESTful services. Without the time you read this. Additionally, Visual Studio 2010 and this context, I was handicapped in my code experimentation once Offi ce 2010 continue to march toward release; and with the I ventured too far off the known path. Personally, I want to grow recent announcement of pricing and licensing information as an expert in building business intelligence architectures—and on the Windows Azure platform (microsoft.com/azure/pricing.mspx), this means that my current anchor technology priorities include we can expect to see increased interest in how cloud computing SQL Server Analysis Services and WCF. As I look into the future, concepts and technologies should fi t into the portfolio, from both I envision moving further into data visualization and, as such, I a technology and a business perspective. Without very deliberate expect to add Windows Presentation Foundation to my list. management, you can easily fi nd yourself in a position much like In the end, it doesn’t matter which specifi c technologies you my recent parental leave experience—in a constant state of reac- choose so long as you are deliberate and thoughtful about actu- tion and working incredibly hard only to wonder what was accom- ally choosing them. Otherwise, as the technology stream’s current plished at the end of the day. gets stronger, you risk being swept out into the sea of randomiza- To be honest, I have some experience with becoming random- tion and buzzwords. ized on the technology front as well. One of the great things about my role with the magazine is that it gives me visibility into all of the various development eff orts that are happening across Microsoft . Th e problem with this visibility is that I want to go deep into many THANKS TO THE FOLLOWING MICROSOFT TECHNICAL EXPERTS FOR THEIR HELP WITH of the technologies to which I’m exposed. And what I’ve found, THIS ISSUE: Tom Ball, Ben Constable, Jim Griesmer, Niklas Gustafsson, Melissa particularly over the past year, is that—with one exception—I have Johnson, Artur Laksberg, Mark Lawrence, Carlos Aguilar Mares, Matthew M. become good at developing a shallow level understanding of a large Osborn, Josh Phillips and Matthew Podwysocki. Visit us at msdn.microsoft.com/magazine. Questions, comments, or suggestions for MSDN Magazine? Send them to the editor: [email protected]. © 2009 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, you are not permitted to reproduce, store, or introduce into a retrieval system MSDN Magazine or any part of MSDN Magazine. If you have purchased or have otherwise properly acquired a copy of MSDN Magazine in paper format, you are permitted to physically transfer this paper copy in unmodifi ed form.