21
MMC 3.0: Developing MMC 3.0: Developing Managed Code Snap-ins Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas Jon Rowlett (jrowlett), Ian Lucas (ianlucas) (ianlucas) FUN301 FUN301 Operations and Control Platform Operations and Control Platform Microsoft Corporation Microsoft Corporation

MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Embed Size (px)

Citation preview

Page 1: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

MMC 3.0: Developing MMC 3.0: Developing Managed Code Snap-insManaged Code Snap-ins

Jon Rowlett (jrowlett), Ian Lucas (ianlucas)Jon Rowlett (jrowlett), Ian Lucas (ianlucas)FUN301FUN301Operations and Control PlatformOperations and Control PlatformMicrosoft CorporationMicrosoft Corporation

Shows
Speaker requests hidden slides remain in
Page 2: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

MMC 3.0 Goals And MMC 3.0 Goals And InvestmentsInvestmentsGoalsGoals InvestmentsInvestmentsReduce the cost of snap-Reduce the cost of snap-in developmentin development

Managed code Managed code framework (SDK)framework (SDK)

Improve reliabilityImprove reliability Heap isolationHeap isolation

ETW tracingETW tracing

App domain isolation App domain isolation and threading and threading (managed code)(managed code)

Consistent administrator Consistent administrator user experienceuser experience

Actions PaneActions Pane

New Add/Remove New Add/Remove dialogdialog

UI guidelines and UI guidelines and samplessamples

Page 3: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Key User BenefitsKey User Benefits

Improved UsabilityImproved UsabilityDiscoverability of actionsDiscoverability of actionsSimpler customization of consolesSimpler customization of consoles

More ReliableMore ReliableImproved detection and reporting of snap-in Improved detection and reporting of snap-in problemsproblemsAbility to isolate hung snap-ins from console Ability to isolate hung snap-ins from console (new snap-ins only)(new snap-ins only)Better perceived robustness (Async)Better perceived robustness (Async)

Richer Snap-insRicher Snap-insFunctionally rich views through Windows FormsFunctionally rich views through Windows FormsConsistency across snap-in designConsistency across snap-in designReduced development cost equates to Reduced development cost equates to increased functionalityincreased functionality

Page 4: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation
Page 5: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation
Page 6: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Key Developer BenefitsKey Developer Benefits

Easier and faster snap-in Easier and faster snap-in developmentdevelopment

Takes less time to get a snap-in up and Takes less time to get a snap-in up and runningrunningDesign/Develop/Debug in Visual StudioDesign/Develop/Debug in Visual StudioEasier to debug, integrated trace supportEasier to debug, integrated trace support

Integrated Windows Forms supportIntegrated Windows Forms supportFull integration with Windows Forms Full integration with Windows Forms (unlike old OCX views)(unlike old OCX views)

Design GuidelinesDesign GuidelinesPrescriptive guidance on standardized Prescriptive guidance on standardized layout and behaviorslayout and behaviorsDiscussions on common MMC design Discussions on common MMC design issuesissuesDesign Best PracticesDesign Best Practices

Page 7: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Design GuidelinesDesign Guidelines

Consistency of user experienceConsistency of user experience

Guidance on layoutGuidance on layoutLayout of viewsLayout of views

Use of controlsUse of controls

System themes (fonts, colors)System themes (fonts, colors)

Guidance on structureGuidance on structureSimplifying navigation (use of tree)Simplifying navigation (use of tree)

Granularity of compositionGranularity of composition

Protecting investments in managed Protecting investments in managed snap-inssnap-ins

Page 8: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Standardized DesignStandardized Design

List View with Roll-up List View with Roll-up SummarySummary

List View with List View with Preview PanePreview Pane

Start PageStart Page

Page 9: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation
Page 10: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

MMC 3.0 ArchitectureMMC 3.0 Architecture

MMC 3.0 MMC 3.0 Core UICore UI

MMC V3.0 MMC V3.0 Managed Managed SupportSupport

AppDomain 0

V2.0 Snap-inV2.0 Snap-inV2.0 Snap-inV2.0 Snap-inV2.0 Snap-inV2.0 Snap-inV1.2 / V2.0 V1.2 / V2.0 Snap-insSnap-ins Managed Managed

SystemSystem

AppDomain n

MMC 3.0 MMC 3.0 Managed Managed

FrameworkFramework

Snap-inSnap-inLegacy Snap-In Interfaces

Microsoft ConfidentialMicrosoft Confidential

Page 11: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

MMC 3.0 Reliability ArchitectureMMC 3.0 Reliability Architecture

MMC CoreMMC Core

Bookkeep

ing

Bookkeep

ing

ETW TracingETW Tracing

V2.0 Snap-inV2.0 Snap-inV2.0 Snap-inV2.0 Snap-inV2.0 Snap-inV2.0 Snap-inLegacyLegacy

Snap-insSnap-ins

Legacy Snap-In Interfaces

ManagedManagedSnap-insSnap-ins

Heap SeparationHeap Separation

WatsonWatson

App Domain Separation Asynchronous Activation

Private Private HeapHeap

Private Private HeapHeap

ProcesProcess Heaps Heap

ProcesProcess Heaps Heap

Microsoft ConfidentialMicrosoft Confidential

Page 12: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Snap-inSnap-in

NodeNode

NodeNodeNodeNode

ViewDeViewDescsc

ViewDeViewDescsc

ViewsViews HTML Message List Windows Form

ViewView

ActionActionActionAction ActionActionActionAction ActionActionActionAction

Selected Selected DataData

Property Property PagePageProperty Property

PagePage

VerbsVerbs VerbsVerbs

Tree Pane Result Pane

Action Pane

Programming Model - Primary SDK Programming Model - Primary SDK ClassesClasses

Property Sheet

Page 13: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Building A Software Catalog Building A Software Catalog Snap-inSnap-in

Jon RowlettJon RowlettLead DeveloperLead DeveloperOperations and Control PlatformOperations and Control Platform

Page 14: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Software CatalogSoftware CatalogA snap-in for managing installed applications on a A snap-in for managing installed applications on a systemsystem

Creation of a snap-in that will utilize Creation of a snap-in that will utilize WMI to list the applications installed WMI to list the applications installed on a machineon a machine

Declaration and registration of a snap-inDeclaration and registration of a snap-in

Creating nodes in the scope treeCreating nodes in the scope tree

Using actions and standard verbsUsing actions and standard verbs

Creating a list viewCreating a list view

Adding the ability to extend Computer Adding the ability to extend Computer ManagementManagement

Page 15: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Developer ExperienceDeveloper Experience

““400 lines of code instead of 6000”400 lines of code instead of 6000”““Shorter ramp-up time to get a basic Shorter ramp-up time to get a basic snap-in working”snap-in working”

““Ties well into the “rapid application Ties well into the “rapid application development” model”development” model”““MMC 3.0 abstracts core concepts in MMC 3.0 abstracts core concepts in simpler to understand .net primitives”simpler to understand .net primitives”

““Hands down it makes the job of Hands down it makes the job of creating a snap-in almost trivial”creating a snap-in almost trivial”

““New developer with no MMC experience New developer with no MMC experience productive within a day”productive within a day”““Supporting drag-drop has gone from Supporting drag-drop has gone from near impossible to almost trivial”near impossible to almost trivial”

Page 16: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

MMC 3.0 Versus MMC 2.0MMC 3.0 Versus MMC 2.0

MMC 3.0 managed interfaces provides parity with MMC 3.0 managed interfaces provides parity with existing MMC 2.0 functionality with the following existing MMC 2.0 functionality with the following exceptions:exceptions:

Context Menu extensions are not supported.Context Menu extensions are not supported.Virtual Lists are not supported in MMC ListView – use Virtual Lists are not supported in MMC ListView – use standard list controls on Windows Forms Views instead.standard list controls on Windows Forms Views instead.Toolbar support is removed – Actions Pane provides a Toolbar support is removed – Actions Pane provides a better and consistent surfacing of actions.better and consistent surfacing of actions.

MMC 3.0 managed interfaces support the MMC 3.0 managed interfaces support the following additional features:following additional features:

Managed / Unmanaged snap-in extensibility (Namespace Managed / Unmanaged snap-in extensibility (Namespace and Property Page)and Property Page)Action Pane Support – program actions once for Action Pane Support – program actions once for consistent surfacing through Action Pane & Context consistent surfacing through Action Pane & Context Menus.Menus.Integrated Windows Forms Views (replaces OCX Views)Integrated Windows Forms Views (replaces OCX Views)Multiple Views per nodeMultiple Views per nodeStatus ManagementStatus Management

Page 17: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Platform SupportPlatform Support

MMC 3.0 is fully backwards MMC 3.0 is fully backwards compatible supporting all existing compatible supporting all existing snap-ins:snap-ins:

Snap-ins written to MMC 1.0, 1.2, 2.0Snap-ins written to MMC 1.0, 1.2, 2.0

MMC 3.0 will be available on:MMC 3.0 will be available on:Windows Vista/Longhorn ServerWindows Vista/Longhorn Server

Windows Server 2003 R2Windows Server 2003 R2

Windows Server 2003 (SP1)Windows Server 2003 (SP1)

Windows XP (SP2)Windows XP (SP2)

Page 18: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Community ResourcesCommunity Resources

At PDCAt PDCFor more information, go seeFor more information, go see

Labs: FUNHO06 – Writing Managed Code Labs: FUNHO06 – Writing Managed Code Snap-inSnap-inFUN Track lounge: I’ll be there Thu 2-5 p.m., FUN Track lounge: I’ll be there Thu 2-5 p.m., Fri 9am-12 p.m.Fri 9am-12 p.m.

After PDCAfter PDCIf you missed this related session, watch If you missed this related session, watch it on the DVDit on the DVD

FUN301: MMC 3.0 Developing Managed FUN301: MMC 3.0 Developing Managed Code Snap-insCode Snap-ins

Get the MMC 3.0 SDKGet the MMC 3.0 SDKPlatform SDK for Windows Vista BetaPlatform SDK for Windows Vista BetaPlatform SDK for Windows Server 2003 R2 Platform SDK for Windows Server 2003 R2 Beta.Beta.

Page 19: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

Wrap UpWrap Up

MMC 3.0 reduces the cost to develop MMC 3.0 reduces the cost to develop snap-ins and improves the snap-ins and improves the administrator user experienceadministrator user experienceMMC 3.0 supports existing snap-ins MMC 3.0 supports existing snap-ins for backward compatibility and is for backward compatibility and is more robustmore robustMMC 3.0 will ship in Windows Server MMC 3.0 will ship in Windows Server R2 and Longhorn Client and Server, R2 and Longhorn Client and Server, with downloads available on XP SP2 with downloads available on XP SP2 and WS03 SP1and WS03 SP1

““Hands down it makes the job of Hands down it makes the job of creating a snap-in almost trivial”creating a snap-in almost trivial”

Page 20: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

FAQFAQWhen will MMC 3.0 be available on XP and WS03?When will MMC 3.0 be available on XP and WS03?

MMC 3.0 will be made available for XP SP2 and WS03 SP1 around MMC 3.0 will be made available for XP SP2 and WS03 SP1 around the WS03 R2 RTM timeframethe WS03 R2 RTM timeframe

How will MMC support future versions of managed How will MMC support future versions of managed framework?framework?

Future versions of MMC will provide for side-by-side execution of Future versions of MMC will provide for side-by-side execution of managed snap-ins built against different MMC Fx versionsmanaged snap-ins built against different MMC Fx versions

How do I debug issues in my existing snap-in detected by the How do I debug issues in my existing snap-in detected by the new MMC 3.0 reliability features?new MMC 3.0 reliability features?

MMC provides a whitepaper to help analyze, understand and MMC provides a whitepaper to help analyze, understand and resolve the common problems detected by the new book-keeping resolve the common problems detected by the new book-keeping featuresfeatures

Which Microsoft tools will be using MMC 3.0 in the Longhorn Which Microsoft tools will be using MMC 3.0 in the Longhorn release?release?

A number of tools including Event Viewer, Task Scheduler, and A number of tools including Event Viewer, Task Scheduler, and Terminal Services are already in Beta1. Many more are still to Terminal Services are already in Beta1. Many more are still to come, including tools shipping in WS03 R2 for new features like come, including tools shipping in WS03 R2 for new features like Distributed File System Manager (DFS) and File Server Resource Distributed File System Manager (DFS) and File Server Resource ManagerManager

What are the performance considerations for managed snap-What are the performance considerations for managed snap-ins?ins?

MMC programmers guide recommends approaches for minimizing MMC programmers guide recommends approaches for minimizing performance issues, including reducing any initial startup delays performance issues, including reducing any initial startup delays due to JIT requirements. The API includes several performance due to JIT requirements. The API includes several performance focused features including batch update modes to allow snap-ins focused features including batch update modes to allow snap-ins to optimize UI redraw issuesto optimize UI redraw issues

Page 21: MMC 3.0: Developing Managed Code Snap-ins Jon Rowlett (jrowlett), Ian Lucas (ianlucas) FUN301 Operations and Control Platform Microsoft Corporation

© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.