Welcome to MSDN Blogs Sign in | Join | Help

Happy Thanksgiving to our readers in the U.S.!

Here’s something lighthearted for the holiday: A 1980s Home Computer Family Celebration. “Gather the kids round your Apple II and enjoy these nostalgic, vaguely unsettling vintage ads.”

Have a great holiday, everybody! (We’ll be back to the relative humdrum of books and technology on Monday.)

Posted by devonm | 0 Comments

William Stanek: Intermission: Out of the gate, now what?

William here. Happy Thanksgiving (a bit early I know ;-) As I promised my kids I’d do nothing useful this week, I’m going to keep this discussion in the realm of non-work. With that in mind, this post contains nothing useful. Nothing, absolutely nothing, I promise you.

So if you’re averse to the non-useful, stop reading now. Don’t continue. Stop.

Really, I mean it. If you are heading out early so you can meet up with family and friends for the holiday, don’t read another word. Not another word. Not one. Don’t continue. Don’t. Abort I tell you. Abort.

Still with me? Okay, I know a few of you are. Sort of like the BIG red “Don’t Push Me” button. The kid in you wants to push it; the adult in you tries to convince you otherwise.

Speaking of the kid in you, have you delved into the world of e-readers and e-books lately? I’ve been immersed in it lately and let me tell you, I feel like a kid in a candy store. Below I’ve included pictures of my favorite e-readers. From left to right, they are: the Sony PRS-505, the Barnes & Noble Nook, the Amazon Kindle 2, and the Sony PRS-900.

clip_image001clip_image002clip_image003clip_image004

Why these e-readers? Well, the PRS-505 is the first e-reader I really loved. Before the PRS-505, I really did NOT enjoy reading on e-reader devices. I also like the PRS-505 because it has two expansion card slots: one expansion slot for Sony Memory Stick Duo or Pro Duo cards up to 16 GB and one expansion slot for SD, SDHC, or miniSD cards up to 16 GB. Having two expansion slots, and a full 32 GB of space, has meant that I could carry around a fairly comprehensive library with me wherever I went and that has helped me balance the need for “guilty pleasure” reads with more literary reads like Shakespeare’s plays, including Othello, Hamlet, and A Midsummer Night’s Dream. My own books (in fiction) also were first released in formats optimized for the 8 grayscale levels of the Sony PRS-505.

In the rapidly changing marketplace for e-readers, the Nook, Kindle 2 and PRS-900 are the latest entrants. All three provide wireless shopping for books and downloads over 3G networks, at no additional cost.

The Nook combines a 6” e-ink VizPlex display with a 1 1/2" x 3 1/2” color LCD touchscreen. The device has 2 GB internal and also supports a microSD card up to 16 GB. For listening to spoken word audio, the device includes a mono speaker. For listening to music and other audio, the device includes a stereo headphone jack.

The Kindle 2 combines a 6” e-ink VizPlex display with a built-in keyboard. Although the device has no expansion slots, it does have 2GB of internal storage and a browser you can use for accessing the web. For listening to music and other audio, the device includes a stereo headphone jack and built-in stereo speakers.

The PRS-900 has a 7” e-ink VizPlex display with touch screen. The device has 2 GB internal storage and dual expansion slots: one for Sony Memory Stick Duo or Pro Duo cards up to 32 GB and one expansion slot for SD, SDHC, or miniSD cards up to 32 GB.

Let’s hope Santa puts one of these in your stocking! If he does, I hope you’ll share your reading experience with me and let me know what you are reading.

Thank you for hanging in there and reading! Happy Thanksgiving!

williamstanek at aol dot com

http://www.twitter.com/WilliamStanek

Posted by devonm | 1 Comments

William Stanek: Intermission: A coming out party

William here. In the spirit of the holidays, I promised my kids I’d do nothing useful this week. To keep this post in the realm of non-work I decided to have an early coming out party. No, not in the tradition of Adam L or Justin T. More in the tradition of the release of something new and fun, and the thing I’d like to celebrate early is the e-era where all things “e” live and give us new options to old-school norms.

I’m talking about the cloud, that ethereal space where products and services live but can’t be touched. I’m talking about the age of e where e-ink, e-readers, and e-books are the norm and not the exception. I’m talking about virtual libraries and other virtualized things that don’t have physical counterparts.

This world of “e” is here and we are at its cusp. So I’d like to ask you, dear reader, what you think about this world of “e”? How are you using “e” technologies? Or what are you planning to do in the “e” space? For example, what are your plans for using Software as a Service, Platform as a Service, or Infrastructure as a Service? Do you have or plan to have a private cloud? Will you use the public cloud or implement a hybrid environment?

In short, tell me what this world of “e” mean to you (or what it will mean to you in the future)?

Your comments posted here and emails are welcome (and hoped for to keep me from doing real work)!

williamstanek at aol dot com

http://www.twitter.com/WilliamStanek

Posted by devonm | 4 Comments

New book: Introducing Windows 7 for Developers

9780735626829fHere’s a post about the newly published Introducing Windows 7 for Developers, by Yochay Kiriaty, Laurence Moroney, Sasha Goldshtein and Alon Fliess. (The book’s ISBN is 9780735626829, and it contains 416 pages.)

You can read the Foreword by Mark Russinovich here.

Today we’d like to share some other excerpts from the book. First, here is the book’s full Table of Contents:

 

Table of Contents
Foreword..........................................xiii
Acknowledgments ............................xv
Introduction.......................................xvii

1 Welcome to Windows 7..................1
What Has Changed Since Windows Vista? ........................................................1
Seven Ways to Shine on Windows 7................................................................3
Taskbar...................................................................................................4
Libraries .................................................................................................6
Touch, Multitouch, and Gestures...................................................................8
Sensor and Location ..................................................................................9
Ribbon ...............................................................................................................10
Enhanced Graphics Platform............................................................................ 13
Improved Fundamentals ................................................................................... 15
Summary........................................................................................................ 18

2 Integrate with the Windows 7 Taskbar: Basic Features ................ 19
Design Goals of the Windows 7 Taskbar................................................................. 21
A Feature Tour of the Windows 7 Taskbar ............................................................. 21
Jump Lists .............................................................................................................. 22
Taskbar Overlay Icons and Progress Bars ..................................................... 25
Thumbnail Toolbars............................................................................................ 26
Live Window Thumbnails.................................................................................. 27
Backward Compatibility .................................................................................... 29
Integrating with the Windows 7 Taskbar................................................................ 30
Application ID....................................................................................................... 30
Taskbar Progress Bars and Overlay Icons ..................................................... 35
Summary...................................................................................................... 40

3 Integrate with the Windows 7 Taskbar: Advanced Features..............43
Jump Lists ................................................................................................... 43
Anatomy of a Jump List..................................................................................... 44
Recent and Frequent Destinations ................................................................. 45
Custom Destinations........................................................................................... 49
User Tasks .............................................................................................................. 53
Thumbnail Toolbars................................................................................................ 56
Customizing Thumbnails................................................................................... 59
Thumbnail Clipping ............................................................................................ 61
Custom Thumbnails ............................................................................................ 62
Custom Live Previews.................................................................................................... 65
Window Switchers.......................................................................................................... 66
Summary.................................................................................................................. 71

4 Organize My Data: Libraries in Windows 7.......................................73
Windows Explorer ............................................................................................ 73
Changes Made to Windows Explorer in Windows 7................................. 75
Welcome to Libraries ........................................................................................ 77
Libraries under the Hood ................................................................................. 79
Working with Libraries....................................................................................... 84
Summary............................................................................................100

5 Touch Me Now: An Introduction to Multitouch Programming.............. 101
Multitouch in Windows 7 ...................................................................101
Windows 7 Multitouch Programming Models..................................................104
The Good Model: Supporting Legacy Applications ................................104
The Better Model: Enhancing the Touch Experience..............................105
The Best Model: Experience Optimized for Multitouch ........................106
How Multitouch Works in Windows 7...................................................................106
Architecture Overview: Messages Data Flow ............................................107
Supporting Legacy Applications ...................................................................108
Working with Gestures ...............................................................................110
Handling the WM_GESTURE Message.........................................................111
Use the Pan Gesture to Move an Object ....................................................113
Use the Zoom Gesture to Scale an Object .................................................115
Use the Rotate Gesture to Turn an Object.................................................117
Use a Two-Finger Tap to Mimic a Mouse Click ........................................119
Use the Press-and-Tap Gesture to Mimic a Mouse Right-Click ..........121
Configuring Windows 7 Gestures.................................................................121
Summary.............................................................................................124

6 Touch Me Now: Advanced Multitouch Programming................127
Working with Raw Touch Messages..........................................................127
Setting Up Windows for Touch.....................................................................128
Unpacking WM_TOUCH Messages ..............................................................129
Using the Manipulation and Inertia Engines .......................................................135
Multitouch Architecture: The Complete Picture, Part 1 ........................136
Using Manipulation ..........................................................................................138
Using Inertia........................................................................................................144
Multitouch Architecture: The Complete Picture, Part 2 ........................145
Summary...............................................................................................151

7 Building Multitouch Applications in Managed Code..................153
Building Your First Touch-Sensitive Application ................................................153
Using Windows 7 Touch to Move an Object .......................................................155
Using Windows 7 Touch to Scale an Object ........................................................158
Using Windows 7 Touch to Rotate an Object......................................................160
Using Inertia with Gestures ...........................................................................161
Extending for Multiple Objects................................................................................164
Building a Gesture-Enabled Picture Control ........................................................165
Using the Gesture-Enabled Picture Control.........................................................168
Classes to Support Touch and Gestures ...................................................170
UIElement Additions.........................................................................................171
Summary....................................................................................................172

8 Using Windows 7 Touch with Silverlight ........................................173
Introducing Silverlight........................................................................173
Creating Your First Silverlight Application ...........................................................176
Building Out-of-Browser Applications in Silverlight ..............................179
Using the Silverlight InkPresenter Control ...........................................................183
An Example of Ink Annotation in Silverlight.............................................184
Silverlight Ink Classes for JavaScript Programmers.................................185
Programming for Ink in Silverlight ..............................................................189
Using the Touch APIs in Silverlight.........................................................195
Expanding the Application for Multitouch................................................196
Summary...................................................................................................200

9 Introduction to the Sensor and Location Platform ..................... 201
Why Sensors?.........................................................................................................201
A Word on Security...........................................................................................203
Architecture of the Sensor and Location Platform.............................................204
What Is a Sensor?..........................................................................................205
Working with Sensors .................................................................................................207
Integrating Sensors into Your Application ................................................207
Discovering Sensors ..........................................................................................207
Requesting Sensor Permissions.....................................................................213
Interacting with Sensors ..................................................................................218
Reading Sensor Data Using Managed Code..............................................227
Ambient Light Sensor Application ...............................................................230
Summary...........................................................................................232

10 Tell Me Where I Am: Location-Aware Applications .................... 233
Why Location Awareness Is So Important ............................................................233
Location Platform Architecture................................................................................234
Location Devices Are Regular Windows 7 Sensors..................................237
Location Information Is Sensitive Information .........................................238
Working with the Location API................................................................................239
Understanding How the Location API Works ...........................................239
Requesting Location Permissions .................................................................242
Interacting with the Location Interface ......................................................244
Putting It All Together.....................................................................................254
Writing a Location-Aware Application Using .NET ............................................255
Reading Location Reports and Handling Location Events ....................257
Using the Enhanced Default Location Provider Tool for Testing........259
Summary 260

11 Develop with the Windows Ribbon, Part 1 ................................... 263
History .................................................................................................................263
Using the Ribbon............................................................................................267
Programming with the Windows Ribbon Framework ......................................273
Ribbon Markup ..................................................................................................275
Summary............................................................................................................307

12 Develop with the Windows Ribbon, Part 2 ....................................309
Programming the Ribbon..........................................................................................309
The Minimal Ribbon Revisited.......................................................................310
Initialization Phase ............................................................................................316
Handling Ribbon Callbacks.............................................................................318
The Property System ........................................................................................320
Setting Properties Directly or Indirectly.....................................................322
Controlling Controls .........................................................................................325
Setting Application Mode, and Showing Contextual Tabs and Pop-Ups ..........347
Summary.....................................................................................................353

13 Rediscover the Fundamentals: It’s All About Performance .......355
Instrumentation and Diagnostics ............................................................................356
Performance Counters .....................................................................................356
Windows Management Instrumentation...................................................362
Event Tracing for Windows ............................................................................365
Windows Performance Toolkit ......................................................................365
Troubleshooting Platform ..............................................................................369
Performance and Efficiency.......................................................................................371
Background Services and Trigger Start Services ......................................372
Power Management .........................................................................................378
Summary.........................................................................................................382

Index.................................................................................................383

And here’s a stretch of text from Chapter 7:

Chapter 7
Building Multitouch Applications in Managed Code

In Chapters 5 and 6, you looked at touch-based applications—in particular, the new multitouch
capabilities that are available in the Windows 7 operating system—and how to program
applications to take advantage of Windows 7 multitouch features.

Perhaps you’re not really that into writing in C++, or perhaps you already have applications
that are written in managed code and would like to be able to use them with multitouch. This
chapter will look at how you can build applications with multitouch in mind using the Microsoft
.NET Framework and, in particular, the Windows Presentation Foundation (WPF)
version 4.

Instead of making a dry run through the features, you’re going to get hands-on experience
right away and learn by doing. So fire up Microsoft Visual Studio 2010 and let’s get going.

Building Your First Touch-Sensitive Application

Visual Studio 2010 supports the ability to create WPF Windows applications. You can do this
from the File menu. Select New Project, and the New Project Types dialog box opens. Make
sure that you’ve selected .NET Framework 4.0 as the target framework (on the top right side),
and select WPF Application from the available templates.

image

Visual Studio creates a basic WPF client application for you containing a couple of XAML files:
App.xaml, which contains the application definition, and MainWindow.xaml, which defines the
application UI. You’ll edit MainWindow.xaml in this section.

Let’s take a look at the basic XAML that is created for you in Window1.xaml:

<Window x:Class="Chapter7_Sample1.MainWindow"
xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="300" Width="300">
<Grid>
</Grid>
</Window>

This example defines the window and the code that supports it. In this case, you can see that
the class that implements this code is Chapter7Sample1.Window1. This code resides in the
code-behind file called MainWindow.xaml.cs. We’ll look at that in a moment.

The attributes on the Window element define the namespaces for the XAML code so that the
XAML can be validated by the Visual Studio compiler. Finally, some basic properties such as
Title, Height, and Width are set.

XAML in WPF supports a number of controls that allow you to command how the user interface
is laid out. The Grid control is one of these; it allows you to define how your controls are
laid out within defined cells. These controls can be placed anywhere within any of the cells. If
the Grid control is used, as it is here, without cells (that is, defined using rows and columns),
you should consider it a single-cell grid where only one control will be displayed.

Let’s add a control to this grid. We’ll add a rectangle in it, like this:

<Rectangle Width="100" Height="100" Fill="Red"></Rectangle>

This defines a 100 by 100 rectangle (also known as a square), which will appear centered
within the single default cell of the grid. You can see the result in the following screen shot:

image

If you’re thinking that this isn’t very interesting, you’re right. So let’s make it a little more interesting
by making it touch sensitive. You can manipulate an object using touch in Windows
7 in a number of ways, but we’ll start with the simplest—moving it around the screen.

Using Windows 7 Touch to Move an Object

In the previous section, you built a (very) simple Windows 7 WPF application that rendered a
red rectangle on the screen. Now you’re going to add the first step of basic touch input by
adding the code that allows you to move the rectangle around the screen using touch.

First you need to inform Windows that you want to be able to manipulate the rectangle using
the touch system. You do this in XAML with the IsManipulationEnabled attribute. This is a
Boolean value, and should be set to ‘true’ if you want to manipulate an object
using multi touch.

<Rectangle Width="100" Height="100" Fill="Red" IsManipulationEnabled="True" ></Rectangle>

You’re going to make one more change to the rectangle, and that is to add a named Render-
Transform
object that is defined by a MatrixTransform that does nothing. You’ll see shortly
that this transform can be manipulated to provide the drawing functionality that changes the
shape or location of the rectangle upon user input. The MatrixTransform object is defined as
an application resource, so if you look at your App.xaml file, you’ll see a section for resources
(called Application.Resources), where you can add the MatrixTransform object.

Here’s the code:

<Application.Resources>
<MatrixTransform x:Key="InitialMatrixTransform">
<MatrixTransform.Matrix>
<Matrix OffsetX="0" OffsetY="0"/>
</MatrixTransform.Matrix>
</MatrixTransform>
</Application.Resources>

As you can see, this matrix transform doesn’t do anything. If you apply it to the rectangle,
nothing happens. However, later in the code example, you’ll manipulate the transform, and it,
in turn, will manipulate the rectangle.

Here’s how the rectangle XAML should look with the transform applied:

<Rectangle Width="100" Height="100" Fill="Red" ManipulationMode="All"
RenderTransform="{StaticResource InitialMatrixTransform}"></Rectangle>

Now that the rectangle is configured to allow manipulation, the next step is to set up what
the window needs to capture manipulation events from the operating system. These are captured
using the ManipulationDelta event. Add this, and specify a handler to the Window tag
at the root of the XAML for Window1.xaml.

It should look something like this:

<Window x:Class="Chapter7_Sample1.Window1"
xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300" ManipulationDelta="Window_ManipulationDelta">

When you created the ManipulationDelta event handler on the Window just shown, Visual
Studio should have created a stub function for you. If it didn’t (for example, if you cut and
pasted the attribute declaration instead of typing it), you can see it here:

private void Window_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
{
}

If you’re familiar with .NET programming, this code will look familiar. It’s a typical event handler
that takes a general object called sender, which refers to the object that the event was
raised on, and an object containing the event arguments (that is, the metadata associated
with the event).

In this case, you get a ManipulationDeltaEventArgs object. This object exposes a function
called GetDeltaManipulation, which returns a Manipulation object that contains exactly the
metadata that you need to understand what the user has done to the object.

Here’s how you can get a handle on the manipulation that has just been performed:

ManipulationDelta m = e.DeltaManipulation;

Next, you want to get a reference to your rectangle, and to the Matrix that defines its Render-
Transform
. Here’s the code:

Rectangle r = e.OriginalSource as Rectangle;
Matrix matrix = ((MatrixTransform)r.RenderTransform).Matrix;

The Manipulation object exposes a Translation property that returns a Vector object, which
has member properties for the translation on X and Y that results from the user’s action of
moving the object. To move the object, you should call the Translate method on the matrix.
(Remember from the code shown earlier, that the matrix here is the RenderTransform from
the rectangle.) Here’s the relevant code:

matrix.Translate(m.Translation.X, m.Translation.Y);

And now all you need to do is set the RenderTransform for the rectangle to be the new matrix
(that is, the one that has been manipulated by the Translation function):

r.RenderTransform = new MatrixTransform(matrix);

And that’s it. Now, all you have to do is implement this event handler and you can move the
rectangle based on user input from the touch screen! Here’s the full event handler:

private void Window_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
{
Manipulation m = e.GetDeltaManipulation(this);
Rectangle r = e.OriginalSource as Rectangle;
Matrix matrix = ((MatrixTransform)r.RenderTransform).Matrix;
matrix.Translate(m.Translation.X, m.Translation.Y);
r.RenderTransform = new MatrixTransform(matrix);
}

Now if you run your application, you can move the rectangle around the window by touching
the screen with your finger! Here’s an illustration of how it works:

image

In the next section, you add to this to see how the multitouch system accepts scaling information
that allows you to change the size of the object.

>   >   >

Microsoft is interested in hearing your feedback so that we can continually improve our books and learning
resources for you. To participate in a brief online (and anonymous) survey, please visit

www.microsoft.com/learning/booksurvey/

Enjoy the book!

Ed Wilson: Beware of the infamous FFTC

With the approach of the holiday season I feel that I must warn you about the infamous FFTC (Friends and family toting cameras). The FFTC seem to appear at all family gatherings like moths drawn to a flame, and their work can be as destructive to one's sense of well being and reputation.

What am I talking about? Pictures, of course—but not just any picture. Consider the following examples.

  1. Pictures taken in low light without the flash. Many cameras now have various scenes or modes that allow for low light pictures. When the exposure becomes too long, and the camera is not completely held rock steady, the image “smears.” These smears then distort facial features making ones nose appear as long as a broom stick, or transforming your hair into something that would make Marge Simpson green with envy.
  2. Pictures taken at the “worst possible moment.” It goes without saying that people often eat at family gatherings. Part of eating, is taking bites out of and chewing food. But when one is in the process of ruminating, their facial features are often distorted into some hideous caricature of ones former self. Political photographers use this technique to their advantage to destroy ones opponent—clearly no one wants to vote for such a sinister individual. But WHY do we do it to our friends and loved ones?
  3. Pictures taken from the “worst possible angle.” General MacArthur required all photographers to take pictures from a low angle. Why? Because it made him seem taller and more commanding. Like the person viewing the picture is “looking up to him.” I am not saying we want all of the FFTC to shoot from a lower angle, but certainly pictures taken from a side view angle that would make twiggy seem fat should be avoided. Indeed one should always be respectful with the camera angle. If you have a friend or loved one who is losing a bit of hair on the top side, try not to feature it by using a top-down shot, unless, of course, that friend or loved one is actually proud that they have achieved the sort of maturity that typically goes along with vanishing hair.
  4. Watch out for physical body distortions such as arms that seem to stretch into infinity due to their proximity to the camera lens, or heads that could ride upon Macys Thanksgiving Day floats. One should always check the angle of the camera back plane when taking pictures.
  5. Speaking of checking the angle of the back plane, most digital cameras have a preview window you should always check before you shoot. Look especially for things like lamps growing out of peoples heads, and plants that replace body parts. Remember you are taking a three dimensional object and turning it into a two dimensional object. The lost dimension is that of perspective. 

Why is it important to watch out for the FFTC? Because with all the online services, such as Facebook, Twitter, Flickr, Myspace, and Windows Live Spaces, a picture can go from a phone to being viewed by a million people in less than 60 seconds. Your reputation can vanish with similar speed…

In the Old West, it was common to require the cowboys (at least according to the John Wayne movies – and we all know those are historically accurate) to check their guns at the door. In modern times, professional performers have a similar edict. The reason the music groups ban cameras from their performances is not because they want to sell pictures of the group, nor is it because they are concerned with the bright lights, I am convinced it is because they do not want a bunch of bad pictures showing up on the Internet that portray them in an unflattering light.

Of course most families in the United States get together so seldom, that banning cameras from family gatherings would be cruel, short sighted, and in the end unenforceable. So rather than ban cameras, maybe you can at least attempt to improve their use. Use my top five guide as a starting point or, better yet, check out Microsoft's guide to better holiday pictures. It is not that we do not like getting our picture taken; it really is that we do not like bad pictures getting taken.

Take care, and have a wonderful holiday.

Technorati Tags: ,
Posted by mredwilson | 1 Comments
Filed under: ,

New book: Microsoft Application Architecture Guide, Second Edition

516MON-OR8L__SL500_AA240_ We’re happy to announce that Microsoft Application Architecture Guide, 2nd Edition (Patterns & Practices) is available now. You can buy it in hard copy via online retailers (ISBN: 9780735627109) or download it from the Microsoft Download Center.

Here’s the book’s Foreword by S. Somasegar:

Foreword

In using our own technologies to build Microsoft products, and working with customers
and partners every day, we have developed practical guidance on applying
best practices for application architecture and design patterns and principles
using our technologies. This guidance is valuable to both the developer and to
the solution architect. We have built the Microsoft Application Architecture Guide to
consolidate guidance that we have gathered from our internal practices, external
experts, customers, and others in the community in order to share it with you.

The purpose of the guide is to help solution architects and developers to design and
build applications on the Microsoft platform that are more effective, to support key
decision making at the early stages of a new project, as well as providing topic-specific
content to help architects and developers improve their existing solutions. This guidance
incorporates the contributions and reviews from more than 25 external experts and
customers.

By thinking about solutions in terms of architectural patterns and principles, quality
attributes, and crosscutting concerns, you can very quickly determine a baseline application
architecture and the relevant technologies, patterns, and guidance assets that
will help you build your solution. You can then use the guide to identify key areas of
your application architecture so you can refine them for your scenario.

The guide includes reference application architectures for common application types,
such as Web, rich client, RIA, mobile, and services applications; guidelines for quality
attributes and crosscutting concerns; and guidelines on design approaches that can
help you to design and refine your solution architecture.

We are confident that the Microsoft Application Architecture Guide 2nd Edition will help
you choose the right architecture, the right technologies, and the relevant patterns
that will help you make more effective design decisions.

Sincerely,
S. Somasegar
Senior Vice President of Developer Division
Microsoft

And here’s the Foreword Scott Guthrie contributed:

Foreword

Application architecture is a challenging topic, as evidenced by the wide variety of
books, articles, and white papers on the subject. It is still too hard for developers and
architects to understand architecture and best practice design for the Microsoft platform.
The original Application Architecture for .NET: Designing Applications and Services
guide did a great job of covering this topic, but it was written in 2002.

To deal with the many technology additions since then, J. D. Meier, David Hill,
and their team from Microsoft patterns & practices have created a new application
architecture guide to provide insightful guidance for designing applications and
services that run on the Microsoft platform based on the latest best practices and
technologies. The outcome is Microsoft Application Architecture Guide 2nd Edition, a
guide targeted to help solution architects and developers design effective applications
on the Microsoft platform. While the guide provides an overview of the .NET
Framework, the Microsoft platform, and the main technologies and capabilities
within them, it also provides platform-independent, pattern-oriented, principles based
guidance that will help you design your applications on a solid foundation.

The guide is based on a number of key architecture and design principles that provide
structure. It includes guidelines for identifying and dealing with key engineering
decisions, and an explanation of the quality attributes, crosscutting concerns, and
capabilities that shape your application architecture; such as performance, security,
scalability, manageability, deployment, communication, and more.

The guide also describes, at a meta-level, the tiers and layers that a solution architect
should consider. Each tier/layer is described in terms of its focus, function, capabilities,
common design patterns, and technologies. Using these as a backdrop, the guide
then overlays relevant principles, patterns, and practices. Finally, the guide provides
canonical application archetypes to illustrate common application types. Each
archetype is described in terms of the target scenarios, technologies, patterns, and
infrastructure it contains.

The guidance as a whole is based on the combined experience and knowledge of
Microsoft experts, Microsoft partners, customers, and others in the community. It
will help you understand our platform, choose the right architecture and the right
technologies, and build applications using proven practices and lessons learned.

Sincerely,
Scott Guthrie
Corporate Vice President of .NET Developer Platform
Microsoft

And here is the book’s Preface, by David Hill:

Preface

There is an old joke, told amongst mischievous developers, that in order to be
considered an architect you just need to answer every technical question with “it
depends”—Q: What’s the best way to implement authentication and authorization in
my solution? —A: It depends; Q: How should I implement my data access layer?—A:
It depends; Q: Which technology should I use for my solution’s UI?—A: It depends.
Q: How can I make my application scalable?—A: It depends. You get the general idea.

The truth is, of course, that it really does depend. Ultimately, every solution is
different and there are many factors, both technical and non-technical, that can
significantly affect the architecture and design of a solution at both the small and
the large scales. The role of the developer and solution architect is to balance the
(frequently contradictory) requirements and constraints imposed by the business,
the end user, the organization’s IT environment and management infrastructure, the
economic environment, and of course the technologies and tools that are used to
build the solution.

And, to make life really interesting, these requirements and constraints are constantly
evolving as new opportunities arise or as new demands are imposed on the system.
Changes to business rules or the emergence of new business areas can affect both new
and existing applications. Over time, users expect richer, more consistent and more
highly integrated user experiences. New compliance requirements might emerge. Or
new IT infrastructure technologies might appear that can reduce costs or improve
availability or scalability. And, of course new technologies, frameworks, and tools are
being released all the time with promises to reduce development costs, or to enable
scenarios that were previously difficult to implement.

Clearly, making sense of all of this and at the same time delivering an effective solution
on budget and to schedule is not an easy task. It requires that the developer or
solution architect have to account for a whole host of competing and overlapping
factors (some of which are non-technical) and strike a pragmatic balance between
them all. Trying to account for too many factors can result in over-engineered,
complex solutions that take a long time to build and nevertheless fail to deliver
on promises of improved longevity or flexibility. On the other hand, consideration
of too few factors can result in constrained, inflexible, and improvised solutions that
are difficult to evolve or that do not scale well. In other words, developers and solution
architects often have to walk the path between a “golden solution” on the one
hand, and a “point-in-time solution” on the other.

This, to me, is what application architecture is all about—it’s about using today’s
tools and technologies to create as much business value as possible whilst keeping
one eye on the requirements and constraints imposed by the business today, and one
eye looking to tomorrow to maximize ongoing value through scalability, flexibility
and maintainability. A good understanding of architectural principles and patterns
allows the developer or solution architect to understand and factor into the overall
design process the important design issues that can have a big impact on the overall
success of their solution. Armed with this knowledge, they can make more informed
decisions, better balance competing or overlapping requirements and constraints,
and make sure that the solution not only meets or exceeds its business goals but it
does so in way that is cost effective and scalable, maintainable and flexible.

You’ll notice that I refer to both developers and solution architects. I believe that
both can benefit greatly from a solid understanding of the architectural patterns
and principles outlined in this guide. Some might argue that the implementation
details are less important than the overall design. In my experience this is not the
case. Small decisions accumulate over time. Implementation-level details can have
a very large impact on the overall solution architecture and on its scalability, maintainability,
and flexibility, so a solid understanding by both developers and solution
architects is essential. In addition, a shared understanding leads to better communication
between developers and architects, which is a good thing.

This guide aims to provide an overview of the application architecture and design
principles and patterns that will help you make better decisions and build more
successful solutions. The guide is structured in a way that allows you to read it
from start to finish, or use as a reference resource so you can jump directly to the
most relevant sections. The first half of the guide is focused on generally applicable
architecture and design principles and apply to any type of solution. The last half
is focused on common application types—such as Web applications, rich client
application, or mobile applications—and describes the typical architecture and key
design considerations for each. It’s likely that your particular solution won’t map
directly to these, but they can serve to provide a baseline architecture that you can
take and evolve for your particular situation. The guide provides advice on how to
identify the key elements of your architecture so you can refine it over time.

There is a particular focus throughout the guide on developing solutions on the
Microsoft platform with the .NET Framework so the guide contains references to
articles and resources that provide details on relevant technologies and tools. You’ll
find though that the underlying principles and patterns are generally applicable to
any platform. It is also worth noting that the guide is not meant to be a complete and
comprehensive reference to every aspect of application architecture and design—that
would require either a much larger guide, or multiple volumes—so the guide aims to
provide a pragmatic overview of the most important topics along with links to more
detailed guidance or in-depth material.

The field of application architecture and design is dynamic and constantly evolving. The
foundations on which successful solutions have been built in the past will continue
to serve us well into the foreseeable future, but we should also expect that the pace
of innovation, in both technologies and new design approaches, will not decrease.
The Microsoft platform and the .NET Framework and the range of technologies and
scenarios that they support are both deep and wide, and getting deeper and wider
all the time. On the other hand, we don’t need to wait for what might be. We can
build compelling valuable solutions right now, and hopefully this guide will help
you do just that.

David Hill
patterns and practices
September 2009

Finally, here’s some more information about the guide from David.

Use it!

Forefront TMG 2010 Administrator’s Companion available for pre-order

TMGFCover

Greetings. We authors of Forefront TMG 2010 Administrator’s Companion are about to finish work on the book, which will be available in January 2010.

To begin giving you a sense of the book, today we’d like to share its Introduction.

Pre-order is available at Amazon.com; make sure to reserve yours!

Introduction

Forefront Threat Management Gateway Administrator’s Companion is intended to be a functionally usable resource for Forefront TMG 2010 administrators. This admin’s companion is a reference that you’ll want to keep near to hand. The book covers everything you need to learn about and to perform the administrative tasks for Forefront TMG 2010. This book is focused on giving you as much information as possible in a well-organized, clearly written manner.

In short, this book is designed to be the one and only Forefront TMG resource you turn to. To this end, the book zeroes in on common administrative scenarios, frequently performed tasks with documented examples and as many troubleshooting tips as we could fit. One of the goals was to keep the content reasonably concise that the book remains compact and easy to navigate while at the same time ensuring that the book includes as much information as possible—making it a valuable resource. Thus, instead of a lightweight 100-page quick reference, you get a valuable resource guide that can help you quickly and easily perform common tasks, solve problems, and implement advanced Forefront TMG 2010 technologies such as Exchange 2010 publishing, site-to-site VPN management as well as URL Filtering and ISP Redundancy management.

Who Is This Book For?

Forefront Threat Management Gateway Administrator’s Companion covers the Standard and Enterprise editions of Forefront TMG 2010. The book is designed for the following readers:

  • Current Forefront TMG 2010 administrators
  • Current ISA Server 2004 administrators who want to learn Forefront TMG 2010
  • Administrators upgrading to Forefront TMG 2010 from Forefront TMG Medium Business Edition
  • Administrators upgrading to Forefront TMG 2010 from ISA Server 2006
  • Administrators upgrading to Forefront TMG 2010 from ISA Server 2004
  • Managers and supervisors who have been delegated authority to manage Forefront TMG 2010

In order to make the book as understandable as possible, we included some information about basic networking concepts such as IP routing and a discussion of the HTTP protocol and authentication. For those who already possess this knowledge, we’ve placed the bulk of this information in appendices at the end of the book to reduce in-chapter clutter.

We also assume that you are fairly familiar with Windows Server 2008. If you need help learning Windows Server, we recommend that you buy Windows Server 2008 Administrator’s Pocket Consultant or Windows Server 2008 Inside Out.

How Is This Book Organized?

Forefront Threat Management Gateway Administrator’s Companion is designed to provide education about TMG deployment scenarios as much as the features Forefront TMG brings to your firewall deployments. If you are reading this book, you should be aware of the relationship between Pocket Consultants and Administrator’s Companions. Both types of books are designed to be part of an administrator’s library. Pocket Consultants are the down-and-dirty, in-the-trenches books, while Administrator’s Companions are the comprehensive tutorials and references that cover every aspect of deploying a product or technology in the enterprise.

The first two chapters provide an overview of the new edge security products features offered in the Forefront product suite. Chapter 1 discusses the differences between Forefront TMG Medium Business Edition and Forefront TMG 2010. Chapter 2 compares Forefront TMG with Forefront UAG and helps you decide which is more appropriate to your organization’s needs.

In chapters 3 through 7, we cover the various processes involved with evaluating your organization’s requirements and planning your Forefront TMG deployment to support them. These include such factors as determining your traffic profile, mapping your network structure and the Forefront TMG role in that structure; whether it is for edge protection or network isolation. We also outline the upgrade and migration options and considerations for that task.

In chapters 8 through 10, we guide you through actual Forefront TMG installation, installation troubleshooting and provide an introduction to the management console. In chapters 11through 14, we cover basic firewall access policies, network concepts, NIS and various load-balancing methodologies. Chapters 15 and 16 concentrate on the Web proxy and caching concepts.

Chapters 17 through 20 discuss the various forms of traffic protection afforded clients in protected networks, including how these mechanisms interact as well as how to configure, evaluate and troubleshoot them. Chapters 21 through 24 describe various publishing scenarios such as Exchange Web mail, SharePoint and server publishing, outlining the differences and commonalities between them. Each of these chapters offers troubleshooting hints directly related to those scenarios. Chapters 25 through 27 cover VPN concepts and scenarios.

Chapter 28 discusses Forefront TMG logging, including how to use the live and historical log query mechanisms. Chapter 29 covers enhanced NAT; a new feature that allows you to define 1:1 relationships between protected network entities and an IP address in the destination network. Chapter 30 covers Forefront TMG Component Object Model and provides an example of how to automate a common administrative task using VBScript, Jscript and PowerShell.

Chapters 31 through 33 are dedicated to troubleshooting techniques, methodology and tools, with chapter 33 dedicated to using Network Monitor 3. Appendices A through D provide the down-and-dirty discussions around HTTP, authentication, performance monitoring, windows Internet library behaviors as web proxy clients and a detailed dissection of the WPAD script.

 

Stay tuned to this channel; we are going to write more about Forefront TMG 2010 book pretty soon.

—Yuri Diogenes

Posted by yuridio | 0 Comments
Filed under: , ,

Author news: Sayed Hashimi on MSBuild, Part 2

SayedHashimi Sayed Ibrahim Hashimi, co-author of the much-praised book Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build (Microsoft Press, 2009; ISBN: 9780735626287; 432 pages), returns to dnrTV in show #158, in which Sayed shows some third-party MSBuild scripts, tools, and tasks. The video is 53 minutes, 18 seconds. At the 25:55 point, Sayed begins discussing task batching and target batching in MSBuild. 

Enjoy!

P.S. Sayed’s website is here. Recent posts include MSBuild reserved characters, an ASP.NET MVC Sudoku solver, and ASP.NET MVC view helpers.

William Stanek: We interrupt our regularly scheduled broadcast again (Part Deux, Step 1)

William here. Digging deeper into the networking problem that I discussed last time. To recap: the problem I’ve encountered was this:

>>>>>The computer is one of many running on a fairly complex home network. The network has a single router and multiple network switches. When the operating system starts, the computer is unable to connect to the network or to the Internet. The computer is running Windows 7 64-bit and has a single 1.0 Gbps network adapter.<<<<<

The questions to you, the reader, were:

  • Is this an operating system problem?
  • Is this a hardware problem?
  • Is this a configuration problem?
  • Is this just a quirk or a temporary hiccup?

Along with: How would you go about troubleshooting and resolving the problem?

This type of problem is always so much fun (and no sarcasm intended; I love this stuff ;-) And it’s not so much a problem as it is a puzzle waiting to be solved. So where to begin unraveling the puzzle?

Guesses? Well, let’s start with “Checking for the obvious” and call that Step 1. The question we are seeking to answer is this:

>>>>>Is this just a quirk or a temporary hiccup? Also implied in this is a check of the basics. Here, that means checking the cables.

So quirk, hiccup, or basic cable issue? Easy enough to determine. If this was a problem with the connection between the switch the computer is plugged into and the router, or between the router and the Internet, the problem would look like this in Network And Sharing Center:

image001

Clicking the red X in the summary network map launches the built-in Networking troubleshooter. And the troubleshooter quickly would tell you the following:

image002

As an aside, a disconnect between a switch and a router is largely indistinguishable from a TCP/IP configuration problem at this point. When you proceed with automated troubleshooting, the Networking troubleshooter checks mostly for configuration issues and won’t necessarily be able to tell you there is a disconnect between the switch and the router. The troubleshooter performs the following checks in this order:

  1. Web connectivity
  2. Name resolution
  3. Remote host availability
  4. Network configuration
  5. Network gateway accessibility
  6. Re-check network configuration

To see the detailed results of the automated troubleshooting, you need to click the View Detailed Information link provided. You’ll then be able to access the troubleshooting report.

If this was a problem with the computer’s connection to the switch, the problem would look like this in Network And Sharing Center:

image003

Clicking the red X in the summary network map launches the built-in Networking troubleshooter. And the troubleshooter quickly would tell you the following:

image004

Of course, you also could have checked for the problem in the Network Connections window and you would have known the same thing:

image005

As an aside, whether the computer end or the switch end was disconnected, it only takes Windows 7 a few seconds to detect that you’ve reconnected the Ethernet cable. Windows 7 will then attempt to connect you to the local area network (LAN). If the computer is connected to a switch and not to the rest of the LAN and the Internet, Windows 7 likely will show that you are connected to an Unidentified Network and that you have no Internet access.

The problem the computer is experiencing here, however, is very different. The computer thinks it is on multiple networks. It has no network connection and no Internet connection, even though the basic cabling is good. So is this just a quirk or hiccup? Well, let’s check…and one way to do this is simply to disable and then enable the network adapter.

Any guesses as to what happens when we do this? Well, it does force the computer to re-evaluate the networking components and configuration—and more important, in this particular case, the problem appears to go away. The network connectivity returns and all looks good. But does it really?

Thanks for reading! Tune in next time, when I continue to dig in to this issue and provide a few more answers. Your comments and emails are always welcome, especially if you think you know the answer (and I’ll gladly tell you privately if you are right).

William R. Stanek

williamstanek at aol dot com

http://www.twitter.com/WilliamStanek

RTM’d today: Windows Server 2008 Administrator’s Pocket Consultant, Second Edition

9780735627116x Good news: William Stanek has updated his Windows Server 2008 Administrator's Pocket Consultant, which we released in early 2008. That book averages 4.5 stars at Amazon. William’s update—Windows Server 2008 Administrator’s Pocket Consultant, Second Edition (updated for R2; ISBN: 9780735627116; 720 pages, up from 572 pages)—was shipped to the printer today and will be available via online retailers in the middle of December.

 

Here is the book’s outline:

Chapter 1 Windows Server 2008 R2 Administration Overview    1

Chapter 2 Deploying Windows Server 2008 R2    31

Chapter 3 Managing Servers Running Windows Server 2008 R2    67

Chapter 4 Monitoring Processes, Services, and Events    89

Chapter 5 Automating Administrative Tasks, Policies, and Procedures    133

Chapter 6 Enhancing Computer Security    189

Chapter 7 Using Active Directory    211

Chapter 8 Core Active Directory Administration    237

Chapter 9 Understanding User and Group Accounts    275

Chapter 10 Creating User and Group Accounts    297

Chapter 11 Managing User and Group Accounts    323

Chapter 12 Managing File Systems and Drives    357

Chapter 13 Administering Volume Sets and RAID Arrays    403

Chapter 14 Managing File Screening and Storage Reporting    425

Chapter 15 Data Sharing, Security, and Auditing    441

Chapter 16 Data Backup and Recovery    495

Chapter 17 Managing TCP/IP Networking    533

Chapter 18 Administering Network Printers and Print Services    549

Chapter 19 Running DHCP Clients and Servers    585

Chapter 20 Optimizing DNS    629

You can pre-order the book here. We’ll post excerpts from the book near its availability date in December.

William Stanek: We interrupt our regularly scheduled broadcast again (Part Deux)

William here. Last time I talked about a problem that Windows 7 made easy to solve by being spot on and helping me resolve matters quickly. This time, I’m going to talk about a different type of problem—the kind that can’t be resolved so quickly or so easily. The problem I’ve encountered is this:

>>>>>The computer is one of many running on a fairly complex home network. The network has a single router and multiple network switches. When the operating system starts, the computer is unable to connect to the network or to the Internet. The computer is running Windows 7 64-bit and has a single 1.0 Gbps network adapter.<<<<<

The first step in troubleshooting any connectivity problem is always the same: Check the networking status. Easy enough to do. Simply look to the system tray. Here, the Network icon in the system tray shows a warning sign. Clicking the Network icon and then clicking Open Network And Sharing Center reveals something very interesting, as shown in the figure below.

image001

This computer with a single network adapter thinks it is on multiple networks. What has happened here is at startup, the computer checked the networking configuration, found the adapter, but was unable to determine exactly how the computer was connected to the network. As a result, the computer has no network connectivity and no Internet connectivity whatsoever.

I’ll give you the solution for this problem tomorrow. In the meantime, any ideas on what is the problem here? Here are some things to think about:

  • Is this an operating system problem?
  • Is this a hardware problem?
  • Is this a configuration problem?
  • Is this just a quirk or a temporary hiccup?

How would you go about troubleshooting and resolving the problem?

Next up, the answer and a lot more information on troubleshooting and resolution of this problem. Thank you for reading!

William R. Stanek

williamstanek at aol dot com

http://www.twitter.com/WilliamStanek

Are you a poet? Compose a Haiku and Win!

Create a Haiku about Windows Server 2008 R2 and you could win a home theater system or an Xbox 360 Elite. For instructions and details, visit http://www.r2haiku.com/.

If you’re not poetic but still want to learn about R2, you can download a free ebook about it from Microsoft Press. It covers the new features of Windows Server 2008 R2 in the areas of virtualization, management, the Web application platform, scalability and reliability, and interoperability with Windows 7.

Posted by KimSpilker | 0 Comments

Ed Wilson: I think I would like to write a book…

As someone who has written or contributed to 16 book projects, people often seek me out to solicit advice on writing a book. More often than not, the conversation begins “I think I would like to write a book about … (fill in your own obscure technology) because I really know a lot about it…” They then begin to describe how much they know about their obscure technology.

The problem is that people have never written a book have no idea of the timeline that is involved. Here is an example from my most recent book, Windows PowerShell 2.0 Best Practices:

  • First draft of proposal was dated Jan. 31, 2008
  • First chapter on Aug. 25, 2008
  • Last chapter on Aug. 28, 2009
  • Cover approval Nov. 13, 2009

This does not account for the fact that while in the writing phase, I generally have a deadline of some kind every week. This means I have to work every night, every weekend … for a year. Once I begin to explain this to people they generally change their mind. Over the last decade I have counseled more than two dozen prospective writers … to date … they are still prospective writers.

Technorati Tags: ,,
Posted by mredwilson | 4 Comments
Filed under: , ,

Free e-book: Introducing Microsoft SQL Server 2008

This has been available for a while, but it’s been a long time since we’ve mentioned it. You can download a free e-book titled Introducing Microsoft SQL Server 2008 here. The book is by Peter DeBetta, Greg Low, and Mark Whitehorn.

The book includes the following chapters:

Chapter 1:   Security and Administration
Chapter 2:   Performance
Chapter 3:   Type System
Chapter 4:   Programmability
Chapter 5:   Storage
Chapter 6:   Enhancements for High Availability
Chapter 7:   Business Intelligence Enhancements

Enjoy!  (And, by the way, the option to browse Chapter 1 on its own wasn’t working for me this morning, so don’t be surprised if that’s the case for you too.)

Author news: Steve McConnell speaking in Bellevue, WA

Greetings. Steve McConnell, author of Code Complete (voted the single most influential book every programmer should read at stackoverflow.com), Rapid Development, Software Estimation: Demystifying the Black Art, and other titles and the CEO of Construx Software, will be speaking in Bellevue, Washington, on November 19. His talk is titled “Secrets of world-class software organizations.” The talk is free and is being presented by IEEE/Computer Society Seattle.

Here are the details:

Thursday, November 19, 2009
6:30 pm – 7:00 pm (Networking)
7:00 pm – 8:30 pm (Presentation with question and answer period)

Bellevue College
Building N – Room 201
3000 Landerholm Circle SE, N201
Bellevue, Washington 98007

There is no cost to attend however an RSVP is requested by noon, November 18, 2009 to mike.becker@ieee.org with “confirm 11/19″ in the email subject line to help us manage the facility usage. The event is open to the general public.

About the talk
Construx consultants work with literally hundreds of software organizations each year.  Among these organizations a few stand out as being truly world class.  They are exceptional in their ability to meet their software development goals and exceptional in the contribution they make to their companies’ overall business success.  Do world class software organizations operate differently than average organizations?  In Construx’s experience, the answer is a resounding “YES”.  In this talk, award-winning author Steve McConnell reveals the technical, management, business, and cultural secrets that make a software organization world class.

More Posts Next page »
 
Page view tracker