Quick viewing(Text Mode)

JULY 2009 Volume 19, No

JULY 2009 Volume 19, No

VisualStudioMagazine.com Storage Targeting Azure Intelligence Bettering Business Redmond Review: Reviewed MonoDevelop 2.0 Studio Testing inVisual Fine-Tune Unit PLUS

JULY 2009 Volume 19, No. 7 RESTful Storage API. large objectsinthecloudwithAzure’s Learn how to store andretrieve binary Project3 3/19/09 9:08 AM Page 1 Project3 3/19/09 9:09 AM Page 2 Project1 6/8/09 11:13 AM 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 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) 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. 0709vsm_TOC_3-4.v5 6/12/09 11:06 AM Page 3

July 2009 // Volume 19 // No. 7 Contents { FRAMEWORKS }

Michael Desmond, Editor in Chief, Visual Studio Magazine Time for XAML? Don’t look now, but the broadly ambitious eXtensible Markup Language (XAML) vision kicked off several years ago appears to be gaining traction. Most developers know XAML as the language behind Windows Presentation Foundation (WPF), the graphical subsystem unveiled in 2006 with .NET 3.0 and due for an exten- sive refresh in .NET 4. (check out last month’s cover feature, “.NET 4 Revealed”). Ironically, the real driver behind XAML 18 to date has been Silverlight, Microsoft’s fast-evolving rich Internet application (RIA) platform. Even as WPF adoption lan- guished, Web developers began working FEATURES with XAML and tooling like Expression Blend for their Silverlight projects. 18 Targeting Azure Storage Silverlight has set the stage for XAML Learn how to store and retrieve binary large objects in the cloud with Azure’s RESTful Storage API. BY ROGER JENNINGS adoption, says Todd Anglin, chief evangelist with component maker Telerik. “I think there’s a bit of a halo effect on DEPARTMENTS WPF from Silverlight. Silverlight was the 6 Letters to the Editor attention-getter and people came and learned the core concepts of XAML within 8 DevDisasters The Cost of Static BY ALEX PAPADIMOULIS Silverlight,” Anglin said in an interview. That halo effect should grow stronger 10 DevInsights DEVELOPER NEWS, REVIEWS, PRODUCT BRIEFS this summer, when Microsoft is expected Early Feedback on Visual Studio 2010 Beta PAGE 10 to release Silverlight 3. The new version Product Review: MonoDevelop 2.0 PAGE 13 will introduce powerful new data and Product Briefs: AVIcode Intercept uX, Mykonos 1.0 Security Framework, application capabilities that, for the first TeamDefine PAGE 14 time, make Silverlight a mature target for live-fire business application development. 24 LANGUAGE LAB The question is: Will desktop application developers simply develop for Silverlight ON VB PAGE 24 64-bit-capable machines are everywhere. It’s time you start thinking about 64-bit rather than the more robust and exten- support as you develop your applications. BY BILL MCCARTHY sive WPF spec? It’s an open question, and one that Ask Kathleen PAGE 26 VSM readers will certainly have a say in With a few tweaks, you can turn Visual Studio’s unit-testing capabilities into a answering. Meanwhile companies like Telerik powerful and extensible tool for improving code quality. BY KATHLEEN DOLLARD are helping developers support WPF and Silverlight apps from a common code base, COLUMNS with components that work from a unified code set. Are you aiming to build XAML 3 Frameworks BY MICHAEL DESMOND apps that run seamlessly in both Silverlight 32 Redmond Review BY ANDREW BRUST and WPF? Or do you plan to target WPF for 31 Index of Advertisers your traditional client applications? E-mail me at [email protected]. PHOTO-ILLUSTRATION BY BYRON SCOTT/ISTOCKPHOTO BYRON BY PHOTO-ILLUSTRATION

VisualStudioMagazine.com · July 2009 · VISUAL STUDIO MAGAZINE 3 0709vsm_TOC_3-4.v5 6/12/09 11:06 AM Page 4

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

Online Tutorials Visual Studio 2010 and .NET FX 4 Beta Ellison Anointed ‘Next Leader of Wahlin on .NET Drops Today Community’ Creating a Silverlight-Enabled WCF Service Visual Studio 2010 debuts a revamped Oracle’s pending acquisition of Sun Silverlight is capable of consuming data editor, UI and shell built using Microsoft’s Microsystems had attendees at the annual from a variety of sources including REST Windows Presentation Foundation 4.0. JavaOne conference wondering about the , ASMX services, Windows Based on early developer feedback, fate of Java and the Java Community Communication Foundation (WCF) services Microsoft has already made some Process. Also, Oracle CEO Larry Ellison made and other standards-compliant services. modifications to the new editor. a surprise cameo during the keynote, BY DAN WAHLIN BY KATHLEEN RICHARDS where he talked up JavaFX and OpenOffice. LOCATOR+ CODE: VS0907DW1 BY JOHN K. WATERS LOCATOR+ CODE: VS0907AD1 Will 2 Appease Early Adopters of LINQ to SQL? Classic VB Corner .NET 4 gives developers a first peek at the Using a Standard Terminal Font ADO.NET Entity Framework version 2, Adobe Revamps Flash Platform Need to recreate that old-timey Terminal which is Microsoft’s preferred model for Adobe released the next version of its RIA look? There’s a stock object built into building applications that access . platform, Flash Builder 4 (formerly Flex every version of Windows that will serve BY JEFFREY SCHWARTZ Builder) and Flash Catalyst, for beta that need. testing. The products let designers and BY KARL E. PETERSON LOCATOR+ CODE: VS0907RD2 developers share workflows. LOCATOR+ CODE: VS0907KP1 BY JEFFREY SCHWARTZ LOCATOR+ CODE: VS0907AD2 JavaFun: Interoperability, But Is Three a Crowd? Practical ASP.NET Microsoft’s JavaOne keynote about .NET Handling Concurrency with interoperability highlighted progress IBM Rational Previews New Wares Entity Framework between Sun and the Redmond-based At its annual user conference, IBM’s If you want to use Entity Framework in company. Will Microsoft be on that stage, and Rational division gave attendees a peek at ASP.NET, you’ll need to handle concurrency a JavaOne sponsor, after Oracle buys Sun? three new products focused on “software problems. Here are some suggestions from a BY KATHLEEN RICHARDS investment management,” as well as pre- Microsoft “architect evangelist.” views of older software-delivery products BY PETER VOGEL LOCATOR+ CODE: VS0907RD3 being tuned for cloud-based infrastructures. LOCATOR+ CODE: VS0907PV1 BY JOHN K. WATERS LOCATOR+ CODE: VS0907AD3

VisualStudioMagazine.com RedDevNews.com ADTmag.com ISTOCKPHOTO.COM

4 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com Project7 4/29/09 3:36 PM Page 1 0709vsm_Letters_6.v3 6/12/09 11:01 AM Page 6

VisualStudioMagazine.com July 2009 • Volume 19 • No. 7

Letters Editorial Staff Vice President, Doug Barney Editorial Director Editor in Chief Michael Desmond Executive Editor Kathleen Richards News Editor Jeffrey Schwartz Managing Editor Wendy Gonchar Associate Managing Editor Katrina Carrasco

Contributing Editors Andrew J. Brust, Kathleen Dollard, Ken Cox, John Cronan, Dan Fergus, John Gavilan, Roger Jennings, Looking to .NET 4 and Don Kiely, Martin Kulov, Jeff Levinson, Bill McCarthy, John Charles Olamendy Turruellas, Keith Pleas, Bill Wagner

Visual Studio 2010 Art Staff Creative Director Scott Shultz Graphic Designer Erin Horlacher

In April we explored Visual Studio 2010, and in June we Online/Digital Media took an in-depth look at .NET Framework 4. Here’s what Editor, VisualStudio Becky Nagel Magazine.com readers had to say about our coverage of the next Executive Editor, New Media Michael Domingo generation of these strategic dev . Online News Editor Kurt Mackie Associate Editor, Web Gladys Rama I’m curious about how the developers of .NET Web Producer Shane Lee Framework manage to keep from reintroducing historical bugs or problematic features from past versions, when I’m certain that the development teams have changed President Henry Allain Vice President, Publishing Matt N. Morollo over the years. Director of Marketing Michele Imgrund Allan (via the Web) Online Marketing Director Tracy S. Cook Bronx, New York

I love all the candy that should be coming with Visual Studio 2010, but what I’ President & Neal Vitale like to know is if I’ll still be stuck using Visual Studio 2005 and Visual Studio 2008 Chief Executive Officer to build and maintain SQL 2005 (or SQL 2008) reports and SSIS [SQL Server Senior Vice President Richard Vitale & Chief Financial Officer Integration Services] projects. I was very upset to find out that Visual Studio 2008 Executive Vice President Michael J. Valenti doesn’t allow me to maintain SQL 2005 reports and SSIS projects. An Office user doesn’t need an older version of Word to open and maintain Vice President, Finance Christopher M. Coates an older-version document, and this shouldn’t happen for developers either! & Administration Identity withheld Vice President, Digital Media, Abraham M. Langer Audience Development Vice President, Information Erik A. Lindgren I’m curious to know: Has Microsoft implemented multiple controls selection in & Web Operations WebForm (to set common properties, moving, resizing, etc.)? The company Vice President, Digital Media, Doug Mashkuri Advertising dropped this feature in Visual Studio 2008 with the lame excuse that it’s created Vice President, Carmel McDonagh from scratch on FrontPage Designer. Attendee Marketing Shame on you, team of 1,000 people with unlimited resources, for giving this Chairman of the Board Jeffrey S. Klein excuse. I’ve never worked in Dreamweaver, but after missing this basic feature in

Visual Studio 2008 Designer, I feel that not having a grip on Dreamweaver is REACHING THE EDITORS hurting me—simply because Visual Studio 2008 is poorly designed. Editors can be reached via e-mail, fax, telephone or mail. A list of editors and contact information is available at Adil (via the Web) VisualStudioMagazine.com. Karachi, Pakistan E-mail: E-mail is routed to individuals’ desktops. Please use the following form: [email protected]. Do not include a middle name or middle initials. Telephone: The switchboard is open weekdays 8:30 a.m. to 5:30 p.m. Pacific Time. After 5:30 p.m. you will be directed to individual extensions. Visual Studio Magazine wants to hear from you! Send us your thoughts San Francisco Office 415-814-0950; Fax 415-814-0961 about recent stories, technology updates or whatever’s on your mind. Irvine Office 949-265-1520; Fax 949-265-1528 E-mail us at [email protected] and be sure to include Corporate Office 818-734-1520; Fax 818-734-1528 your first and last name, city and state. Please note that letters may be edited for form, fit and style. They express the views of the individual Visual Studio Magazine authors, and do not necessarily reflect the views of the VSM editors or The opinions expressed within the articles and other contents 1105 Media Inc. herein do not necessarily express those of the publisher.

6 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com Project5 6/1/09 11:52 AM Page 1

Your best source for tools! ®

LEADTOOLS Document dtSearch Engine for Win & .NET VMware vSphere Essentials Imaging v 16.5: Add dtSearch‘s “blazing speeds” New VMware Solutions for Small Businesses by LEAD Technologies (CRN Test Center) searching and New VMware vSphere Essentials Editions combine the file format support high availability, performance and reliability of LEADTOOLS Document Imaging has every 64-bit Version! our enterprise class solutions with packaging ideal component you need to develop powerful • dozens of full-text and fielded for smaller IT environments and a price starting image-enabled business applications including data search options at less than $1,000 for a complete solution. specialized bi-tonal image display and • file parsers/converters for hit-highlighted processing, document clean up, high-speed display of all popular file types • VMware vSphere Essentials provides an NEW scanning, advanced compression (CCITT • Spider supports dynamic and static web data; all-in-one solution for small offices to virtualize RELEASE! New G3/G4, JBIG2, MRC, ABC) and more. highlights hits with links, images, etc. intact three physical servers for consolidating and Release! • Multi-threaded OCR/ICR/OMR/ • API supports .NET, ++, Java, SQL and more; managing applications to reduce hardware and 3 Server Pack VMware MICR/Barcodes (1D/2D) new .NET Spider API operating costs with a low up front investment. Paradise # vSphere • Forms recognition/processing • VMware vSphere Essentials Plus adds D29 02101A08 Essentials Paradise # • PDF and PDF/A “Bottom line: dtSearch manages a terabyte of high application availability and data protection L05 03201A01 • Annotation (Image Mark-up) text in a single index and returns results in $2,375.99 for a complete server consolidation, manage- CALLI $ 99 • C/C++, .NET, WPF - Win32/64, WCF, WF less than a second.” —InfoWorld ment and business continuity solution 2,007. .com/lead programmers.com/dtsearch for the small office IT environment. programmers.com/vmware Pragma Fortress SSH c-treeACE™ Professional TX Text Control 15 —SSH Server for Windows by FairCom Word Processing Components NEW by Pragma Systems The c-treeACE engine is a high performance TX Text Control is royalty-free, RELEASE! robust and powerful word processing Contains Windows SSH & SFTP Servers. Certified database alternative proven by developers in mission software in reusable component form. for Windows Server 2008. Works with PowerShell. critical enterprise systems, desktop deployments, and embedded devices for over 25 years. • Full-featured server with centralized • .NET WinForms control for VB.NET and C# & graphical management • Complete set of APIs including ADO.NET, LINQ, • ActiveX for VB6, , VBScript/HTML, ASP C#, C/C++, ODBC, JDBC, VCL, and dbExpress • GSSAPI Kerberos & NTLM authentication • File formats DOCX, DOC, RTF, HTML, • Graphical productivity tools • Fastest SFTP & SCP file transfer XML, TXT Professional Edition • Simple deployment • Supports over 1000 sessions • PDF and PDF/A export, PDF text import Paradise # • No DBA or ongoing administration T79 02101A02 • Runs console applications & allows history • Tables, headers & footers, text frames, • Low deployment licensing costs Paradise # scroll back within the same session bullets, structured numbered lists, multiple $ 99 Paradise # • Cross-platform support for all major platforms F01 0131 848. • Runs in Windows 2008/2003/Vista/XP/2000 including Windows, UNIX, , and Mac OS X undo/redo, sections, fields, columns P35 0439 $ 99 792. • Ready-to-use toolbars and dialog boxes Download a demo today. $ 99 Make your applications faster, easier to deploy, 550. and more affordable with c-treeACE. programmers.com/pragma programmers.com/faircom programmers.com/theimagingsource FarPoint Spread Enterprise Architect 7.5 CA ERwin r7.3 for Visualize, Document and NEW The Best Grid is a Spreadsheet. Give your users Control Your Software Project RELEASE! CA ERwin® Data Modeler the look, feel, and power of Microsoft® Excel®, by Sparx Systems r7.3 – Product Plus 1 Year without needing Excel installed on their machines. Enterprise Architect is a comprehensive, Enterprise Maintenance Join the professional developers around the world integrated UML 2.1 modeling suite who consistently turn to FarPoint Spread to add providing key benefits at each stage of CA ERwin Data Modeler is a data modeling powerful, extendable spreadsheet solutions to system development. Enterprise Architect solution that enables you to create and their COM, ASP.NET, .NET, BizTalk Server and 7.5 supports UML, SysML, BPMN and maintain databases, data warehouses SharePoint Server applications. and enterprise data resource models. other open standards to analyze, design, Corporate Edition These models help you visualize data Paradise # • World’s #1 selling development spreadsheet test and construct reliable, well under- 1-4 Users stood systems. Additional plug-ins are structures so that you can effectively P26 04201E01 • Read/Write native Files Paradise # organize, manage and moderate data • Cross-sheet formula referencing also available for Zachman Framework, $ 99 Paradise # MODAF, DoDAF and TOGAF, and to SP6 03101A02 complexities, database technologies and 3,832. • Fully extensible models F02 01101A01 integrate with and Visual Studio $ 99 the deployment environment. • Royalty-free, run-time free 182. programmers.com/ca $936.99 2005/2008. programmers.com/farpoint programmers.com/sparxsystems FREE WEBINAR SERIES: MORE Maximum Data Mindjet MindManager 8 Orion Network Modeling with CA ERwin 7.3 for Windows Performance Monitor In our last webinar series, we looked at CA by Mindjet by Solarwinds ERwin’s core functionality. In this second series, Do you harness the wealth of data, Web pages, Orion Network Performance Monitor is a we’ll provide a grounding in how CA ERwin r7.3’s and other input that comes your way every comprehensive fault and network performance new features help you with Master Data Management, Metadata day? Is there a way to use it more effectively management platform that scales with the Management, Data Warehousing, Data Governance and Business Intelligence. to formulate new ideas, sharpen your focus, rapid growth of your network and expands There will be six sessions in the series: and ultimately drive your success? New with your network management needs. • What’s New in CA ERwin 7.3 MindManager 8 for Windows is the answer. It offers out-of-the-box network-centric views • MDM (Master Data Management) with CA ERwin and Data that are designed to deliver the critical Unlike the usual linear-based approach of most Profiling tool information network engineers need. productivity tools, MindManager 8 uses mind- Orion is the easiest product of its • Collaborative model management with CA ERwin ModelManager mapping technology to let you capture, organ- Paradise # 1 User kind to use and maintain, meaning you • Validate the integrity of your model with CA ERwin Validator ize, and communicate information using an S4A 08201E02 Paradise # will spend more time actually managing • Reporting: Crystal Reports, PDF, HTML intuitive visual canvas. You’ll be able to work F15 17301A02 networks, not supporting Orion NPM. $ 99 smarter and transform your ideas into action 4,606. • SAPHIR Option: light at the end of the tunnel $299.99 more quickly. programmers.com/mindjet programmers.com/solarwinds REGISTER TODAY: programmers.com/MDM_2009 800-445-7899 programmersparadise.com Prices subject to change. Not responsible for typographical errors. 0709vsm_DevDisasters_8.v4 6/12/09 10:56 AM Page 8

{ SOFTWARE DEVELOPMENT GONE WRONG }

The Cost of Static

sands of necessary test scripts. Not troublingly named file: globals.cs. After that it mattered, though. As it digging through hundreds of poorly turned out, offshore testing was implemented “helper” functions, Steve very inexpensive, too. discovered the root of the problem: After deploying the latest release to their customers, Steve’s public static string UserID; group ran into another resource … problem. With the vast number of public static int DocumentID; changes to the document manage- ment subsystem, there were a lot The “static” keyword ensured that the of confused users who needed user- and document-identifier were always help with the new software. Steve’s available, without ever needing to create group simply couldn’t keep up. Not an instance of an object. In a multi-user, that it mattered, though. Offshore Web-based system, having these globally support was also very inexpensive. defined variables didn’t work out so well. If two different documents were Offshore worked on at the same time, the first’s Despite the resources available over- modifications would be saved to the seas, there were two bugs that plagued second’s and the second’s would be lost. countless companies that used the app. The same thing happened with user names. teve’s development team was First, when users would save a document, Steve looked through the customers’ meeting with the CTO to discuss the sometimes the changes wouldn’t “stick.” data files and noticed that the problem Sbenefits of offshore application The offshore support team attributed this had been occurring since the rollout, development. Specifically, how the company to “user error” and resolved it by reminding causing nearly six months of data to be would be piloting it in their group. users how to save correctly. incorrect. But, because users generally “Well, of course you get what you pay The other issue was that some docu- don’t double-check everything they enter, for,” the CTO agreed, “but in this case, we’re ments would have “mixed” data. Employees only a handful of bad data was ever paying for the same thing. An hour in this would have strange performance appraisals noticed by the customers. country has just as many minutes as an tacked on to their records from managers in Steve’s finding didn’t go over so well hour overseas.” entirely different departments. The support with their largest customer, or, really, any Aside from the CTO and some other team attributed these problems to “random of their customers. Quite a few left imme- higher-ups, no one liked the idea of off- data anomalies” and fixed them by manually diately, and many more demanded refunds. shoring, but they agreed to try it out. correcting the database. So, while the company saved a Besides, it was only for one small project. While most users just learned to deal tremendous amount of money through Fast forward a few months and the with the bugs, their largest customer offshore application development, after all “small project” had ballooned into a threatened to switch to a new vendor. was said and done the cost of the statically 10,000-manhour rewrite of the document Steve’s team was notified about the issue. defined variables was estimated in the management subsystem, which was a Working in parallel with another millions—in lost revenue, troubleshooting major module in their flagship, employee developer, Steve stumbled across a rather and court costs. VSM performance management application. Not that it mattered, though. Offshore devel- opment was very inexpensive. Tell Us Your Tale Of course, a project with such a wide scope required an extensive amount of Each issue Alex Papadimoulis, publisher of the popular Web site The Daily WTF (thedailywtf.com), recounts first-person tales of software development gone terribly wrong. Have you testing. Steve’s group, however, simply didn’t experienced the darker side of development? We want to publish your story. E-mail your tale have the resources to create test cases, to Executive Editor Kathleen Richards at [email protected] and put “DevDisasters” set up test plans and execute the thou- as the subject line.

8 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com Project3 3/18/09 9:10 AM Page 1 0709vsm_DevInsight_10-14.v5 6/12/09 10:58 AM Page 10

DEVELOPER NEWS /// REVIEWS /// PRODUCTS

DEVELOPER NEWS Early Feedback on Visual Studio 2010 Beta BY KATHLEEN RICHARDS AND JEFFREY SCHWARTZ

Developers expected to see Visual Studio 2010 and .NET compiled them with .NET 4,” Megkousoglou says. “No major prob- Framework 4 beta 1 in the Tech·Ed time frame—and Microsoft lems there. Performance is very similar to .NET 3.5. The main didn’t disappoint. On Monday, May 18, the first business day fol- solution I loaded—comprised of nine different projects—is an lowing the educational conference, the company made Visual ASP.NET application, uses LINQ and Enterprise compo- Studio 2010 and .NET Framework 4 betas available for MSDN nents, and contains a total of 120K lines of code. This is one of

Visual Studio 2010 Visual subscribers to download. Public downloads of the bits were our main applications, which receives a huge [number] of visitors released a few days later. every day.” Beta 1 gives the broad .NET community a closer look at Other developers ran into performance issues with the what’s coming in Visual Studio 2010 and the revamped code Visual Studio 2010 beta. “It’s sometimes more sluggish to use editor built using Windows Presentation Foundation (WPF). As than Visual Studio 2008 on the same hardware, but I’m hoping reported in last month’s cover story, “.NET 4 Revealed,” the that will be resolved by the time it’s released,” observes Vaibhav updated framework promises maturing class libraries, new paral- Gadodia, a .NET architect at outsourcer Nagarro Inc. lelism capabilities and a major upgrade to the ADO.NET Entity “The biggest problem I have with it is stability,” says David Framework (EF) that debuted in .NET 3.5 Service Pack 1 (SP1). Barnhill, a senior consultant with Lab49 Inc. “It has crashed at In late May, Microsoft continued its emphasis on the cloud, random times on my machine. I haven’t found a pattern to it. releasing an updated community technology preview of its But the stability is not bad for a beta 1 product; I’ve had much Azure Tools for Visual Studio, which added support for the Visual worse experiences.” Studio 2010 beta. The Azure Tools provide C# and VB templates for cloud-based projects, debugging of the local development WORKING WPF fabric and storage, and access via a WindowsLive ID to the Azure The much-ballyhooed WPF editor part of the new Visual Studio Services Developer Portal. The Visual Studio extension installs shell is not the showstopper that some developers feared. “While the Azure SDK, which Microsoft also updated in May. The caveat: I think the performance is OK, I’m sure it will get better,” says Windows Azure and .NET Services work with .NET 3.5 SP1—they Stephen Forte, chief strategy officer of Telerik Inc. “I’m sure beta do not yet support .NET 4. 2 will have a full-fledged performance.” Forte is a fan of the new WPF shell. “The WPF editor will TRIALS AND TRIUMPHS give us a ton of benefits,” he notes. “You can tell right way when Early reports on the Visual Studio 2010 and .NET Framework 4 you look at it: It looks different and quite frankly it’s easier on beta are fairly positive, considering these are still technology the eyes.” previews. Developers should be able to install the Visual Studio Despite the new look and feel, Visual Studio 2010 remains 2010 beta side-by-side with Visual Studio 2008 SP1 on the familiar and easy to navigate. “It’s actually close enough to the RC (not the Windows 7 beta) without any issues, development environment of 2008 where you can find your according to Microsoft. way around really easily,” Barnhill says. Joseph Megkousoglou, associate lead software architect at Developers who’ve downloaded the beta have commonly property services firm Knight Frank LLP, lauds the clear separa- voiced dismay over certain issues. One is too much white tion between managed and native code in the new IDE’s space, or glyphs, which can make it harder to read code. In a installer. He is also pleased with the performance of Visual posting in the Visual Studio Editor blog a week after the beta Studio 2010 on the Windows 7 RC. “I would happily use it as my dropped, Brittany Behrens, program manager on the Visual main IDE, speedwise,” Megkousoglou says. Studio Platform team, noted that Microsoft will revert back to The Team Foundation Server (TFS) 2010 installation is the Visual Studio 2008-style glyphs in the final release. another matter, however. “[It was] quite long and involved,” he Similarly, the widely used Box Selection—missing in beta 1—will explains. “As a Subversion guy, I’m still trying to see the benefits be updated with new multi-line editing capabilities and put of all the features TFS offers.” back into the final release. Still, the new bits have not caused tremendous headaches. Another point of concern for many developers is blurry “I’ve already loaded our main projects in Visual Studio 2010 and fonts and fuzziness, especially for lower point sizes. “One of the

10 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com Project3 6/12/09 9:20 AM Page 1 0709vsm_DevInsight_10-14.v5 6/12/09 10:58 AM Page 12

big things they’re going to fix is the text in as far as being able to easily take a collec- the display; [it’s] a little blurry now,” ‘Oslo’ Preview tion of objects and do parallel operations Barnhill says. “There are some problems Debuts ‘Quadrant’ on those objects,” says Barnhill. “It was that are in WPF’s font rendering that they’ll very easy to do, and more [efficient] than be fixing in the beta 2 of .NET Framework Microsoft released a new CTP of the old way you had to do it.” version 4—that’s something that a lot of “Oslo” in May, giving developers a people really hate.” first look at “Quadrant,” the code ENTITY FRAMEWORK 4 UNLEASHED WPF only supports TrueType fonts, name for the graphical tool intended With the release of the Visual Studio 2010 and other bitmap fonts still appear on the to provide browsing of models. Oslo and .NET 4 betas, developers are getting menu in Visual Studio 2010 beta 1. Those is the code name for Microsoft’s their first look at the ADO.NET EF 4, which fonts will be removed in the final release, model-driven development is Microsoft’s preferred model for building according to Behrens. (To learn more platform that runs on a SQL Server applications that access databases. about common editor issues in beta 1 and 2008 repository. Given much of the backlash about the Microsoft’s fixes, you can take a look at The May 2009 community first release, the update has been eagerly Behrens’ June blog posting at technology preview (CTP) updates awaited. EF 4 adds support for n-tier APIs http://tinyurl.com/p93xhm.) the SDK with runtime and provides and templates, increases Plain Old CLR Gadodia says he’s willing to wait for the first public look at Quadrant. (An Objects (POCO) coverage and improves

Visual Studio 2010 Visual Microsoft to add the Compatible Width alpha version of Quadrant appeared Persistence Ignorance, in addition to other Layout stack in beta 2 to address WPF’s in the Virtual PC handed out to improvements, according to Microsoft. font rendering. “It would be crazy to sit in attendees of Microsoft’s Professional “The Entity Framework itself has front of an IDE that has these problems,” Developers Conference 2008, but the pretty much undergone a radical transfor- he notes. “Since a lot of the UI is WPF- graphic modeling tool was not in the mation,” Forte says. “It really addressed based in Visual Studio 2010, it’s definitely public CTPs.) some of the concerns of the community in more painful.” “What’s interesting about the that respect.” Despite these issues, Barnhill [Quadrant] tool is, now you can put Nagarro’s Gadodia is among those applauds the new shell, which is built on things into the repository and you who passed on the first version of EF. “We WPF and the new Managed Extensibility now have the ability to view them were pretty happy with LINQ to SQL,” he Framework. “It’s just a much better technical graphically, as opposed to just using notes. “We had invested a lot of training base to start with than before,” he says. command lines or SQL statements,” effort as well, since it was—and is—such a “It’s a lot easier for developers to make says Stephen Forte, chief strategy shoe-in for that ORM layer.” extensions to the editor and make it work officer at Telerik Inc. “It’s obviously in Of course, many who invested in LINQ differently without running a little C++ an early form but it looks pretty good. to SQL felt jilted last fall when Microsoft code. You can do it right in WPF and C#.” You can really work with your applica- shifted its focus to EF. With EF 4, Gadodia The historical and new tion data and metadata much better.” notes that a lot of the features of LINQ to multithreading debugging functionality The latest CTP also adds SQL are now available within EF. “It almost that Barnhill calls “parallel stacks” are also support for UML 2.1 domain models— feels as if Microsoft copied some of these impressive in beta 1. “I really like the his- use case, component diagrams, into EF from LINQ to SQL as a result of torical debugger, but one issue with that is activity, sequence—and the respec- developer feedback,” he says. “We’ll con- it’s only available in the Visual Studio Team tive XMI importer. tinue to use LINQ to SQL in the short term System (VSTS) Developer Edition. It doesn’t Also noteworthy is the M editor in our current projects, for the simple come with Visual Studio Pro,” he explains. called Intellipad. It enables developers reason that most of our developers are “I like, overall, the design.” to compile DSLs created in the M trained in the technology.” The “parallel stacks” used for debug- modeling language into image files, Among other features he likes in the ging multithreaded applications enable rather than having to use a command- updated EF are things like the modeling developers to set a break point in their line , explains Forte. support, which now generates DDL based source code so that they can figure out “You can actually author M in on the model. “There are other changes where each is at a point in time. Visual Studio much easier now with which are useful; for instance, POCO sup- “The performance of that is fine,” says this SDK,” Forte says. “You could in port,” he adds. “We’re developing a new Barnhill. “When you run it and get to that the past, but integration is even internal application framework to use break point, that’s the only time you can tighter. For example, if you create across projects, and changes in EF have see your stacks; that parallel stack only and end the project in Visual Studio, put it in the front-running for using it in makes sense when you’re at a break point you can now open that same M project our framework.” in your code.” in Intellipad, which you weren’t able The early looks at the first version of to do before. So the tooling definitely Kathleen Richards ([email protected]) Parallel LINQ (PLINQ), which is rather limited, interoperates nicely.” —J.S. is executive editor, and Jeffrey Schwartz are encouraging. “It worked as advertised ([email protected]) is news editor of VSM.

12 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com 0709vsm_DevInsight_10-14.v5 6/12/09 10:58 AM Page 13

REVIEW

Test-Driving MonoDevelop 2.0 MonoDevelop 2.0 Is the open source IDE for cross-platform .NET development a viable alternative to Visual Studio 2008? Open Source, supported by Novell http://monodevelop.com

BY KRYSTYNA ROSICKA-BLONSKA between packages installed with the Price: Free MonoDevelop is a cross-platform, open system and packages included in the Quick Facts: Open source, cross-platform source, integrated development environ- MonoDevelop distribution was the IDE focused on C# enables rapid devel- opment of applications for Linux, ment (IDE) for developers crafting biggest challenge—some seemingly suc- Mac and Windows. applications for the Mono framework. cessful installs did not produce running Pros: A familiar environment for .NET Sponsored by Novell Inc., the open source versions of MonoDevelop. Visual Studio developers that helps to Mono implementation of .NET At first glance MonoDevelop 2.0 port their skills to developing in .NET Framework allows developers to migrate impresses. The and IDE on Linux. existing .NET applications to Windows, functionality should be quite intuitive Cons: Lacks a visual designer; stability and speed of the Mono IDE lag Visual Linux and Mac OS platforms. for most .NET developers. The solution/ Studio, and documentation and commu- The goal of the MonoDevelop project project structure in MonoDevelop is nity support are less than robust. is twofold: enable .NET Visual Studio similar to that in Visual Studio, which developers to retain their productivity makes importing, navigating, setting up,

when developing on Linux, and to ease configuring and building projects a error—LINQ code valid for Windows IDEs migration of Visual Studio projects to the seamless experience. failed to compile for Mono. Mono platform. My hands-on look at C# is obviously the preferred lan- MonoDevelop reveals a promising tool guage, with more templates available for CONTROL ISSUES suite marred by some troubling flaws. C# projects than for Visual Basic.NET. Trouble started with the compilation of You can obtain the latest Most features of the modern IDE are the project. Custom con- MonoDevelop 2.0 release as a prepack- present: IntelliSense, refactoring, code trols and user controls declarations were aged distribution for your Linux distro or snippets, document outline, split file not handled correctly in the generated you can download source tarballs. As of view, code generation, project and file designer files, and the compilation took a this writing, the Mac OS package is still templates, multiple framework targeting, very long time to complete. I also ran incomplete and there’s no official installa- code metrics, integrated debugger, ver- across issues that made me question the tion for Windows. sion control, visual designer (GTK# only) robustness of the IDE. I saw several error and a lot more. dialogs while changing settings and FIRST IMPRESSIONS To test the IDE, I decided to migrate exploring functionality, and experienced Getting MonoDevelop and Mono 2.4 an existing ASP.NET business application multiple IDE crashes and slowdowns in framework installed and running might from Visual Studio 2008 to MonoDevelop. the course of my tests. present a major challenge. After several I was impressed by the import process MonoDevelop shows a lot of capa- unsuccessful attempts, I settled on and flawless compilation of most of the bility and maturity for building class openSUSE 11.1. Resolving inconsistencies library projects. I encountered only one libraries. The IDE is fast and offers a large selection of desirable productivity fea- tures. On the other hand, Visual Studio 2008 offers complete integration and unrivaled developer pro- ductivity. The documentation for both the Mono framework and MonoDevelop is rather sparse, and answers to questions about errors, compatibility issues and installation are not easy to find. DI

Krystyna J. Rosicka-Blonska, MSCD .NET, MS in Physics from Technical University of Gdansk, Poland, lives in Louisiana and works as a software architect at Not Rocket Science Inc. She builds line-of-business applications with Microsoft technologies and enjoys following the Microsoft .NET stack.

TO LEARN MORE ABOUT MONODEVELOP 2.0 AND MONO 2.4, VISIT VISUALSTUDIOMAGAZINE.COM. LOCATOR+ CODE: VS0907BLONSKA ASP.NET developers may be disappointed with MonoDevelop’s limited feature set, which lacks a design view and CSS color coding.

VisualStudioMagazine.com · July 2009 · VISUAL STUDIO MAGAZINE 13 0709vsm_DevInsight_10-14.v5 6/12/09 10:58 AM Page 14

PRODUCTS Mykonos is server-deployed software that provides a layer of infrastructure and services AVIcode Intercept uX to establish a boundary between client systems and the application server. Mykonos CEO David Koretz says the approach addresses a host of common AJAX vulnerabilities, including SQL injection, code insertion and cross-site scripting attacks. The Mykonos framework includes a logging engine that instantiates a session for each AJAX application and asynchronously monitors the client. Component-level filtering protects against injection and reverse engineering, while AJAX components are obfuscated and communicate with the server via a central remote procedure call (RPC) layer, rather than directly with the server. In addition to an AJAX client library with more than 50 GUI controls, Mykonos includes Tools and Utilities Tools a Visual Builder module for rapid application development. The Visual Builder integrates with Visual Studio. Mykonos is delivered as a hosted service. Mykonos 1.0 Mykonos LLC Price: $1,995 per developer per year, including support www.mykonossoftware.com Intercept uX lets users quickly target application performance issues. 877-889-4647; 650-329-9000 AVIcode’s new Intercept uX is an application monitoring and logging utility that provides detailed information on the behavior and health of browser- based Web applications. Unlike server-side monitoring, Intercept uX measures Borland TeamDefine operations that impact what the company calls the “keyboard to eyeball” response time of applications. The server-based software collects data by Borland TeamDefine is a requirements- injecting JavaScript-based dynamic agents into monitored Web pages. The management package that promises to reduce the logic enables Intercept uX to peer into any .NET-based application process amount of costly changes to software projects by and provide rich reporting and links to underlying methods and code. enabling visual mockups and dynamic interac- Intercept uX includes a rich, browser-based user interface that lets users tion among stakeholders in the application identify performance issues or failures, and immediately click through to assess development process. A design canvas lets devel- the underlying systems and code. Users can set thresholds and use the built-in opers drag and drop program elements, which reporting displays to focus on the most significant or common problems. they then link together by drawing out connec- Integration with Visual Studio lets developers link all the way back to the original tions to data and logic. TeamDefine works with C# or VB.NET code. sample data and logic to enable functional, Intercept uX interactive simulations of program behavior. AVIcode Inc. These simulations can be published to a URL so Price: Starts at $7,995 per server they’re accessible from a Web browser. www.avicode.com TeamDefine integrates with Borland’s 443-577-3000 Caliber RM enterprise requirements manage- ment product, and company executives say the tooling will extend integration to third-party requirements packages, by way of Borland’s Mykonos 1.0 AJAX Open ALM framework. TeamDefine Security Framework Borland Software Corp. Mykonos has released its Mykonos enterprise development framework and secu- Price: $3,000 per developer with unlimited rity service. Intended for developers building AJAX-based rich Internet apps, San reviewer seats www.borland.com Francisco-based Mykonos provides a server-based abstraction layer that helps 800-632-2864 shield and harden vulnerable AJAX components and logic from attack.

14 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com Project5 6/1/09 11:51 AM Page 1

Microsoft Chose SpreadsheetGear... “After carefully evaluating SpreadsheetGear, Excel Services, and other 3rd party options, we ultimately chose SpreadsheetGear for .NET because it is the best fit for MSN Money.” Chris Donohue, MSN Money Program Manager.

ASP.NET Excel Reporting Easily create richly formatted Excel reports without Excel using the new generation of spreadsheet technology built from the ground up for scalability and reliability.

Excel Compatible Windows Forms Control

Add powerful Excel compatible viewing, editing, formatting, calculating, charting and printing to your Windows Forms applications with the easy to use WorkbookView control.

Create Dashboards from Excel Charts and Ranges You and your users can design dashboards, reports, charts, and models in Excel rather than hard to learn developer tools and you can easily deploy them with one line of code.

Download the FREE fully functional 30-Day evaluation of SpreadsheetGear for .NET today at www.SpreadsheetGear.com.

Toll Free USA (888) 774-3273 | Phone (913) 390-4797 | [email protected] Project7 6/2/09 2:18 PM Page 1 Project7 6/2/09 2:19 PM Page 2 0709vsm_F1_18-22.v5 6/12/09 11:18 AM Page 18

Targeting A

18 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com 0709vsm_F1_18-22.v5 6/12/09 11:18 AM Page 19

BLOB STORAGE FEATURE

Learn how to store and retrieve binary large objects in the cloud with Azure’s RESTful Storage API. g Azure BY ROGER JENNINGS Storage

he collective storm swirling around the Corp.—with its pending Inc. acquisition—are nascent cloud computing market shows among the companies playing a furious game of catch-up to pre- no signs of letting up. Google the phrase vent Amazon Web Services, Google Inc. and Microsoft from “cloud computing” and the search becoming the enterprise cloud’s ruling triumvirate. returns more than 34 million hits. The initial appeal of cloud—or “utility”—computing is the Cloud computing’s claim to ability to rapidly scale application capacity as fluctuating developer mindshare is the promise of demand grows and, just as quickly, to shed resources as traffic an Internet-accessible virtual com- subsides. In 2009’s tight economy, cloud computing offers a way Tputing and storage environment hosted on connected servers in to reduce the risk of testing Web-based projects that require sub- third-party data centers. Cloud infrastructure services can help stantial resources for a minimum implementation. At a growing enterprises bypass the capital expense of on-site hardware, soft- number of companies, management’s quest for “green IT” status ware licenses, networking and data storage with a pay-for-usage may soon validate the increased efficiencies of data center oper- model—per hour or gigabyte—for off-site resources. ating scale—efficiencies that can reduce the amount of power Microsoft’s potential ability to leverage its Visual Studio consumption and heat generation per unit of computing work developer cadres to gain a foothold in the cloud computing and data storage. market is unsettling to existing and prospective players. Months Amazon Web Services, Google App Engine and Microsoft of unrelenting hype have followed Microsoft Chief Software Windows Azure all offer these features. However, only Microsoft Architect Ray Ozzie’s unveiling of the Windows Azure cloud delivers the unique advantage of minimizing the effort—and during Microsoft’s Professional Developers thus the cost—required to move .NET projects developed with Conference 2008. After about a year of developer feedback, Visual Studio from on-premises IT facilities to virtualized Microsoft is expected to announce the date for commercial Windows Server clusters and replicated data storage running on release of Windows Azure and the Azure Services Platform at the Windows Azure fabric in Microsoft data centers. PDC 2009 on Nov. 17. The foundation for the Azure Services Platform is the Amazon Web Services LLC and the Google App Engine have Windows Azure . This OS provides the fabric for a commanding presence as early infrastructure and Platform as a virtualized Windows 2008 Server instances; schemaless persistent

PHOTO-ILLUSTRATION BY BYRON SCOTT/ISTOCKPHOTO BYRON BY PHOTO-ILLUSTRATION Service (PaaS) providers. IBM Corp.,VMware Inc. and even Oracle table, binary large object (blob) and queue storage; .NET Services

VisualStudioMagazine.com · July 2009 · VISUAL STUDIO MAGAZINE 19 0709vsm_F1_18-22.v5 6/12/09 11:18 AM Page 20

FEATURE BLOB STORAGE

binary data and metadata that corresponds to files in a directory structure. Developers can quickly learn how to create, store and consume blobs of varying sizes with a simple Azure ASP.NET Web application called a WebRole. The top of Azure’s object pyramid is the Account, which is the unit of hosted application and storage ownership, resource consumption accounting and billing. Microsoft hasn’t dis- closed pricing or Service Level Agreement (SLA) details. The Azure team expects to publish pricing and SLA commitments later this summer and to deliver the Azure Services Platform version 1 as a commercial service by the end of 2009. If you don’t have a token for an Azure-hosted service account—which includes two storage services accounts—you can emulate Azure by downloading and installing the Windows Azure (SDK) community technology preview (CTP), which requires .NET 3.5 SP1 and . The SDK lets you run ASP.NET Web application code in the local Figure 1. Assign Your Storage Services to the Hosted Service’s Affinity Group Development Fabric and store blobs, tables and Microsoft added the Affinity groups feature to Azure in the March 2009 CTP. Affinity groups let you specify one Microsoft data center to hold your cloud queues in Development Storage—which, by application (WebRole or WorkerRole) and its data. Keeping the data close to default, is a local SQL Server 2005 or 2008 the code in the same geographical location eliminates performance hits from Express instance. network hops. One of Azure’s best features is the ability to develop and debug projects with Visual Studio for managing authentication/authorization, inter-service com- 2008 in the development environment. Download the munication, workflows, service bus queues and routers; SQL Windows Azure Tools for CTP to pro- Services for data management with SQL Server’s relational data- vide templates for cloud-based projects. Visual Studio 2008 is base features; and consumer-oriented Live services. Like the recommended for now. The Windows Azure Tools for Visual Google App Engine, Azure provides a development environment Studio May 2009 CTP supports Visual Studio 2010 beta 1. that emulates its cloud OS and storage services on-premises. However, the Windows Azure OS doesn’t work with .NET 4.0 Cloud-based SQL Analysis Services and SQL Reporting Services yet, and the .NET Services CTP—due in March 2009 at press are scheduled for post-version 1 release. time—doesn’t support Visual Studio 2010. Installing the Secure and reliable data storage is critical to commercial Windows Azure Training Kit is optional but recommended for infrastructure and PaaS offerings. Microsoft announced in late its hands-on labs. May that its cloud infrastructure had received both Statement of Using the Azure Services Developer Portal, you can quickly Auditing Standard (SASO 70 Type I and Type II attestations) and and easily publish your apps to Azure’s staging environment for the International Organization for Standardization and testing with the Azure fabric and cloud-based storage. After you International Electrotechnical Commission (ISO/IEC) verify operability with a GUID as the service name, a single click 27001:2005 certification for security. exchanges the staging version for the production service, if any For developers, integrating replicated data storage with exists. The only change you must make to your project code to cloud-based Web applications or services improves performance move from the development environment to the Azure and increases data availability and security, while maintaining Fabric is to comment-out and add a few lines to the scalability for traffic surges. The Azure Services Platform ServiceConfiguration.cscfg file. You can perform the edits in the provides four classes of replicated data storage: blobs for Azure Services Developer Portal’s Configuration page if you prefer. unstructured data such as music, pictures and video files up to Register for a cloud-hosted service account token at 50GB; tables for structured data; queues for services and mes- http://tinyurl.com/5m4nad; the service provisioning process is saging; and relational data. (See “Retire Your Data Center,” Byzantine and changes often. The wait is usually only a day or February 2009, for an overview of Azure’s layered architecture two, down from weeks for early CTPs. Click the Register for and structured table storage, which uses the entity-attribute- Azure Services link to open Microsoft Connect’s Applying to the value data model.) Azure Services Invitations Program page. Complete the survey, click Submit, and wait for the token to arrive in the e-mail Move ASP.NET Apps to the Cloud account for the Windows LiveID you presented. Visual Studio 2008, ASP.NET 3.5 Service Pack 1 (SP1) and the When you receive the token—which gives you 2,000 virtual Azure Services Platform simplify uploading blobs to scalable, machine (VM) hours, 50GB of cloud storage and 20GB per day replicated storage in virtual server clusters at Microsoft data cen- of storage traffic at no charge—go to the Azure Services ters. Azure blobs offer a simple interface to store unstructured Developer Portal (http://tinyurl.com/nldj3t). Sign in with the

20 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com 0709vsm_F1_18-22.v5 6/12/09 11:18 AM Page 21

BLOB STORAGE FEATURE

Containers are scoped to accounts and, unlike other Azure storage types, can be designated publicly read-only or private when you create the container with Representational State Transfer requests or .NET code.

same LiveID, click the I Agree button to create a new developer sion of StorageClient to take advantage of new CopyBlob and portal account, and click Continue to open the Redeem Your GetBlockList features for blobs. Invitation Token page. (Alternately, click the Account and the PHP developers can create a native interface for Azure storage Manage My Tokens link.) Copy the token product key to the Text accounts using the PHP SDK for Windows Azure CTP, which box and click the New Project link or Claim Token and Continue buttons to open the Project | Create a New Service Component page. Click the Hosted Services button to open the Create a Project: Project Properties page, type a Project Label and optionally fill in the Description text boxes and click next. Type a unique DNS name for your hosted service in the Service Name text box and click Check Availability to verify that no one has used it previously. Microsoft enabled Azure’s geo-location service in late April, so you can now specify an Affinity Group to ensure that hosted-service code and your storage account reside in the same data center to maximize performance. To date, only the United States-based data centers—USA- Northwest (Quincy, Wash.) and USA-Southwest (San Antonio, Texas)—are in operation. Select Yes, This Service Is Related to Some of My Other Hosted Services … and Create a New Affinity Group option buttons, give the affinity group a name, such as USA-NW1, and choose one of the two current data centers from the Region list. Click the Create button to create the new hosted service and open the Create a Service: Hosted Project with Affinity Group page. Each hosted-service token entitles you to two storage services accounts, which share a sim- ilar setup page. To add a storage service account, click the New Project link to reopen the Project | Create a New Service Component page, and Click the Storage Account button. Add a storage Project Label and Description, and click Next to open the Create a Project: Storage Account page. Type a DNS name for the account and select the Yes, This Service Is Related to Some of My Other Hosted Services … and Existing Affinity Group option buttons and select your Affinity Group name in the list (see Figure 1, opposite page). You’ll also need to download and install the Windows Azure SDK to provide the local Developer Fabric and Storage services, as well as the StorageClient sample C# class library, which enables manipulating blobs as .NET objects. The Windows Azure SDK May 2009 CTP adds new features to Azure table and blob storage, but the CTP’s .NET StorageClient library API doesn’t support them. You’ll need an updated ver-

VisualStudioMagazine.com · July 2009 · VISUAL STUDIO MAGAZINE 21 0709vsm_F1_18-22.v5 6/12/09 11:18 AM Page 22

FEATURE BLOB STORAGE

The Azure team provides a sample C# StorageClient class library that enables writing .NET code to manipulate containers and blobs in a more traditional object-oriented style.

Belgium integrator RealDolmen and project sponsor Microsoft opers. Fortunately, the Azure team provides a sample C# made available in May on Microsoft’s open source community StorageClient class library that enables writing .NET code to hosting site CodePlex. The PHP SDK provides PHP classes for manipulate containers and blobs in a more traditional object- Windows Azure blobs, tables and queues. The May CTP,which is oriented style. When you add a reference to StorageClient.dll, the first preview, is targeted at blob storage. you gain access to the Microsoft.Samples.ServiceHosting.Sto rageClient , which includes BlobStorage (account) Create Containers, Blobs and Blocks and BlobContainer abstract classes, as well as Blob Contents, Containers hold multiple blobs, emulating the way a folder con- Blob Properties and other classes in BlobStorage.cs. Classes in tains files. Containers are scoped to accounts and, unlike other RestBlobStorage.cs handle translation from .NET method calls Azure storage types, can be designated publicly read-only or pri- to RESTful HTTP requests; helper methods contain code to vate when you create the container with Representational State create blobs from blocks. Transfer (REST) requests or .NET code. Private containers The sample code for the AzureBlobTest.sln solution shows require a 256-bit (SHA256) AccountSharedKey authorization you how to write a WebRole application to create storage account string, which you copy from the Primary or Secondary Access Key and container objects, upload blobs from online storage in fields on the storage-service-name Summary page. You can add up SkyDrive or your test computer’s file system to the to 8KB of metadata to a container in the form of attribute/value container, and then display selected graphic blob content in a pairs. Azure storage offers a REST API, so anyone who knows the new browser window.All event-handling code is contained in the Uniform Resource Identifier (URI) for your public storage service, AzureBlobTest WebRole project’s Default.aspx.cs code-behind http://storage-service-name.blob.core.windows.net, can list its file. FileEntry.cs defines the FileEntry class for uploading local containers with a simple HTTP GET request, such as http://oak files. The StorageClient library includes class diagrams for leaf2.blob.core.windows.net/?comp=list. Returning a list of blobs BlobStorage.cs and RestBlobStorage.cs class files. in the oakleafblobs container uses a similar syntax with the blob Install the Windows Azure SDK CTP and the Windows name prefixed to the query string: http://oakleaf2.blob.core.win Azure Tools for Microsoft Visual Studio CTP, download the dows.net/oakleafblobs?comp=list. The Fiddler2 Web Debugging sample code (see Go Online for details), read the Readme.txt file, Proxy’s Request Builder makes it easy to write and execute and then unzip the files to a \AzureBlobText folder. RESTful HTTP requests. AzureBlobTest.sln connects to the oakleaf2store Storage account The maximum size of an Azure blob is 50GB in the May by default, but it’s easy to change to DeveloperStorage by editing 2009 CTP, but the largest blob you can upload in a single PUT the ServiceConfiguration.cscfg file. operation is 64MB. Creating larger blobs requires uploading and After you redeem your hosted-service token, follow the appending blocks, which can range up to 4MB in size. To handle instructions in the Readme.txt file to publish the project to interrupted uploads, each block has a sequence number so blocks your own hosted application and storage services in the cloud. can be added in any order. You can update blobs by uploading After you try it out for yourself, you’ll likely agree that new blocks, which overwrite earlier versions. Azure replicates all Azure is the easiest and quickest way for .NET developers to blob data at least three times for durability. Strong consistency experience the enterprise platform of the future: cloud com- ensures that a blob is accessible immediately after uploading puting with Windows. VSM or altering it. Blobs are scoped to containers, so a GET request to return a specific graphic blob from a public oakleafblobs Roger Jennings is a data-oriented .NET developer and author with more container is http://oakleaf2.blob.core.windows.net/oakleafblobs/ than 1.25 million English copies in print. His books on Microsoft operating blobname.png. systems and data technologies have been translated into more than 20 lan- HTTP REST requests use PUT BlobURI to insert a new blob guages. Jennings’ latest book is “Professional ADO.NET 3.5 with LINQ and or overwrite an existing blob named BlobURI, which uses the the Entity Framework” (WROX/Wiley, 2009). He’s also a Visual Studio same syntax as GET requests. GET BlobURI can return a range of Magazine contributing editor and writer for RedmondDeveloperNews.com, bytes with the standard HTTP GET operation with a Content- and manages the OakLeaf Systems blog (oakleafblog.blogspot.com). Reach Range entity-header. The REST API also supports HEAD requests him at [email protected]. to determine the existence of a container or blob without returning its payload. DELETE requests use the same URIs as PUT,GET and GO ONLINE HEAD. PUT BlockURI, GET BlockListURI, and PUT BlockListURI Use these Locator+ codes at VisualStudioMagazine.com to go use a similar addressing scheme. The Windows Azure SDK’s “Blob directly to these related resources. Storage API” section contains more details about the REST API for Blob Storage. DOWNLOAD VS0907RJ Download the sample code for this article. Objectify Blobs and Containers with StorageClient Writing the code to send HTTP request and process response READ MORE messages directly isn’t straightforward for most .NET devel- VS0907RJ_T Read this article online.

22 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com Project3 6/12/09 9:21 AM Page 1 0609vsm_Langlab_22-28.v11 6/12/09 10:53 AM Page 24

IN THIS SECTION: On VB · 24 //Ask Kathleen · 26 ////////////////////////////

{ ON VB }

5 Tips for Developing with Be aware that in VS 2005 and 2008, if you’re using the 64-Bit Windows “Visual Basic Development Settings” profile, changing the plat- form is a little messy. The problem probably stems from feedback 64-bit-capable machines are everywhere. It’s time you the VB team got about how folks found all the different settings in start thinking about 64-bit support as you develop your Visual Studio disorientating compared to VB6. The result was Visual Basic applications. that VB in Visual Studio was dumbed down almost to the point BY BILL MCCARTHY that it’s as limiting as the Make dialogue was in VB6.

64-Bit Windows The good news is that you can take control of this. The There was a time when 64-bit computing was an exotic idea, but simplest fix to give you ease of access to the build and platform those days are long past. 64-bit-capable clients and servers— configurations is to adopt the “General Development Settings” which have the ability to accept copious amounts of RAM and instead of the “Visual Basic Development Settings.”Alternatively, to run 64-bit versions of Windows—are everywhere. Video change the “Project and Solutions” options from the Tools ... editing, graphics, 3-D modeling and data-intensive applications Options menu, ensuring that the “Show advanced build configu- are just a few examples of software that benefit from 64-bit rations” option is selected. Next, customize one of your toolbars operating systems and hardware. so that it includes the “Solution Configurations” and “Solution Whether or not your application or components need the Platforms”drop-down combo boxes . extra addressable memory afforded by 64-bit architectures, you Once you have these enabled, you can select the still want to be able to use your app on 64-bit versions of “Configuration Manager” from either the “Solution Windows. Here are five tips to help you develop applications Configurations” or “Solution Platforms” combo-box lists. with 64-bit Windows in mind. Doing so brings up the Configuration Manager window, where you can add or modify your configurations. Configurations 1. Beat Bad Image Exceptions allow you to do special builds, such as for testing, or force only All too often, developers run into this: “An unhandled exception some of the projects in a multi-project solution to be built. For of type ‘System.BadImageFormatException’ occurred.”If you dig each configuration you can also support different platforms. into the detail of those exceptions you’ll probably find further To add either an x86 or x64 platform from the “Active information that says:“An attempt was made to load a program Solution Platform” list in Configuration Manager, select with an incorrect format.” “” and then select either x86 or x64 and copy the set- This problem occurs because a 64-bit process tries to load a tings from “Any CPU.”Later you can edit these settings for each 32-bit or vice versa. Although you can run both 64-bit individual project, using the project properties compile tab and and 32-bit processes on Windows x64, 64-bit code and 32-bit code advanced compile dialogue. If you aren’t already familiar with can’t run in the same process.Your code needs to be all 64-bit or all build configurations, have a look in the VS help documenta- 32-bit. This includes any assemblies you load. tion for “Build Configurations,” “Build Platforms” and Visual Studio (VS) 2005 along with .NET 2.0 brought in the “Configuration Manager Dialog Box.” Build Configurations option to compile .NET apps to 32-bit (x86) or 64-bit (x64 or will make your development experience a lot better. ), as well as an option to set the output to “Any CPU.”“Any CPU”is the default platform. If an assembly is compiled with “Any 2. Size Matters CPU”as the platform, then it will run as 32-bit or 64-bit depending An important difference between 64-bit and 32-bit Windows is on the process that loads it. With “Any CPU,”the same assembly the size of handles: they will be different. If you have any can run as 32-bit or 64-bit on 64-bit Windows: it’s not really the Windows API calls in your code, you need to ensure your decla- CPU or OS that dictates 64-bit or not, it’s the calling process. rations are correct for 64-bit Windows. If your code was upgraded To solve the bad image exception problems, change the target from VB6, you won’t have any concept of difference between a platform on all your assemblies to “Any CPU.”If for some reason handle and a 32-bit integer, so you’ll have to look for the original you aren’t able to do that—perhaps an assembly is supplied documentation or header files. Identify which parameters and without source—then set all your assemblies to the same plat- fields are handles, and use IntPtr for their types. Typically the form, either x86 or x64. If you have .NET 1.0 or 1.1 assemblies, documentation will identify these as INT_PTR or LONG_PTR it’s best to recompile them with .NET 2.0. If you can’t recompile or use a name indicating a handle of some sort, such as HWND. the .NET 1.0 or 1.1 assemblies, then compile your other code set Parameters that are defined with prefixes such as PTR or LPTR to the x86 platform so that it is compatible. are usually pointers and hence either have to be treated as

24 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com 0609vsm_Langlab_22-28.v11 6/12/09 10:53 AM Page 25

On VB Instantly SearchOn VB

an IntPtr or use ByRef marshalling. To determine if you’re run- Terabytes of Text ning as 64-bit base or 32-bit, you can check the IntPtr.Size value at runtime. N dozens of indexed, unindexed, 3. Yes Virginia, COM Can Be 64-Bit fielded data and A common misconception is that COM and ActiveX are limited full-text search to 32-bit, but with VB.NET you can use 64-bit COM and ActiveX controls. Few 64-bit compiled controls ship with Windows, but options (including one notable exception is the sysmon.ocx ActiveX control, which Unicode support lets you create system monitor graphs. My Vista developer for hundreds machine shows half a dozen or so 64-bit ActiveX controls in the of international Windows System directory. languages) You can use the 64-bit ActiveX controls in a Windows.Forms application, but there’s a catch when it comes to compiling. Visual N file parsers / Studio is currently a 32-bit app and it looks for the 32-bit ActiveX converters for control at compile time to create the runtime callable wrapper for the COM component. To compile in VS you need to have the 32-bit hit-highlighted version present. Once the app is compiled, only the version for the display of all chosen platform is needed. popular file In the case where you either don’t have the 32-bit version or types the signatures for the 32-bit version are different from those of Desktop withwith SpiderSpider the 64-bit version, you can use the command line to run the 64- N Spider supports Network withwith SpiderSpider bit tools to create an interop assembly for the ActiveX control. See static and the documentation for TlbImp.exe for further details. dynamic web Publish for CD/DVDs 4. Beware of Broken Mirrors data; highlights Web with Spider New When a 32-bit application runs in Windows 64, it runs with an hits while emulator. The emulator is called WOW64, and is an abbreviation displaying links, Engine for Win & .NET 64-bit for “Windows On Windows64” and allows 32-bit applications to formatting and view their world as if it were a 32-bit operating system. The Engine for Linux WOW64 emulator loads an x86 version of ntdll.dll, provides entry images intact points and thunking (mainly for Itanium), and most importantly N API supports .NET, C++, Java, databases, etc. intercepts some registry and file system operations. The WOW64 emulator also exposes different environmental New .NET Spider API variables to 32-bit applications compared to what the 64-bit ® applications see. Consequently, 32-bit applications see the The Smart Choice for Text Retrieval ProgramFiles environmental variable as ProgramFiles(x86). If since 1991 you write code such as MsgBox(Environ("ProgramFiles")), you will get by default “C:\”when running as 64-bit and N “Bottom line: dtSearch manages a terabyte of text “C:\Program Files (x86)” when running as 32-bit. in a single index and returns results in less than a The emulator does similar things with the registry and the system directories. For compatibility and performance reasons, the second” – InfoWorld %windir%\System32 folder is actually the 64-bit folder. That is, N 64-bit applications do not have any emulation interception. The “For combing through large amounts of data,” redirected folder for 32-bit operation is by default named dtSearch “leads the market” – Network Computing %windir%\SysWOW64. The name SysWOW64 indicates it is used N by the 32-bit emulator, WOW64. It can be a bit confusing. dtSearch “covers all data sources ... powerful The registry under WOW64 uses a combination of redirec- Web-based engines” – eWEEK tion and reflecting. The redirection resides under keys such as HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. At N dtSearch “searches at blazing speeds” – Computer least the naming pattern in the registry is a little better. The reflec- Reseller News Test Center tion is so 32-bit processes and 64-bit processes can both edit common keys such as file associations. On the other hand, the See www.dtsearch.com for hundreds more reviews, redirection is to ensure proper isolation of 32-bit from 64-bit. and hundreds of developer case studies The key thing is the implementation shouldn’t matter to you unless you’re trying to get details for a 32-bit app from a 64-bit app or vice versa. Usually it’s far simpler to compile to the same target. Contact dtSearch for For example,if you want to work with VS,compile your app targeting fully-functional evaluations x86, and you won’t need to worry about the file or registry emula- tion. If you run your app as “Any CPU,”then depending on how it’s launched, you may have to work with the redirection, and 1-800-IT-FINDS • www.dtsearch.com

VisualStudioMagazine.com · July 2009 · VISUAL STUDIO MAGAZINE 25 0609vsm_Langlab_22-28.v11 6/12/09 10:53 AM Page 26

On VB

API calls such as GetSystemWow64Directory and use the changes, recompile and start debugging again. You can, RegOpenKeyEx API for registry including the access mask of however, use Edit and Continue with a 32-bit app even if run on KEY_WOW64_32KEY. It can get messy and complicates testing. 64-bit Windows. This is another example where build configu- It’s far preferable to compile to the same platform as the app and rations come in handy. information you’re targeting. Create an x86 build configuration, and use that while devel- One complication I stumbled across was a combination of oping so you can use use Edit and Continue. Then switch the registry reflection and the Windows Vista User Access configurations to x64 or “Any CPU”for testing or nightly builds. Control (UAC). I was opening a key in the HKLM hive for write Working with either Windows 32 or Windows 64 isn’t that permissions, and the API was succeeding, yet when I went to difficult in VB8 (in VS 2005) or VB9 (in VS 2008). Use the power write to the key it would fail. My application was running as of Visual Studio and build configurations and the task becomes 32-bit on Windows 64 and hence the key in question was being reasonably painless. This is a welcome contrast to the difficulties reflected. I wasted a lot of time trying to determine what faced when porting earlier VB applications from 16-bit Windows was happening because the registry API was not behaving as it to 32-bit Windows. The basis of .NET—abstracting you from the normally does. In the end I managed to get it working correctly underlying operating system—makes this transition a relatively by including a with my application. Even though smooth one. VSM

64-Bit Windows the requestedExecutionLevel had the level set to asInvoker, that was all that was needed to remove this strange combination Bill McCarthy is an independent consultant based in Australia and is one of of a bug. the foremost .NET language experts specializing in Visual Basic. He’s been a UAC provides registry virtualization, and I think the Microsoft MVP for VB for the last 10 years and sat in on internal development combination of WOW64 redirection or reflection and UAC vir- reviews with the Visual Basic team for the last five years where he helped to tualization was too much. I now always ensure I have a manifest steer the language’s future direction. These days he writes his thoughts about on my apps. In VS 2008 you can get to the manifest from the language direction on his blog at http://billmccarthy.com. Application tab in the Project Properties dialog box. Make sure you include a requestedExecutionLevel option. GO ONLINE Use this Locator+ code at VisualStudioMagazine.com to go 5. Enable Edit and Continue directly to these related resources. Although you can debug a 64-bit app, you can’t use Edit and Continue while debugging. This means you can’t change the READ source code while debugging, instead you have to stop, apply VS0906OV Read this article online.

{ ASK KATHLEEN }

Fine-Tune in Unit testing is still a very young discipline, regardless of the number of years it’s been around. Because of this, there’s a bit of Visual Studio opinion in my answer. I care about pragmatic unit testing that is With a few tweaks, you can turn Visual Studio’s basic applicable to all projects. If you’re in a position to structure your unit-testing capabilities into a powerful and extensible system design around testing, you gain because there’s a close tool for improving code quality. parallel between easily tested designs and easily evolved designs. BY KATHLEEN DOLLARD I’m just not willing to say you can’t test unless you did test-driven development and have an architecture that allows mocking. Q: Our group is trying to create a unit tests suite for an application Testing existing architectures and systems requires devising nearing completion. I need to run tests with several different users a test approach that matches your system. Some designs are nearly logged and can’t figure out how to do this from a single test class. I untestable from a unit-test perspective, and must rely on manual also have a number of tests that are almost identical, differing only in testing. These designs place business logic within the user inter- the data input and outputs. Can I reuse code between tests? Finally, face. Assuming your logic is already in a business layer, the next we’ve only created 50 tests and I’m already lost about what condi- testing problems come from granularity and database access. tions are being tested. How will my group ever keep this straight after Direct database access means test performance is drastically we’ve created hundreds of tests? I’ve tried to read about unit testing slowed, changes to the database break tests as well as break your online, but so much of that is focused on system architecture, which actual code and—of course—test data must be maintained. we can’t change. I’d like to give up unit testing, but we have a man- I assume you’re encountering all of these issues. The simplest agement requirement to have complete code coverage. solution to maintaining test data is to recreate your database on each run and populate it as part of your testing. Yes, this slows A: Don’t give up on unit testing! down testing, but I’m willing to relegate testing to nightly builds if

26 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com 0609vsm_Langlab_22-28.v11 6/12/09 10:53 AM Page 27

Ask Kathleen

The first thing to do with code that isn’t being covered is to ensure that it’s being used.

the testing happens every night and it’s not practical to retroac- work that way. In your case, the simplest approach is a different tively add a mocking layer. I don’t claim that it’s ideal, but it gets class for each log-in scenario. you beyond stressing over testability and lets you focus on writing Reuse is important in testing. Watch for opportunities to tests. You must to keeping all tests in synch with the refactor your code to minimize redundancy and feel free to use database whenever the database changes. Test sets can fall into inheritance and help methods when appropriate. For example, complete disuse in a matter of weeks during development unless different log-in scenarios can use the same base class. these changes are done in real time. Another technique available to maximize code reuse during It’s easy to fall into thinking tests are special and follow dif- testing is data-driven testing. This technique has nothing to do ferent rules than the rest of your code—but tests are still code with the database you may be using when your application exe- and deserve the kind of attention you would give any other type cutes. It’s a technique that lets you declare input and output values of code. Object design, reuse, meaningful naming and good code by an external mechanism and lets you consolidate tests that differ quality are important as you move into doing more unit testing. only by input and output values. You can use any ODBC source, The first questions to ask in exploring objects are: “What including SQL Server. I prefer Excel because it allows testers and will this object do?” and, “Why is it a separate object?” The support staff to easily add more test conditions. You’ll need to

generated test file created by Visual Studio gives the entirely access the TestContext, write your tests to use the test data and Testing Unit incorrect impression that the purpose of a test class is to test a ensure deployment: single class under test. A quick review of the attributes used in testing demonstrates that the real purpose is to set conditions [TestClass] for a set of tests, test and tear down the test conditions. public class TestClass Attributes mark methods as ClassInitialize, TestInitialize, { ClassCleanup, TestCleanUp and TestMethod. Of course you public TestContext TestContext {get; set;} can’t test multiple users easily from a single class—the generated code may imply this, but the class simply wasn’t designed to [TestMethod]

VisualStudioMagazine.com · July 2009 · VISUAL STUDIO MAGAZINE 27 0609vsm_Langlab_22-28.v11 6/12/0910:53AMPage28 28 Unit Testing IULSUI AAIE· VISUAL STUDIO MAGAZINE , ]); more tests. determine thecorresponding scenarioandadd the code isused, code thatisn’t If beingcovered isto ensure thatit’s beingused. Thefirstthingto dowith what code hasnotbeentested atall. onlythingcoverage The indicates is points were considered. negative andzero values)andotherlikely failure (such asnull, itcan’t because conditions consider boundary whether tested, Code coverage can never determine whether the system is well productivity. code asameasure of better thancountingno linesof Code coverage metric— isaterrible interested incode coverage. people are identical. test namescreated by different asmuch aspossible, dards sothat, It helps to create stan- great benefit. full sentence structure is of Here offered by clarity theextra output anddocumentation. test these methods—you’ll onlyread theminthecontext of intheterminal classes. asserts andjustperforming in thisclass, theactualcode running from aprotected method same baseclass, you canimprove reuse similarclassesfrom by the deriving cases, In many …property_matches_configuration in the any_user class. based onconfiguration, is authorization If howdescribe your system isdesigned. You may actuallyworks. needto becreative innamingto system documentshow Thisorganization your or any_user test class. thistest may belongineithertheadmin your rules, authorization on Depending to check theconditions andfeatures you’re testing. You basedsolelyonreflection areport thatallows canimagine you actually testing: Thetests reflect you’re what tests. authorization of a series intheappropriateClass initializationthenlogs userandruns VS0906AK READ directly to theserelated resources. Use thisLocator+ code at GO ONLINE IASA Denver. Northern Colorado Architect’sVisual Studio User Group, Group and Denver intheNorthern Colorado active andisalso .NETSIG, each year, groups conferences anduser She speaksatdozensof 2004). (Apress, .NET” “Code Generation inMicrosoft andistheauthorof code generation cation appli- with Dollard extensively hasworked the INETA Speaker’s Bureau. She aMicrosoftof hasbeen MVPfor11yearsandisamember ture.com). for AppVenture technologist (www.appven Kathleen Dollard isthechief ... User_class_CanCreate_property_is_true() public class You mention testing conditions and say management is butyou’ll never call It’s easyto atthelongnames, wince public void [ TestMethod()] Read thisarticleonline. VSM When_any_user_is_logged_in VisualStudioMagazine.com o ,the for example, test be might to go

Unit Testing Project5 5/11/09 10:10 AM Page 1

SEATTLE • JULY 20-22, 2009

Learn how to do more with less. Th ree days of practical, no-fl uff mastery.

Web Design World 2009 Seattle Deep Alumni July 20-22 Discounts

webdesignworld.com/09seattle Use priority code NQ9W01

0709vsm_AdIndex_31.v2 6/12/09 11:09 AM Page 31

Advertising Sales Ad Index

Advertiser Page /n Software Inc. 9 www.nsoftware.com Accusoft Pegasus 21 www.accusoft.com AspDotNetStorefront 11 East www.aspdotnetstorefront.com Andrew Mintz Aspose C3 www.aspose.com National Sales Manager Phone: 508-532-1433 ComponentArt, Inc. C2, 1 [email protected] www.componentart.com dtSearch 25 www.dtsearch.com ESRI 2 West www.esri.com Chris Kourtoglou FarPoint C4 Regional Sales Manager www.fpoint.com Phone: 650-579-0121 LEAD Technologies, Inc. 5 [email protected] www.leadtools.com Microsoft Corporation 16, 17 www.microsoft.com National Accounts Director Director, Print Production Jenny Hernandez-Asandas PureCM.com 27 William Smith Phone: 818-734-1520 ext 101 www.purecm.com Phone: 603-886-3466 Fax: 818-734-1528 SpreadsheetGear 15 [email protected] [email protected] www.spreadsheetgear.com TechExcel, Inc. 23 Manager Production Coordinator www.techexcel.com Serena Barnes Danna Vedder VSLive Orlando 30 Phone: 818-734-1520 ext 164 http://vslive.com/orlando Phone: 253-514-8015 [email protected] [email protected] Wayside Technology Group, Inc 7 [email protected] www.waysidetechnology.com Web Design World 29 webdesignworld.com/09seattle ID Statement information has been reviewed for accuracy, there is Visual Studio Magazine (ISSN 1537-002X) is published no guarantee that the same or similar results may be Editorial Index monthly by 1105 Media Inc., 9121 Oakdale Avenue, achieved in all environments. Technical inaccuracies may result from printing errors and/or new develop- Amazon Web Services LLC 19 Ste. 101, Chatsworth, CA 91311. Periodicals postage http://aws.amazon.com paid at Chatsworth, CA 91311-9998, and at additional ments in the industry. mailing offices. Complimentary subscriptions are sent Apple Inc. 13 www.apple.com to qualifying subscribers. Annual subscription rates for Corporate Address non-qualified subscribers are: U.S. $34.97, Canada 1105 Media Inc. AVIcode Inc. 14 www.avicode.com $52.97 (U.S. funds); International $78.97 (U.S. funds). 9121 Oakdale Ave. Ste 101 Subscription inquiries, back issue requests, and Chatsworth, CA 91311 Borland Software Corp. 14 address changes: Mail to: Visual Studio Magazine, www.1105media.com www.borland.com P.O. Box 1164, Skokie, IL 60076-8164, e-mail Google Inc. 19 [email protected] or call toll free 888-768- Media Kits www.google.com 8759, fax number 847-763-9564. International calls Direct your Media Kit requests to Matt Morollo, VP IBM Corp. 19 847-763-9135. POSTMASTER: Send address changes Publishing. www.ibm.com to Visual Studio Magazine, P.O. Box 1164, Skokie, IL Phone: 508-532-1418 Mykonos LLC 14 60076-8164. Canada Publications Mail Agreement No: Fax: 508-875-6622 www.mykonossoftware.com 40612608. Return Undeliverable Canadian Addresses E-mail: [email protected] Novell 13 to Circulation Dept. or Bleuchip International, P.O. Box www.novell.com 25542, London, ON N6C 6B2. Reprints Oracle Corp. 19 For single article reprints (in minimum quantities of www.oracle.com Copyright Statement 250-500), e-prints, plaques and posters contact: © Copyright 2009 by 1105 Media, Inc. All rights RealDolmen 22 PARS International www.realdolmen.com reserved. Printed in the U.S.A. Reproductions in Phone: 212-221-9595 whole or part prohibited except by written permis- E-mail: [email protected] Telerik Inc. 10 www.telerik.com sion. Mail requests to "Permissions Editor," c/o Visual Online: www.magreprints.com/QuickQuote.asp Studio Magazine, 2600 El Camino Real, Ste 300, San VMware Inc. 19 Mateo, CA 94403. List Rental www.vmware.com This publication’s subscriber list, as well as other Legal Disclaimer lists from 1105 Media Inc., are available for rental. The information in this magazine has not undergone For more information, please contact our list manager, Go to VisualStudioMagazine.com any formal testing by 1105 Media, Inc. and is distrib- Merit Direct. to access the stories in this issue, uted without any warranty expressed or implied. Phone: 914-368-1000 plus read exclusive online-only Implementation or use of any information contained E-mail: [email protected] content. herein is the reader's sole responsibility. While the Online: www.meritdirect.com

VisualStudioMagazine.com · July 2009 · VISUAL STUDIO MAGAZINE 31 0709vsm_RedReview_32.v3 6/12/09 11:02 AM Page 32

BY ANDREW J. BRUST

Integration, Not Capitulation Business intelligence (BI) allows users to monitor trends and able to delivering analytics capabilities where users need them: in make adaptive decisions in response. Fittingly, Microsoft applied the line-of-business apps you build and in the Office applications the same approach to the BI market itself, when it recast the users live in. The approach means fewer expensive “big bang” BI Monitoring and Analytics component of its PerformancePoint projects. Developers can easily add -sensitive analytics to Server (PPS) BI package as a subset of SharePoint Enterprise. The existing applications and meaningful dashboards to existing Planning module of PPS has been discontinued altogether. Has SharePoint implementations. Microsoft given up on BI? Hardly. Unlike BI vendors, Microsoft has always pushed BI Making the Right Move into the mainstream, accessible to business users and customiz- Microsoft isn’t exiting the BI market; it’s redefining it. And the able by developers. Essentially, Microsoft thinks BI should be a company’s doing so on its own terms, bringing to bear three of its line-of-business technology. The PerformancePoint change con- core strengths: Office, SharePoint and you—the .NET developer. forms to this approach, and will have a huge impact for developers. This may take Microsoft out of the upper-right-hand corner of There’s plenty for developers to get after. On the platform those market maps analysts like to produce, but so be it. In this side, there’s the MDX language and ADO MD.NET (an ADO.NET economy, businesses don’t want maps to the homes of Hollywood provider), which you use to query Analysis Services cubes. There’s stars; they want a GPS to show their location, traffic reports XML for Analysis (XMLA), Analysis Services’ native protocol, which to avoid accidents and optimized routing to get them to their just happens to be a SOAP . And if that’s not good destination quickly. enough, developers can write functions and procedures in .NET I’m betting that with Office and SharePoint, Microsoft has programming languages, then load the resulting assemblies into made the right move. When Office 2010, SQL Server “Kilimanjaro” Analysis Services and call the .NET code from queries. and project “Gemini” (which includes a desktop version of Analysis Services and self-service BI features in Excel) are released, that bet will keep paying off. (For more on Gemini, read my December 2008 Redmond Microsoft isn’t exiting Review column, “Selling Self Service,” online here: http://tinyurl.com/6r28n5.) Building more BI the BI market; it’s redefining it. capabilities into the core stack is where the smart money is. But Microsoft must take this strategy further. On the presentation side, Excel 2007 can query cubes via Silverlight and the technology acquired from Dundas should be used PivotTables, visualize the results using PivotCharts and can now in every Microsoft BI product for breathtaking data-visualization. even embed MDX expressions within cell formulas. Add Visual ADO.NET Data Services should be another query front-end to Studio Tools for Office (VSTO) to the , and the opportunity for Analysis Services. Visual Studio Team System’s database features full .NET BI solutions within Excel is there for the taking. That’s should support Analysis Services. And a real BI offering should be not all. You can use Excel Services to present your programmatically part of the Azure Services Platform. created PivotTables, charts and tables within SharePoint dash- If Microsoft wants BI to be mainstream, then BI should inhabit boards, making your solutions available to any machine with a Web early versions of its products as a matter of course. BI shouldn’t be an browser. Add SharePoint’s now-included PerformancePoint afterthought or an add-on. That’s the lesson of PerformancePoint, Services to the mix and you can integrate all this with Reporting and that knowledge should drive product decisions in Redmond Services and PPS’s own grids and charts. henceforth. That is, after all, what BI is all about. VSM As long as your firm or your customer has SQL Server, Office 2007 and SharePoint Enterprise, you can deliver top-notch BI solu- Andrew J. Brust ([email protected]) is chief, new technology, for tions, using your .NET skills, and without a lot of extra baggage. consultancy twentysix NewYork, as well as a Microsoft regional director and Separate licensing? No longer required. Stand-alone applications MVP. He’s also the co-author of “Programming Microsoft SQL Server 2008” and disjointed user interfaces? Not necessary, and far less prefer- (, 2008).

32 VISUAL STUDIO MAGAZINE · July 2009 · VisualStudioMagazine.com Project1 2/24/09 10:18 AM Page 1 Project1 4/27/09 12:04 PM Page 1