MSDN Magazine (ISSN 1528-4859) Is Published Monthly by 1105 Media, Inc., 9201 Oakdale Avenue, Infoworld Ste
Total Page:16
File Type:pdf, Size:1020Kb
Introducing There’s no better time to discover DevExpress. Visual Studio 11 beta is here and DevExpress tools are ready to run. DXv2 is the next generation of tools that will take your applications to a new level. Build stunning, touch enabled applications today. Download your free 30-day trial at www.DevExpress.com © 1998-2012 Developer Express Inc. ALL RIGHTS RESERVED. All trademarks or registered trademarks are property of their respective owners. Untitled-2 1 3/8/12 10:58 AM THE MICROSOFT JOURNAL FOR DEVELOPERS APRIL 2012 VOL 27 NO 4 Using CSS3 Media Queries to Build COLUMNS a More Responsive Web Brandon Satrom ....................................................................... 20 CUTTING EDGE Long Polling and SignalR A Code-Based Introduction to C++ AMP Dino Esposito, page 6 Daniel Moth ............................................................................ 28 DATA POINTS Let Power Users Create Their Introduction to Tiling in C++ AMP Own OData Feeds Daniel Moth ............................................................................ 40 Julie Lerman, page 14 Lowering the Barriers to Code Generation with T4 TEST RUN Peter Vogel .............................................................................. 48 Bacterial Foraging Optimization James McCaffrey, page 82 Integrating Windows Workfl ow Foundation CLIENT INSIGHT with the OpenXML SDK Using JsRender with JavaScript Rick Spiewak ............................................................................ 56 and HTML John Papa, page 86 Context-Aware Dialogue with Kinect TOUCH AND GO Leland Holmquest .................................................................... 64 Musical Instruments for Windows Phone Batching EDI Data in BizTalk Server 2010 Charles Petzold, page 92 Mark Beckner .......................................................................... 70 DON’T GET ME STARTED An Overview of Performance Improvements Poetry of the Geeks David S. Platt, page 96 in .NET 4.5 Ashwin Kamath ........................................................................ 76 Deliver the Ultimate User Experience check out infragistics.com/ultimate NetAdvantage® FINANCIAL CHARTING With support for multiple chart styles, and technical indicators built in, TREEMAP financial charting Communicate the relative capabilities are differences in data weight on the money. more effectively, with customizable color and flexible layouts. Infragistics Sales US 800 231 8588 • Europe +44 (0) 800 298 9055 • India +91 80 4151 8042 • APAC (+61) 3 9982 4545 Copyright 1996-2012 Infragistics, Inc. All rights reserved. Infragistics and NetAdvantage are registered trademarks of Infragistics, Inc. The Infragistics logo is a trademark of Infragistics, Inc. Untitled-6 2 3/7/12 1:03 PM OLAP GRID GEOGRAPHIC MAP Provide highly- Plot millions of data BUSINESS interactive pivot grid point over any type of CHARTING functionality in all of tile map source Combine interactive your applications. or shape file. Outlook style grids with rich business charting to deliver a complete OLAP AXIS CHART portable solution. Take your data to new depths with the seemingly endless drilldown capability of the OLAP Axis Chart. Untitled-6 3 3/7/12 1:03 PM ® APRIL 2012 VOLUME 27 NUMBER 4 magazine Instantly Search MITCH RATCLIFFE Director KIT GEORGE Editorial Director/[email protected] Terabytes of Text PATRICK O’NEILL Site Manager MICHAEL DESMOND Editor in Chief/[email protected] DAVID RAMEL Technical Editor • 25+ fielded and full-text SHARON TERDEMAN Features Editor federated search options WENDY GONCHAR Group Managing Editor KATRINA CARRASCO Associate Managing Editor • dtSearch’s own file parsers SCOTT SHULTZ Creative Director highlight hits in popular file JOSHUA GOULD Art Director CONTRIBUTING EDITORS Dino Esposito, Joseph Fultz, Kenny Kerr, and email types Julie Lerman, Dr. James McCaffrey, Ted Neward, John Papa, Charles Petzold, David S. Platt • Spider supports static and dynamic data Henry Allain President, Redmond Media Group Doug Barney Vice President, New Content Initiatives • APIs for .NET, Java, C++, SQL, etc. Michele Imgrund Sr. Director of Marketing & Audience Engagement Tracy Cook Director of Online Marketing • Win / Linux (64-bit and 32-bit) ADVERTISING SALES: 508-532-1418/[email protected] Matt Morollo VP/Group Publisher Chris Kourtoglou Regional Sales Manager William Smith National Accounts Director Danna Vedder Microsoft Account Manager Jenny Hernandez-Asandas Director, Print Production “lightning fast” Serena Barnes Production Coordinator/[email protected] Redmond Magazine Neal Vitale President & Chief Executive Offi cer “covers all data sources” Richard Vitale Senior Vice President & Chief Financial Offi cer Michael J. Valenti Executive Vice President eWeek Christopher M. Coates Vice President, Finance & Administration Erik A. Lindgren Vice President, Information Technology & Application Development David F. Myers Vice President, Event Operations “results in less than a second” Jeffrey S. Klein Chairman of the Board MSDN Magazine (ISSN 1528-4859) is published monthly by 1105 Media, Inc., 9201 Oakdale Avenue, InfoWorld Ste. 101, Chatsworth, CA 91311. Periodicals postage paid at Chatsworth, CA 91311-9998, and at additional mailing offi ces. Annual subscription rates payable in US funds are: U.S. $35.00, International $60.00. Annual digital subscription rates payable in U.S. funds are: U.S. $25.00, International $25.00. Single copies/back issues: U.S. $10, all others $12. Send orders with payment to: MSDN Magazine, P.O. Box 3167, Carol Stream, IL 60132, email [email protected] or call (847) 763-9560. POSTMASTER: Send address changes to MSDN Magazine, P.O. Box 2166, Skokie, IL 60076. Canada hundreds more reviews and Publications Mail Agreement No: 40612608. Return Undeliverable Canadian Addresses to Circulation Dept. or XPO Returns: P.O. Box 201, Richmond Hill, ON L4B 4R5, Canada. developer case studies at Printed in the U.S.A. Reproductions in whole or part prohibited except by written permission. Mail requests to “Permissions Editor,” c/o MSDN Magazine, 4 Venture, Suite 150, Irvine, CA 92618. www.dtsearch.com Legal Disclaimer: The information in this magazine has not undergone any formal testing by 1105 Media, Inc. and is distributed without any warranty expressed or implied. Implementation or use of any information contained herein is the reader’s sole responsibility. While the information has been reviewed for accuracy, there is no guarantee that the same or similar results may be achieved in all environments. Technical inaccuracies may result from printing errors and/or new developments in the industry. Desktop with Spider Web with Spider Corporate Address: 1105 Media, Inc., 9201 Oakdale Ave., Ste 101, Chatsworth, CA 91311, www.1105media.com Media Kits: Direct your Media Kit requests to Matt Morollo, VP Publishing, 508-532-1418 (phone), Network with Spider Engine for Win & .NET 508-875-6622 (fax), [email protected] Reprints: For single article reprints (in minimum quantities of 250-500), e-prints, plaques and posters contact: PARS International, Phone: 212-221-9595, E-mail: [email protected], www.magreprints.com/ Publish (portable media) Engine for Linux QuickQuote.asp List Rental: This publication’s subscriber list, as well as other lists from 1105 Media, Inc., is available for rental. For more information, please contact our list manager, Merit Direct. Phone: 914-368-1000; Ask about fully-functional evaluations! E-mail: [email protected]; Web: www.meritdirect.com/1105 All customer service inquiries should be sent to [email protected] or call 847-763-9560. The Smart Choice for Text Retrieval ® since 1991 www.dtSearch.com 1-800-IT-FINDS Printed in the USA Untitled-1 1 1/30/12 4:14 PM EDITOR’S NOTE MICHAEL DESMOND More of What You Came For Since 1986, MSDN Magazine (and its predecessor Microsoft Systems with folks such as Julie Lerman, Dino Esposito and Charles Petzold Journal) has been helping to inform, educate and empower pro- breaking down a wide variety of technologies. fessional developers working with Microsoft tools and platforms. But look around the page and you’ll fi nd something new: An Behind the magazine’s success has been a single-minded focus online content section that presents additional features and columns on delivering actionable guidance and insight to developers. Th e published on the MSDN Magazine Web site. Each month, you’ll hands-on tutorials and how-to articles that appear in each issue fi nd exclusive content, including monthly columns like Rachel of MSDN Magazine show not only what you can do with the latest Appel’s Web Dev Report, which digs into HTML5 development, tools and technologies, but how you can get it done. and Bruno Terkaly’s Azure Insider column, which tracks the fast- It’s a proven model, and one that’s worked very well for us over the changing arena of Windows cloud development. years. Th e biggest frustration, frankly, is addressing the huge range You can also expect to fi nd two or three online-exclusive features of issues and technologies our readers are engaged with. Th ere’s at the MSDN Magazine Web site each month. In past months we’ve only so much we can do in the pages of content we print and parcel published features on Agile-based team development, Windows to each of our subscribers every month. Which is why we’ve been Phone application design, XAML programming techniques and, busy extending our coverage beyond the print magazine to include of course, HTML5. Going forward, we’ll use the