Presentation is loading. Please wait.

Presentation is loading. Please wait.

Under the Hood on Extending the My Namespace Joe Binder TLN414 Program Manager Microsoft Corporation.

Similar presentations


Presentation on theme: "Under the Hood on Extending the My Namespace Joe Binder TLN414 Program Manager Microsoft Corporation."— Presentation transcript:

1 Under the Hood on Extending the My Namespace Joe Binder TLN414 Program Manager Microsoft Corporation

2 Agenda Design goals My and the.NET Framework Extensibility Model Customizing My, Step-by-Step Deploying My Extensions and Customizations Questions

3 The My Namespace Vision … To provide a highly approachable, unified runtime environment for Visual Basic developers.

4 Design Pillars Task-based APIs Default configurations for extensible components Promote best-practice usage patterns Use.NET Framework constructs directly

5 Example Interaction Model My.Application.Log.NET Framework 2.0 contains powerful and extensible tracing architecture Highly factored design Enterprise scenarios require extension to existing services Configuration is hard! My.Application.Log provides a simple entry point and default configuration

6 My.Application.Log

7 Inside The My Namespace Extensibility Points My Application Computer User Resources Settings Forms WebServices — Customize application model, events, … — Add device support, hardware events, … — Custom authorization and authentication — Use external store (e.g., settings) for settings Devices — Add new top-level properties

8 Inside The My Namespace Architectural Overview WindowsApplication1 Namespace My ReadOnly Property Application As MyApplication ReadOnly Property Application As MyApplication...... Class MyApplication Class MyApplication Inherits ApplicationServices.ApplicationBase Inherits ApplicationServices.ApplicationBase End Class End Class End Namespace Microsoft.VisualBasic.dll Namespace ApplicationServices Public Class ApplicationBase Public Class ApplicationBase ReadOnly Property Log As Log ReadOnly Property Log As Log … End Class End Class End Namespace

9 Extending My at the Root-Level Adding My.Devices to the Hierarchy

10 Application Model Architectural Overview Shared Sub Main(ByVal Args As String()) My.Application.Run(Args) End Sub Namespace My Partial Friend Class MyApplication Partial Friend Class MyApplication Inherits WindowsFormsApplicationBase Inherits WindowsFormsApplicationBase End Class End Class End Namespace Namespace Microsoft.VisualBasic.ApplicationServices Class WindowsFormsApplicationBase Class WindowsFormsApplicationBase Inherits ConsoleApplicationBase Inherits ConsoleApplicationBase End Class End Class End Namespace Startup NetStatusChanged …

11 Extending the Application Model

12 My.Settings Architectural Overview SettingsBase ApplicationSettingsBase My.Settings Property FavoriteColor As Color Property LastLoggedIn As Date … SettingsProvider LocalFileSettingsProvider <userSettings> 0, 192, 0 0, 192, 0 </userSettings>

13 Implementing a Custom Settings Provider

14 Customizing My.User Thin wrapper atop IPrincipal/IIdentity WindowsPrincipal used as default Custom Authentication and Authorization are wired in through IPrincipal/IIdentity My.User IPrincipal IIdentity WindowsPrincipal WindowsIdentity

15 Customizing My.User Leveraging ASP.NET Personalization in Windows Forms

16 Extending the My Namespace Design Guidelines Stateless APIs when appropriate Global Instances. Simple Parameter Types Factory Methods Thread-safe.NET Framework Guidelines still apply!

17 Extending the My Namespace Deployment Class libraries factored into standalone assemblies Extensibility code factored into Visual Studio Template All components packaged and deployed as.VSI CustomTypes.dll MyAppExtension.vb.vstemplate.vsi

18 Where to go from here? Attend HOL TLN023! Stop by Tools & Language Track Lounge! Additional resources: http://msdn.microsoft.com/msdnmag/issues/05 /07/My/default.aspx http://msdn.microsoft.com/msdnmag/issues/05 /07/My/default.aspx http://msdn.microsoft.com/vbasic/default.aspx ?pull=/library/en-us/dnvs05/html/vbmy.asp http://msdn.microsoft.com/vbasic/default.aspx ?pull=/library/en-us/dnvs05/html/vbmy.asp

19 Questions Email: jbinder@microsoft.com jbinder@microsoft.com

20 Two ways to access Online Evaluation Forms: 1.CommNet stations located throughout conference venues 2.From any wired or wireless connection to: http://www.MyTechReady.com http://www.MyTechReady.com For more information please refer to your Pocket Guide Please Complete An Evaluation Form Your Input Is Important!

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


Download ppt "Under the Hood on Extending the My Namespace Joe Binder TLN414 Program Manager Microsoft Corporation."

Similar presentations


Ads by Google