Mdn 0812Dg.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Untitled-10 1 6/6/12 11:32 AM THE MICROSOFT JOURNAL FOR DEVELOPERS AUGUST 2012 VOL 27 NO 8 Functional-Style Programming in C++ COLUMNS David Cravey ........................................................................... 30 CUTTING EDGE Mobile Site Development, Part 3: Windows Azure Comes to the Rescue Routing Requests Mark Kromer ........................................................................... 38 Dino Esposito, page 6 Build User-Friendly XML Interfaces WINDOWS WITH C++ Lightweight Cooperative with Windows PowerShell Multitasking with C++ Joe Leibowitz ........................................................................... 50 Kenny Kerr, page 10 DATA POINTS A History (API) Lesson Pitfalls and Pointers for a Base Clark Sell ................................................................................. 56 Logging Class in EF Models Julie Lerman, page 16 Using the Team Foundation Server FORECAST: CLOUDY Client Object Model Decoupling the Cloud with MEF Brian Blackman and Willy-Peter Schaub ..................................... 60 Joseph Fultz and Chris Mabry, page 22 CyberNanny: Remote Access via THE WORKING Distributed Components PROGRAMMER Angel Hernandez Matos ........................................................... Cassandra NoSQL Database: 66 Getting Started .NET Development for ARM Processors Ted Neward, page 78 Andrew Pardoe ........................................................................ 72 TOUCH AND GO Viewing a Virtual World from Your Windows Phone Charles Petzold, page 82 DON’T GET ME STARTED Whither Windows 8 Hardware David Platt, page 88 Start a Revolution Refuse to choose between desktop and mobile. With the brand new NetAdvantage for .NET, you can create awesome apps with killer data visualization today, on any platform or device. Get your free, fully supported trial today! www.infragistics.com/NET 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. All other trademarks or registered trademarks are the respective property of their owners. Untitled-6 2 7/10/12 4:03 PM Compatible with Microsoft® Visual Studio® 2012 Untitled-6 3 7/10/12 4:04 PM AUGUST 2012 VOLUME 27 NUMBER 8 magazine MITCH RATCLIFFE Director MUHAMMAD AL-SABT Editorial Director/[email protected] PATRICK O’NEILL Site Manager MICHAEL DESMOND Editor in Chief/[email protected] DAVID RAMEL Technical Editor SHARON TERDEMAN Features Editor WENDY HERNANDEZ Group Managing Editor KATRINA CARRASCO Associate Managing Editor SCOTT SHULTZ Creative Director JOSHUA GOULD Art Director CONTRIBUTING EDITORS Dino Esposito, Joseph Fultz, Kenny Kerr, Julie Lerman, Dr. James McCaffrey, Ted Neward, John Papa, Charles Petzold, David S. Platt Henry Allain President, Redmond Media Group Doug Barney Vice President, New Content Initiatives Michele Imgrund Sr. Director of Marketing & Audience Engagement Tracy Cook Director of Online Marketing ADVERTISING SALES: 508-532-1418/[email protected] Matt Morollo VP/Group Publisher Chris Kourtoglou Regional Sales Manager William Smith National Accounts Director Danna Vedder National Account Manager/Microsoft Account Manager Jenny Hernandez-Asandas Director, Print Production Serena Barnes Production Coordinator/[email protected] Neal Vitale President & Chief Executive Offi cer Richard Vitale Senior Vice President & Chief Financial Offi cer Michael J. Valenti Executive Vice President Christopher M. Coates Vice President, Finance & Administration Erik A. Lindgren Vice President, Information Technology & Application Development David F. Myers Vice President, Event Operations Jeffrey S. Klein Chairman of the Board MSDN Magazine (ISSN 1528-4859) is published monthly by 1105 Media, Inc., 9201 Oakdale Avenue, 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 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. 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. 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. 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), 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/ 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; E-mail: [email protected]; Web: www.meritdirect.com/1105 All customer service inquiries should be sent to [email protected] or call 847-763-9560. Printed in the USA Untitled-2 1 7/2/12 10:49 AM EDITOR’S NOTE MICHAEL DESMOND On Point with Julie Lerman In the world of soft ware development, nothing is certain except partial solution. Th e addition of POCO [Plain Old CLR Object] death, taxes and data. As MSDN Magazine Data Points columnist support in EF4 was a huge leap forward, and then Code First plus Julie Lerman points out: “Nobody can avoid data, so it’s a topic the much-simpler-to-use API [DbContext] changed the broader that’s important to everyone.” perception of EF dramatically. It wasn’t until those last two pieces Which is why Data Points has been a fi xture inMSDN Magazine arrived that people at Microsoft who are outside of the data team since John Papa fi rst penned the column back in 2002. Papa launched started paying attention to it. And the developers’ eyes, enthusi- the column to address what he felt was a shortage of data-related asm and excitement followed. coverage in the magazine (and the industry in general). When It’s also been fascinating to witness the evolution of how the he stepped away from the column in 2009 aft er taking a job with EF team at Microsoft works. Aft er some challenging interactions Microsoft , Papa recommended Julie Lerman to take his spot. with a voluble community that was unhappy with the initial I asked Lerman about her experience writing the column and release, they responded with some fantastic changes that made EF about her thoughts on data and development. As Lerman told me, palatable to a much wider audience. Now the entire team is focused inspiration is not hard to fi nd. on responding to community feedback. “I’ve tried to use the column to explain things that either I’m I get the feeling that the .NET dev community—the subset that curious or confused about, such as what the heck NoSQL is,” she engages with new releases and providing feedback—has a great says. “Or as a way to share answers to questions that I’m asked sense of ownership of EF and is now very supportive of the work frequently—for example, about Entity Framework [EF].” the team is doing. Michael Desmond: Th e .NET data space has been anything How do you find time to write consistently given the but boring, with plenty of infrastructure work pulling devel- demands of your day job? How does writing help you opers in diff erent directions. Have things settled down? Any improve as a developer? advice for developers trying to make big-picture decisions You know better than anyone that my articles are rarely delivered about data in 2012? on time. I just steal the time from other tasks and deadlines, so I’m Julie Lerman: Settled? Ha! I think they’re moving faster. I do think constantly juggling. I also have to steal some of that time from my the ORMs [object-relational mappers] are going to settle in as the personal life. I think the fact that my husband and I don’t have kids “classics” for a while, and Entity Framework seems to have become makes that a bit easier. the standard for out-of-the-box .NET data access. Th e process of writing does indeed have a positive eff ect on my Th ere’s so much innovative work and thinking going on, especially development skills. I’m reluctant to write something down until with the focus on big data, NoSQL and CQRS [Command Query I’ve explored it inside and out, which forces me to learn even more Responsibility Segregation], to name a few. But not everyone has to deeply something I may already have a great deal of comfort with. work with the vast amounts of data that comes under that umbrella. I think we have a great responsibility not to misdirect people who I really do think ORM over relational database is the new norm. depend on us for their knowledge. I’m constantly questioning what I know and how I do things, and I sometimes very reluctantly How well has EF come together over its brief, if turbulent, drag myself through some process of evolution.