Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
v2
12/15/08
11:56 AM
Page 1
E N T E R P R I S E
S O L U T I O N S
Partition
Web Apps
Intelligently
JANUARY 2009 Vol. 19, No. 1
F O R
.N E T
D E V E L O P M E N T
Project5
12/11/08
4:42 PM
Page 1
BeTheDataGuru
Visual Studio
WPF/Silverlight
SharePoint
SQL Server
Java
COM
PowerShell
Project5
12/11/08
4:43 PM
Page 2
Visit softwarefx.com for interactive demos and more information about our latest products.
0109vsm_TOC_02-04.v6
12/15/08
9:39 AM
Page 2
Contents
January 2009 VOLUME 19 NO. 1
C O LU M N S
C# CORNER
21
D E PA RT M E N T S
10
F E AT U R E S
24 Ask Kathleen
Windows Workflow Changes Direction
Learn how Windows Workflow 4.0 changes everything; why using string primary keys is a bad idea;
get a data grid for Windows Presentation
Foundation; load files at runtime; and how to copy
files into the executable directory.
BY KATHLEEN DOLLARD
28 Special Interview
Connect to the Cloud
In this special interview, Microsoft Corporate Vice
President Robert Wahbe discusses the Azure
Services Platform and Software plus Services
applications with 1105 Medias Jeffrey Schwartz
and Michael Desmond.
BY JEFFREY SCHWARTZ
AND MICHAEL DESMOND
31 Index of Advertisers
32 The Pragmatic Developer
Is Agile Rock or Disco? BY BILLY HOLLIS
Project4
12/11/08
4:04 PM
Page 1
LEADTOOLS Document
Imaging v 16:
by LEAD Technologies
LEADTOOLS Document Imaging has every
component you need to develop powerful
image-enabled business applications including
specialized bi-tonal image display and
processing, document clean up, high-speed
scanning, advanced compression (CCITT
New
G3/G4, JBIG2, MRC, ABC) and more.
Version
Multi-threaded OCR/ICR/OMR/
16!
MICR/Barcodes (1D/2D)
Forms recognition/processing
PDF and PDF/A
Paradise #
L05 03201A01 Annotation (Image Mark-up)
C/C++, .NET, WPF - Win32/64
$
99
programmers.com/lead
2,007.
Paradise #
D77 09101L01
1,444.99
949.
Foundation
Acceleration Kit
Paradise #
V55 47101A01
2,504.99
programmers.com/vmware
TX Text Control 14
by /n software
New
Word Processing Components
Release!
TX Text Control is royalty-free,
robust and powerful word processing
software in reusable component form.
Paradise #
SC5 03101A01
by FairCom
1,414.99
Single Server
Paradise #
D29 02101A07
New
Release!
c-treeACE Professional
5-User Pack
Paradise #
T34 0208
VMware Infrastructure
Acceleration Kits
Point-and-click administration
Fully configurable user interface
Paradise #
F01 0131
711.99
programmers.com/techexcel
919.
programmers.com/theimagingsource
New
Release!
Enterprise Edition
1 user
Paradise #
I0D 03101A02
1,056.99
programmers.com/altova
196.
StorageCraft ShadowProtect
IT Edition v3.x
Telerik RadControls
Multi-Edit 2008
by Telerik
by StorageCraft
Create, edit or restore backup images on as
many servers, desktops and laptops as needed.
Create online or cold state backups in minutes,
no software installation required. StorageCraft
ShadowProtect IT Edition provides complete
bare metal recovery in minutes. ShadowProtect
IT Edition provides IT Professionals with a
bootable Windows environment to create and
restore compressed and encrypted backups,
no software installation required.
648.
3,252.99
programmers.com/storagecraft
800-445-7899
Prices subject to change. Not responsible for typographical errors.
New
Release!
1-49 User
Paradise #
A30 01201A02
161.99
programmers.com/multiedit
programmersparadise.com
0109vsm_TOC_02-04.v6
12/15/08
9:39 AM
Page 4
Online
Check out these and other exclusive online articles and tutorials on the Visual Studio Magazine Web site at
VisualStudioMagazine.com
Content
LEARN FROM THE PROS
As a developer you are constantly
facing the problem of how to keep
up with all the new technologies
being released while still getting
your job done. You keep hearing
about solutions to your programming problems but the question is:
are they the right solutions for your
particular needs? You could spend
the hours or even days trying to
find the answers yourself, or you
could let the experts do it for you.
Redmond Media Group Events offers
a variety of conferences and shows
where you can learn about new technologies and what they might offer
you, attend in-depth workshops that focus on topics specific to your
needs, ask questions of the experts, and interact with your peers to
discuss problems they face and what solutions theyve come up with.
Whether its Web design, .NET development, or SQL Server programming,
weve got an event that matches your needs. Visit the Redmond Media
Group events page at http://redmondevents.com to learn more about
upcoming conferences and shows.
ONLINE ARTICLES
San Francisco
Hyatt Regency Embarcadero
February 23-27, 2009
SAVE
UP TO
$300
BONUS!
FREE pass to Microsofts one-day
MSDN Developer Conference on
Monday, Feb. 23.
(Space is limited; first come, first served.)
0109vsm_VSLive Ad_p5.indd 1
12/15/08 2:15:41 PM
0109vsm_Letters.6.v5
12/15/08
2:30 PM
Page 6
Letters
Letters to Visual Studio Magazine are
welcome. Letters must include your
name, address, and daytime phone
number to be considered for publication. Letters might be edited for form,
fit, and style. Letters express the point
of the individual authors, and do not
necessarily reflect the views of the
editors, VSM, or 1105 Media. Please
send them to Letters to the Editor, c/o
Visual Studio Magazine, 230 California
St., San Francisco, CA 94111; fax
them to 415-814-0961; or e-mail
them to vsmedit@1105media.com.
VisualStudioMagazine.com
January 2009 Volume 19 No. 1
Editorial Staff
Vice President, Doug Barney
Editorial Director
Editor in Chief
Managing Editor
Patrick Meader
Guy Wright
Wendy Gonchar
Associate Managing
Editor, RMG
Katrina Carrasco
Contributing Editors
Andrew J. Brust, Ken Cox, John Cronan, Dan Fergus, John Gavilan,
Roger Jennings, Don Kiely, Martin Kulov, Jeff Levinson, Bill McCarthy,
John Charles Olamendy Turruellas, Keith Pleas, Peter Varhol, Bill Wagner
Art Staff
Creative Director Scott Shultz
Senior Art Director
Bruce Gardner
Graphic Designer
Erin Horlacher
Online/Digital Media
Editor, VisualStudio Becky Nagel
Magazine.com
ve been a VSM reader for more than five years and a Visual Basic user for a few years longer
than that. I wanted to let you know that I especially enjoyed VSM s recent twin columns from
Kathleen Dollard [Ask Kathleen, What C# Devs Should Know About VB, December 2008]
and Bill Wagner [C# Corner, What VB Devs Should Know About C#, December 2008] on the
issues you face when switching between C# and VB.
Too often, developers and authors turn the differences between languages into arguments about why one language is better or worse than the other. These real-world articles told
you how the languages work and the issues you can expect to encounter if you switch between
the two. As a VB user, it was informative for me to read about the potential issues C# devs
might face when they work on projects with me. After reading Dollards article, I can understand better why my own team has faced some of the issues it has.
I like VSM immensely and have enjoyed reading it these several years, but I love what
you did with these articles and hope to see more like them in the future. Please keep up the
good work.
Rodney Bryant, received by e-mail
Michael Domingo
Kurt Mackie
Gladys Rama
Shane Lee
Rita Zurcher
President
Henry Allain
President &
Chief Executive Officer
Senior Vice President
& Chief Financial Officer
Executive Vice President
Matt N. Morollo
Michele Imgrund
Tracy S. Cook
Videssa Djucich
Neal Vitale
Richard Vitale
Michael J. Valenti
Dick Blouin
Christopher M. Coates
Abraham M. Langer
Erik A. Lindgren
Carmel McDonagh
Jeffrey S. Klein
0109vsm_EdNote_07.v6
12/15/08
Editors
9:13 AM
Page 7
Note
VSMS
NEW BIG IDEA
BY PATRICK MEADER
editor in chief
0109vsm_FirstLooks_08-09.v8
12/15/08
9:30 AM
Page 8
First
PRODUCT LISTINGS
Looks
REVIEWS
communication, and helps dev teams implement agile methodology and best practices.
TeamCity 4.0 provides scalability and
extensibility via its Java API, and integrates
with multiple IDEs, version control systems,
and build tools. With features such as fast
feedback on build progress, pre-tested commits, and server-side code analysis with over
600 code inspections, TeamCity shortens the
time needed for introducing new features
and fixes.
The latest version allows developers to
break down a single build procedure into several parts that can be run on different build
agents, in sequence or in parallel, using the
same set of sources. Other features include
the ability to redo any build from a particular
version-control revision; improved agentsauthentication mechanics, per-agent CPUbenchmarks, and agents overview statistics for
an entire project; new integrations, including
FxCop and a dedicated Rake runner, as well as
improvements for old ones such as MSTest;
and improved Eclipse integration.
TeamCity 4.0
Web: www.devexpress.com
Typemock Ltd.
JetBrains
Phone: 702-262-0609
Web: www.typemock.com
Phone: +972-3-681-5177
Web: www.jetbrains.com
Phone: 650-378-8571
TeamCity 4.0
JetBrains has announced the availability of its
continuous integration server and distributed
build management tool, TeamCity. TeamCity
automates routine procedures, aids the software development process, improves team
0109vsm_FirstLooks_08-09.v8
12/15/08
PRODUCT LISTINGS
9:30 AM
Page 9
REVIEWS
0109vsm_F1WebApps_10-20.v8
F E AT U R E
12/15/08
9:26 AM
Page 10
MVC FRAMEWORK
Partition
Web Apps
Intelligently
Microsofts Model-View-Controller framework makes it
possible to implement a separation of concerns in ASP.NET
something that was difficult, if not impossible, previously.
Learn how to take advantage of MVC to design better
Web apps that separate their architectural elementsthe UI,
business logic, and codeproperly, as well as how to review
what you create with unit testing. BY STEVE MICHELOTTI
T
TECHNOLOGY TOOLBOX
VB.NET
C#
SQL Server
ASP.NET
XML
Other:
MVC Framework
10
0109vsm_F1WebApps_10-20.v8
12/15/08
9:26 AM
Page 11
MVC FRAMEWORK
{
public ViewResult Index();
public ViewResult Create(int? id);
public RedirectToRouteResult Delete(int id);
public ActionResult Save(Contact contact);
}
http://somedomain/Contact/Create/21
The routing framework is extremely flexible, and the route mappings are set up in the Global.asax file.A full discussion of the routing
framework is beyond the scope of this article, but its important to
note that this basic pattern is used throughout this article.
To implement a Controller class, you must inherit from System.Web.Mvc.Controller. Any public method in your Controller
that returns a derivative of ActionResult is a valid Controller Action
method. Based on the first screen defined, you need Controller
actions to display a list of contacts,delete a contact,and send users to
the contact details screen to add or modify a contact.
A Controller action to save the contact is also required for the
contact details screen. This code provides the ContactController
class definition:
public class ContactController : Controller
11
Project5
12/11/08
4:26 PM
Page 1
Project5
12/11/08
4:33 PM
Page 2
0109vsm_F1WebApps_10-20.v8
12/15/08
9:26 AM
Page 14
MVC FRAMEWORK
<%=Html.ActionLink<
ContactsController>(c=>
c.Create(contact.
ContactID), "Edit")%>
{
IEnumerable<GetContactResult> contactList =
contactManager.GetContactList();
ViewData.Model = contactList;
return View(Index);
<%=Html.ActionLink<ContactsController>(c=>
This method is quite simple, but there are some important things
happening. First, this code is getting the list of contacts from the
data layer. Next, it sets that collection as the Model of the Controllers ViewData. This ViewData is passed to the View. Finally,
the returned View is called Index.The MVC framework searches
for a physical file called Index.aspx or Index.ascx in the folder that
corresponds to the Controller name or the Shared folder. If you
omit the Index name parameter to the View method, it looks automatically for a View that has the same name as the current action
method name (Index, in this case). However, you should avoid
doing this because you want your code to be as explicit and testable
as possible.
Now you want to implement the view. Begin by inheriting
from ViewPage:
Once the user selects a specific contact, they must be sent to the contact details screen so that modifications can be made. There are two
pieces of data that the screen requires. First, the appropriate contact
object needs to be available. Second, the screen must provide a dropdown list of U.S. states that the user can pick from. How do both
pieces of information get sent to the View as a single Model? You
accomplish this by creating a simple wrapper class called ContactViewData that acts as your Model. Its a common misconception
to think of the business objects as the Model in the ASP.NET MVC
framework. This is sometimes true, but its not always accurate. The
Model is actually whatever abstraction is needed for the presentation
layer to accomplish its objective properly. This is quite often more
than business objects. This code describes the complete implementation of the ContactViewData class:
14
FIGURE 3 Contact Details Screen. Detail screen where contacts can be edited and then
persisted. Validation messages are present for each control based on business object
validation. The results are posted to the Controllers Save action method.
0109vsm_F1WebApps_10-20.v8
12/15/08
9:27 AM
Page 15
MVC FRAMEWORK
plete code for the ContactBinder in the code download for this
article (see Go Online, p. 18, for download details).
In this scenario, the first job of the Save method is to validate the
object by invoking the validation rules defined in the business layer. If
the object is valid, you send it to the data layer for persistence and
then redirect the user back to the main screen. Otherwise, you need
to show the user the form again, so they can fix the invalid data.
Best practices dictate that validation of business objects
should occur in the business layer. Too often, developers implement the validation only in the presentation layer, or worse, duplicate
the validation of their business objects in the presentation layer. A
great framework to validate business objects declaratively is the
Microsoft Enterprise Library Validation Application Block (VAB).
The VAB allows you to validate your business objects on the objects
themselves. Another great aspect of MVC is that it provides a flexible framework to hook the UI validations into already existing
object validations. The VAB is simply one of the many frameworks
Again, the markup in the View is simple and straightforward. Additionally, theres no code required in the code
behind. (See Listing 2, p. 18, for the complete code for
the Create.aspx page.)
One thing of note in Listing 2 is the ContactControllers Save action method. There are various
ways to save form data in the MVC framework. One
of the most elegant methods is to utilize Model
Binders. Using Model Binders, which implement the
System.Web.Mvc.IModelBinder interface, means the
act of creating an object from form parameters can be
encapsulated in the binders and abstracted away
from the Controller actions methods. This allows the
Controller action methods to save objects strongly
typed for that method. That is, the resulting object
from the binder will be passed in to the appropriate
Controller method for saving. You can find the com-
C#
LISTING 1 This is the complete mark up for the contact list screen.
15
Project7
12/15/08
1:21 PM
Page 1
COMPLETELY RE-ENGINEERED
Cross-browser support
3x smaller footprint
Cross-browser support
Incorporate powerful, data-bound grids to your
applications with C1DataGrid
The first and only ASP.NET component suite that enables you to build iPhone
Web apps that look and feel like the native UI
Includes design elements for menus, UI buttons, content controls, sliders, and more
Grids Char ting Repor ting Scheduling Menus and Toolbars Ribbon Data Input Editors PDF
ComponentOne Sales
1.800.858.2739 or 1.412.681.4343
ved.
duct
ered
ders.
Project7
12/15/08
1:21 PM
Page 2
It's here and supercharged for the Web: Studio Enterprise 2008 v3.
This new release delivers exactly what you need to produce nextgeneration UIs for the Web.
componentone.com/amazingweb
0109vsm_F1WebApps_10-20.v8
12/15/08
9:27 AM
Page 18
MVC FRAMEWORK
C#
<td valign="top">
<table>
<tr>
<td>Street Address:</td>
<td>
<%=Html.TextBox(
"Contact.Address.StreetAddress")%>
<%=Html.ValidationMessage(
"Contact.Address.StreetAddress")%>
</td>
</tr>
<tr>
<td>City:</td>
<td>
<%=Html.TextBox("Contact.Address.City")%>
<%=Html.ValidationMessage(
"Contact.Address.City")%>
</td>
</tr>
<tr>
<td>State:</td>
<td>
<%=Html.DropDownList("(Select)",
"Contact.Address.StateID", new
SelectList(this.ViewData.Model.StateList,
"StateID", "StateDesc",
ViewData.Model.Contact.Address.StateID)) %>
<%=Html.ValidationMessage("Contact.Address.
StateID")%>
</td>
</tr>
<tr>
<td>Zip:</td>
<td>
<%=Html.TextBox("Contact.Address.Zip")%>
<%=Html.ValidationMessage("Contact.Address.Zip")%>
</td>
</tr>
</table>
</td>
</tr></table>
<a href="javascript:document.mainForm.
submit();">Save</a>
<%=Html.ActionLink<ContactsController>(c
=> c.Index(), "Cancel") %>
<%=Html.Hidden("Contact.ContactID") %>
<%=Html.Hidden("Contact.LastUpdated",
ViewData.Model.Contact.LastUpdated.ToString(
"MM/dd/yyyy HH:mm:ss.fff"))%>
</form>
</asp:Content>
LISTING 2 The code for the edit contacts view is simple and straightforward.
18
0109vsm_F1WebApps_10-20.v8
12/15/08
9:27 AM
Page 19
MVC FRAMEWORK
[TestMethod]
}
IEnumerable<State> stateList = contactManager.
GetStates();
this.ViewData.Model = new
ContactViewData(contact, stateList);
return View(Actions.Create);
IEnumerable<GetContactListResult>
contactList = TestUtil.
CreateContactList();
contactManager.Expect(c =>
c.GetContactList()).Returns(contactList);
// execute
19
0109vsm_F1WebApps_10-20.v8
12/15/08
9:27 AM
Page 20
Instantly Search
Terabytes of Text
MVC FRAMEWORK
N dozens of indexed,
unindexed,
fielded data and
full-text search
options (including
Unicode support
for hundreds
of international
languages)
[TestMethod]
public void ContractController_Save_Valid_Test()
{
// set up
Contact contact = TestUtil.CreateValidContact();
var contactManager = new Mock<IContactManager>();
var mockedHttpContext =
MoqMvcMockHelpers.FakeHttpContext();
ContactsController controller = new
ContactsController(contactManager.Object);
N file parsers /
converters for
hit-highlighted
display of all
popular file
types
N Spider supports
static and
dynamic web
data; highlights
hits while
displaying links,
formatting and
images intact
controller.ControllerContext = new
ControllerContext(mockedHttpContext,
new RouteData(), controller);
contactManager.Expect(c =>
c.SaveContact(contact));
h Spider
Desktop wit
h Spider
Network wit
CD/DVDs
Publish for
pider
Web with S
Win & .NET
Engine for
Linux
Engine for
// execute
var result = controller.Save(contact) as RedirectToRouteResult
// verify
Assert.AreEqual("Index", result.Values["action"],
New
64-bit
1-800-IT-FINDS www.dtsearch.com
0109vsm_C#Corner_21-23.v8
12/15/08
C# CORNER
9:09 AM
Page 21
TA R G E T M U LT I P L E F R A M E W O R K S
Target Multiple
.NET Frameworks
Many developers have
the misconception that
targeting older versions of
the Framework means you
cant use any of the new C#
language features. Its time
to dispel that myth.
BY BILL WAGNER
argeting multiple .NET platforms is a subject that confuses many developers.For example,
many developers mistakenly believe that if you target older versions of the platform,
you must forego all the new language features. Yes, you must accept some limitations,
but you dont have to give up all the new language features you like. Targeting multiple
versions of the Framework is a great way to ensure that you and your peer developers
can use Visual Studio 2008 even when one of your target environments must support an older version of
the Framework. More than that, it doesnt stop you from using the features in the C# 3.0 language. On
the downside, there are some nuances that can crop up when using the newer language features if youre
targeting an older version of the Framework. Ill walk you through some of these nuances, explaining
what capabilities are in bounds, which require care, and which ones you cant use when you have to target
an older version of the Framework.
Multitargeting is a project-level feature. To select your target version of the Framework, right click
on the project node and select properties. You can pick any of the 2.0, 3.0, or 3.5 versions of the Framework. In this article, Im concentrating on the differences between various language features and how
you can make use of the newer language features even though youre targeting an older version of the
Framework. Obviously, if youre targeting the 2.0 Framework, none of the 3.0 librariesWindows
Presentation Foundation (WPF),Windows Communication Foundation (WCF), or Windows Workflow
Foundation (WF)are available to use. In general, other libraries that rely on .NET 2.0 and 3.0 share
the same limitations. (Space considerations prevent me from exhaustively discussing the differences
between the 2.0 and 3.0 Frameworks.)
TECHNOLOGY TOOLBOX
VB.NET
C#
SQL Server
ASP.NET
XML
21
0109vsm_C#Corner_21-23.v8
12/15/08
9:09 AM
Page 22
C # C O R N E R TA R G E T M U LT I P L E F R A M E W O R K S
public IEnumerable<TResult>
Select<TResult>(Func<TResult> selector)
{
foreach (var peep in storage)
yield return selector(peep);
}
// elsewhere:
public delegate TResult Func<TResult>(Person id);
Thats really no big deal, but it might lead you to try more. Object and
Collection initializers work even when you target the 2.0 Framework:
List<int> sample = new List<int>
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
22
What you want to remember from this discussion is that the query
expressions are nothing more than shorthand for method calls.
Where those method calls are present, the query syntax will work
fine when targeting the .NET 2.0 Framework. However, to write
code like this in a general way is to create far more work for yourself
than would normally be justified.
Changes in Behavior
Your development box must have .NET 3.5 if youre running
Visual Studio 2008, as well as the C# 3.0 compiler. This combination can lull you into a false sense of security. Your testing on your
development machine will not uncover any incompatibilities
between the 2.0 and 3.5 Frameworks. The Visual Studio IDE will
help you with almost all of those issues, because the IDE will tell
0109vsm_C#Corner_21-23.v8
12/15/08
9:09 AM
Page 23
C # C O R N E R TA R G E T M U LT I P L E F R A M E W O R K S
www.atalasoft.com
23
0109vsm_AskKat.24-27.v6
Ask
12/15/08
9:06 AM
Page 24
Kathleen
WINDOWS WORKFLOW
CHANGES DIRECTION
BY KATHLEEN DOLLARD
24
0109vsm_AskKat.24-27.v6
12/15/08
9:06 AM
Page 25
A S K K AT H L E E N W I N D O W S W O R K F LO W 4 . 0
Q
A
VHDUFKDEOH3')OHV
Annotations: ,QWHUDFWLYH 8, IRU GRFXPHQW
PDUNXS UHGDFWLRQ DQG LPDJH PHDVXUHPHQW
LQFOXGLQJVXSSRUWIRU',&20DQQRWDWLRQV
Grayscale Imaging: 'LVSOD\ DQG SURFHVV
VLJQHGXQVLJQHGELWELWGDWD
Medical Web Viewer Framework: 3OXJLQ
HQDEOHG IUDPHZRUN WR TXLFNO\ EXLOG KLJKTXDOLW\
'RFXPHQW
0DUNXS
)RUPV5HFRJQLWLRQ
%DUFRGH
0HGLFDO
0XOWLPHGLD
www.leadtools.com/msdn
800 637-1840
25
0109vsm_AskKat.24-27.v6
12/15/08
9:07 AM
Page 26
A S K K AT H L E E N W I N D O W S W O R K F LO W 4 . 0
Q
A
End Try
26
0109vsm_AskKat.24-27.v6
12/15/08
9:07 AM
Page 27
A S K K AT H L E E N W I N D O W S W O R K F LO W 4 . 0
but weve made many mistakes related to not copying the updated files
properly. Is there a way to automate this?
Visual Studio supports pre- and post-build events, but I
think its easier to modify the project file. The project file
is an MSBuild script, capable of managing complicated
builds. It also makes it easy to handle
straightforward scenarios, such as copying
your files.
You can edit project files (.csproj and
.vbproj) in Notepad or another editor, but
editing them within Visual Studio supplies
XML syntax checking and IntelliSense. To
open your project file in Visual Studio, right
click on the project, and select Unload Project. Once it is unloaded, right click on it
again, and select Edit <project file name>.
The only downside of opening projects this
way is that Visual Studio loses its marker to
the startup project if you unload that project.
Scroll to the bottom to find the location
for one of several well-known targets:
GO ONLINE
Use this Locator+ code at VisualStudioMagazine.com to go directly to these
related resources.
READ MORE
VS0901AK Read this article online.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
27
0109vsm_QandA_28-30.v4
12/15/08
9:35 AM
Page 28
INTERVIEW
Connect to
the Cloud
In this special interview, Microsoft Corporate Vice
President Robert Wahbe discusses the Azure Services
Platform and Software plus Services applications with
1105 Medias Jeffrey Schwartz and Michael Desmond.
BY JEFFREY SCHWARTZ AND MICHAEL DESMOND
28
AWindows Azure is a natural evolution of our platform. We think its going to have a long-term radical
impact with customers, partners, and developers, but its
a natural evolution. It takes what we have todayfrom
the phone to the desktop to the serverand brings that
to the cloud. Its built foundationally on top of Windows
Server 2008 and .NET Framework. We have millions of
developers on top of Visual Studio and on top of .NET
Framework, and they can take the vast majority of their
skill set and build apps the way they have been today.
They can deploy those on the premises.
0109vsm_QandA_28-30.v4
12/15/08
9:35 AM
Page 29
CO N N E C T TO T H E C LO U D
You can take Visual Studio and .NET Framework and build an
ASP.NET app, and then you can decide to deploy that locally, or
you can decide to deploy that to Windows Azure.
Q. So youre saying developers can write to the Windows cloud, otherwise known as Azure apps, and theyll run on Windows Server onpremises? That logic can be redeployed to Azure?
AThe key thingand Ray [Ozzie, Microsofts chief software architect] did mention this [during his PDC keynote]right now, many
applications arent built with the scale-out in mind from the beginning. The notion of stateless front-ends being able to scale out, both
across the data center and across data centers requires that you make
sure you have the right architectural model. Microsoft will be trying
hard to make sure we have the patterns and practices available to
developers to get those models [so that they] can be brought onto the
premises. As you write your applications in a scale-out model from
the premises, they can be brought into Windows Azure.
The example we showed was a situation where you can take
Visual Studio and .NET Framework and build an ASP.NET app,
and then you can decide to deploy that locally, or you can decide to
deploy that to Windows Azure. The only thing you have to do when
you go to Windows Azure is to specify some additional metadata.
You have to specify how many instances youre going to run on, and
what kind of SLA youre looking forthat kind of metadata. Then
Windows Azure can take that and implement that correctly.
Q How do they specify that metadata?
ARight nowto the coreits in an .XML file. Thats a great
example of an executable model, and Windows Azure understands
that model to its toes. So its a model, and it delivers that. You can
write those models in Oslo using the DSL written in M, targeting Windows Azure in those models.
Q So theres a natural fit here for apps developed in Oslo?
AYes, because Oslo is about helping you write apps more productively. You can write any kind of application, including cloud apps.
You can also write server applications and client applications. But
were definitely working hard on the models for the cloud as well.
Q What challenges might be awaiting dev shops? What sort of skills do
they need to either discover or refine as they move to a services-aware,
cloud-aware application?
A A lot of your existing skill set and a lot of your practices
whether it be the development methodology you use around ALM
or using TFS [Team Foundation Server]will just carry forward.
At the end of the day, youre just writing code, and youre deploying
that code. Windows Azure provides a new deployment target at a
fundamental level, so theres a lot thats similar.
A couple of things are new. There are a lot of new services that
developers are going to need to learn in order to see if they make
sense for their solutions. One example: If you were going to hook
up two businesses together with some sort of business-to-business
messaging application, we have a lot of technology that makes that
easyWindows Communication Foundation, these kinds of
things. But now you need to ask yourself: Does it make sense for
me to use the Azure platform and the service bus, which is a part of
.NET services? And youre going have to learn what the pros and
cons are if youre adding it to your solutions.
Every developer has a unique set of needs, and they need to
choose differently between how much theyre doing in the cloud
and how much theyre doing on the premises. So depending on
regulatory, compliance, or whatever assets they have and their scale
requirements, it might be an opportunity to learn something new.
Q Are we looking at plug-ins to Visual Studio or new development
interfaces to service-enable some of these things? Are we bringing
more development resources to the table?
A Youre going to see some very natural extensions to whats in
Visual Studio today. For example, youll see new project types. I
wouldnt call that a new tool; rather, Id call it a fairly natural extension to the existing tools. Youll see new properties in the property
descriptions of solutions. So you can say things like: How much
scale-out do I want? Do I want this to run in multiple data centers?
If you look at the portals for Windows Azure and the Azure Services Platform,there are new kinds of tools that are great for IT pros to
look at utilization,at what the load is on their applications, and so on.
Q What can we expect in terms of Oslo uptake and some of the stuff
that developers are going to have to grasp as they start developing into
the Azure space?
A We want to get bits into the hands of developers as early as we possibly can.We dont take the attitude that were going to wait until were
basically close to shipping, and then spring it on people. We want to
get a CTP [community technology preview] out early and engage in
that conversation.Now we can get this thing out broadly,get the feedback, and I think for me, thats the most powerful way to develop a
platform. If youre going to build a platform in a vacuum, its very
hard to get it right. You need to have developers pounding on it,
telling you what youre doing right and what youre doing wrong.
29
0109vsm_QandA_28-30.v4
12/15/08
9:35 AM
Page 30
CO N N E C T TO T H E C LO U D
Q Given the uncertain time frame of Azure, are some of your rivals like
Amazon and Google gaining a lot of early share? How will you deal
with the competitive landscape?
A The place to start with Amazon is [that] theyre a partner. So
theyve licensed Windows, theyve licensed SQL, and we have
shared partners. What Amazon is doing, like traditional hosters, is
theyre taking a lot of the complexity out for our mutual customers
around hardware. The heavy lifting that a developer has to do to
take that and then build a scale-out service in the cloud and across
data centersthats left to the developer.
We have base compute and base storage, which is the foundation
of everything were doing with Windows Azure, but then we have
these higher-level services like the database in the cloud. We have
these user services for photos, contacts, and blogs, and these kinds
of things with the live services. We have Internet-scale buildingblock services with .NET services, and well be rolling out CRM
Services and SharePoint Services. We have these higher-level things
so that now developers can stand on the backs of thousands of
engineering years as theyre building the solution. They dont have
to build an Internet-scale pub-sub system. They dont have to have
a new way to do social networking and contacts. They dont have to
have reporting services that they have to build up themselves.
Google is a very limited offering. Its a single programming language. Its a particular part of the Web application. You cant do the
back-end processing. You dont have a full database back there. You
dont have a lot of the things you might need to build an end-to-end
application. You cant even take too long to respond to the Web
request or theyll shut you down. Its a hobby.
Q Obviously you have the Microsoft-hosted monoliths in play here.
Will an enterprise be able to host its own cloud? Will there be thirdparty partners doing that as well?
A I want to be very clear on this. We built Azure on top of Windows
Server and on top of .NET Framework. As we learn, were going to
take that innovation and bring it back to Windows Server. And then
as we innovate in Windows Server, well bring that back to Azure.
And we absolutely support the choice, depending on whether its
your data center, your cloud, your personal enterprise cloud, or the
Microsoft Azure cloud. But the way youll get your cloud is that
youll buy Windows Server, youll buy SQL Server, youll buy the
existing premises platform, and well continue to move that innovation unilaterally.
Q But in terms of the actual physical hosting of machines, if Im an
enterprise and I want to provide these cloud-based Azure services to
my users or business partners, I can have my own private cloud?
A With Windows Server, not with Azure. The Azure Services
Platform,SQL Services,Live Servicesthose are hosted exclusively in
the Microsoft data center. You get at them on Microsofts
platform and other platforms,because theyre all exposed on Internet
standards.
30
GO ONLINE
Use this Locator+ code at VisualStudioMagazine.com to go directly to these
related resources.
READ MORE
VS0901RW Read this article online.
0109vsm_AdIndex_31
12/15/08
2:27 PM
Page 31
Advertising Sales
Ad Index
Atalasoft, Inc.
www.atalasoft.com
pg. 23
ComponentOne
www.componentone.com
East
Andrew Mintz
National Sales Manager
Phone: 508-532-1433
amintz@1105media.com
West
Chris Kourtoglou
Regional Sales Manager
Phone: 650-579-0121
ckourtoglou@1105media.com
Jenny Hernandez-Asandas
Phone: 818-734-1520 ext 101
Fax: 818-734-1528
jhernandez@1105media.com
Production Coordinator
Catharine Wood
Phone: 818-734-1520 ext 233
vsmadproduction@1105media.com
cwood@1105media.com
ID Statement
Visual Studio Magazine (ISSN 1537-002X) is published
monthly by 1105 Media, Inc., 9121 Oakdale Avenue, Ste. 101,
Chatsworth, CA 91311. Periodicals postage paid at
Chatsworth, CA 91311-9998, and at additional mailing
offices. Complimentary subscriptions are sent to qualifying
subscribers. Annual subscription rates for non-qualified subscribers are: U.S. $34.97, Canada $52.97 (U.S. funds);
International $78.97 (U.S. funds). Subscription inquiries,
back issue requests, and address changes: Mail to: Visual
Studio Magazine, P.O. Box 1164, Skokie, IL 60076-8164,
email VSM@1105service.com or call toll free (888) 7688759, fax number 847-763-9564. International calls 847763-9135. POSTMASTER: Send address changes to Visual
Studio Magazine, P.O. Box 1164, Skokie, IL 60076-8164.
Canada Publications Mail Agreement No: 40612608. Return
Undeliverable Canadian Addresses to Circulation Dept. or
Bleuchip International, P.O. Box 25542, London, ON N6C 6B2.
Copyright Statement
Copyright 2009 by 1105 Media, Inc. All rights reserved.
Printed in the U.S.A. Reproductions in whole or part prohibited except by written permission. Mail requests to
"Permissions Editor," c/o Visual Studio Magazine, 2600 El
Camino Real, Ste 300, San Mateo, CA 94403.
Legal Disclaimer
The information in this magazine has not undergone any
formal testing by 1105 Media, Inc. and is distributed without any warranty expressed or implied. Implementation or
use of any information contained herein is the reader's sole
responsibility. While the information has been reviewed for
dtSearch
www.dtsearch.com
pg. 20
Intel Corporation
www.intel.com
pg. C4
pg. 25
Microsoft Corporation
www.microsoft.com
Corporate Address
pg. 12, 13
pg. 27
pg. C2, 1
pg. C3
VSLive! Events
Vslive.com/sf2009
pg. 5
pg. 3
Edit Ad Index
Compuware
9
www.compuware.com
Corporate Headquarters:
1105 Media
9121 Oakdale Ave. Ste 101, Chatsworth, CA 91311
www.1105media.com
Developer Express
www.devexpress.com
Media Kits
JetBrains
8
www.jetbrains.com
pg. 16, 17
Typemock
8
www.typmock.com
Reprints
Reprints: For single article reprints (in minimum quantities of
250-500), e-prints, plaques and posters contact:
PARS International
Phone: 212-221-9595
E-mail: 1105reprints@parsintl.com
www.magreprints.com/QuickQuote.asp
List Rental
This publications subscriber list, as well as other lists from
1105 Media, Inc., is available for rental. For more information, please contact our list manager, Merit Direct. Phone:
914-368-1000; E-mail: 1105media@meritdirect.com;
Web: www.meritdirect.com.
Go to
VisualStudioMagazine.com
to access the stories in this
issue, plus read exclusive
online-only content.
31
0109vsm_GuestOp.32.v4
12/15/08
9:32 AM
The Pragmatic
Page 32
Developer
IS AGILE
ROCK OR DISCO?
BY BILLY HOLLIS
32
0208vsm_VSMPureAd.final
1/18/08
11:46 AM
Page 32
PURE
E N T E R P R I S E
S O L U T I O N S
F O R
.N E T
D E V E L O P M E N T
M A G A Z I N E . C O M
OPTIMIZED FOR
PRINT ONLINE EVENTS
Project1
12/15/08
11:45 AM
Page 1
,QWHO&RUSRUDWLRQ$OOULJKWVUHVHUYHG,QWHODQGWKH,QWHOORJRDUHWUDGHPDUNVRI,QWHO&RUSRUDWLRQLQWKH86DQGRWKHUFRXQWULHV 2WKHUQDPHVDQGEUDQGVPD\EHFODLPHGDVWKHSURSHUW\RIRWKHUV