Visual Studio 2010 and.NET Framework 4 Training Workshop.

Slides:



Advertisements
Similar presentations
Ofir Aspis 1/2010 VS 2010 Targets High Level - IDE New Features VS 2010 As Editor and Platform Demo Editor features Extending.
Advertisements

Component-Based Software Engineering Main issues: assemble systems out of (reusable) components compatibility of components.
An overview of… Luis Guerrero Plain Concepts
The Functions and Purposes of Translators Code Generation (Intermediate Code, Optimisation, Final Code), Linkers & Loaders.
Managed Extensibility Framework Georges
Visual Studio 2010 and.NET Framework 4 Training Workshop.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 5 - Functions Outline 5.1Introduction 5.2Program.
Semantics of Calls and Returns
Visual Studio 2010 and.NET Framework 4 Training Workshop.
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Programming Techniques Non-declarative needs (VRH 3.8) Program design in the.
Software Development Processes for Network Distributed Applications Experiences and Expectations Davide NDA Group (CRS4) Workshop NAME, 4 Oct.
Topic 4 – Programmer- Defined Functions. CISC 105 – Topic 4 Functions So far, we have only seen programs with one function, main. These programs begin.
Sage CRM v7.2 Developers Course An Introduction to the Developer Program.
LAYING OUT THE FOUNDATIONS. OUTLINE Analyze the project from a technical point of view Analyze and choose the architecture for your application Decide.
Second-Hand Shopping: Efficient Component Reuse TopCoder, Inc. Sean Campion, Project Manager [scamp]
Whistle Stop Tour of The Module. Stop and think!
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Neal Stublen Class Objectives  Develop an understanding of the.NET Framework  Gain proficiency using Visual Studio  Begin learning.
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Identify steps for understanding and solving the
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. C How To Program - 4th edition Deitels Class 05 University.
Tech Talk Go4 Factory Patterns Presented By: Matt Wilson.
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Refactoring Improving the structure of existing code Refactoring1.
@DNNCon Don’t forget to include #DNNCon in your tweets! Effective Unit Testing for DNN James McKee Solutions Developer / Enterprise
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Using Content Types to Improve Discoverability IA260 Gary Lapointe, MOSS MVP.
Sofia Bulgaria Summer School IST eXPERT: Best Practice on e-Project Development 30 June - 2 July 2003 eXtreme programming.
Tradepoint Enterprise – Sneak Peek at Version 3.0 Power Point Template.
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 16, Methodologies: Putting it all together.
REFACTORINGREFACTORING. Realities Code evolves substantially during development Requirements changes 1%-4% per month on a project Current methodologies.
A.Alzubair Hassan Abdullah Dept. Computer Sciences Kassala University A.Alzubair Hassan Abdullah Dept. Computer Sciences Kassala University NESTED SUBPROGRAMS.
What the heck is MEF? And why should I care? Jason Offutt Software Engineer Central Christian Church
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC PROGRAMMING FUNDAMENTALS Bilal Munir Mughal 1 Chapter-8.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Bart J.F. De Smet Software Development Engineer Microsoft Corporation Session Code: DTL315.
ALL CAPS TITLE Source Author Name(s) & Affiliation (University/Lab/Company) Presented by: Your Group Name & Member Names.
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Visual Studio 2010 and.NET Framework 4 Training Workshop.
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
44222: Information Systems Development
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Operational Semantics (Slides mainly.
Microsoft Advertising 16:9 Template Light Use the slides below to start the design of your presentation. Additional slides layouts (title slides, tile.
© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel
Visual Studio 2010 and.NET Framework 4 Training Workshop.
© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel
Model View Presenter Design Pattern Jay Smith PMO Architect and Evangelist Tyson Foods, Inc.
Week 5 Part 2 Kyle Dewey. Overview Scope Lifetime Testing Exam #1 overview.
Visual Studio 2010 and .NET Framework 4 Training Workshop
Testing Tutorial 7.
© 2016, Mike Murach & Associates, Inc.
C Functions -Continue…-.
Tech·Ed North America /10/2018 2:43 PM
Chapter 5 - Functions Outline 5.1 Introduction
Advanced Programming Behnam Hatami Fall 2017.
© 2016, Mike Murach & Associates, Inc.
Tech·Ed North America /18/ :26 AM
Present by Andie Saizan, MCP
Component-Based Software Engineering
Dependency Injection with MEF and Unity
Refactoring Legacy AngularJS
Visual Studio 2010 和 .NET Framework 4 培训研讨会
Chapter 7 Systems of Inequalities
How and When to Use MEF: Too Much Is Never Enough
Example 5A: Solving Simple Rational Equations
Blazor A new framework for browser-based .NET apps Ryan Nowak
9/14/2019 6:51 AM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Presentation transcript:

Visual Studio 2010 and.NET Framework 4 Training Workshop

Presentation Outline (hidden slide): Technical Level: 300 Intended Audience: Developers & Architects Objectives (what do you want the audience to take away): Understand why and where MEF would be used Understand how MEF is used Presentation Outline: What is extensibility? Where does MEF fit? MEF Basics (Import/Export/Container/Catalogs) MEF Intermediate Topics Lifetime Scoping

A Lap Around Managed Extensibility Framework Name Title Organization

Understand importance of extensibility to software Understand when and how MEF is used Relation to other existing technologies Your feedback Objectives

The Problem… Original Software Development Software Maintenance

The Managed Extensibility Framework (MEF) is a new library in the.NET Framework that enables greater reuse of applications and components. Using MEF,.NET applications can make the shift from being statically compiled to dynamically composed Managed Extensibility Framework?

2) To put things together to form a whole com·pose [ kəm pṓz ] MSN Encarta

Open/Closed Principle Software entities should be open for extension, but closed for modification.

Known vs. Unknown

MEF Basics… An Application is built of parts.

MEF Basics… Export it. Import it. Compose it.

Part, enter stage left… Part A public class SimpleMortgageCalculator : IMortgageCalculator { public ILogger Logger { get; set; } public float Calculate() { Logger.Log("Calculating Mortgage"); return...; }

Export it… Part A [Export(typeof(IMortgageCalculator))] public class SimpleMortgageCalculator : IMortgageCalculator { public ILogger Logger { get; set; } public float Calculate() { Logger.Log("Calculating Mortgage"); return...; }

Import it… Part A [Export(typeof(IMortgageCalculator))] public class SimpleMortgageCalculator : IMortgageCalculator { [Import(typeof(ILogger))] public ILogger Logger { get; set; } public float Calculate() { Logger.Log("Calculating Mortgage"); return...; }

Compose it. Catalogs provide the parts. Catalog

Compose it. Container is the matchmaker. Catalog

Compose it. Container is the matchmaker. Catalog TypeCatalog AssemblyCatalog DirectoryCatalog AggregatingCatalog

Step 1 – MEF Basics

Don’t forget the metadata… Part A [Export(typeof(IMortgageCalculator))] [ExportMetadata(“Calculation”, “Simple”)] [ExportMetadata(“Tax Aware”, null)] public class SimpleMortgageCalculator : IMortgageCalculator { public ILogger Logger { get; set; } public float Calculate() { Logger.Log("Calculating Mortgage"); return...; }

Parts can be lazy… Part A [Import(typeof(ILogger))] public ILogger Logger { get; set; } Part B

Parts can be lazy… Part A Lazy Lazy [Import(typeof(ILogger))] public ILogger Lazy Logger { get; set; }

Step 2 – Metadata and Lazy Evaluation

The slippery slope… Part A [Export(typeof(IMortgageCalculator))] [ExportMetadata(“Calculation”, “Simple”)] [ExportMetadata(“Tax Aware”, null)] [ExportMetadata(“This”, “foo”)] [ExportMetadata(“That”, “bar”)]

The slippery slope… solved Part A [Export(typeof(IMortgageCalculator))] [ExportMetadata(“Calculation”, “Simple”)] [ExportMetadata(“Tax Aware”, null)] [ExportMetadata(“This”, “foo”)] [ExportMetadata(“That”, “bar”)] [Export(typeof(IMortgageCalculator))] [CalcCapabilities( Mode=Complexity.Simple, TaxAware=true, This=“foo”, That=“bar”)]

Step 3 – Strongly-Typed Metadata

The importance of context!

Step 4 – Context Awareness

Lifetime Container Part A Part B Shared Non-Shared

Step 5 – Lifetime

But…… Where are the so-called external dependencies?

.\Extensions CompositionContainer

Step 6 – External Dependencies

The Power of Being Declarative What vs. How

What about System.AddIn?

What about IoC Containers?

What about Hand-Rolled Plugins?

The Problem… Original Software Development Software Maintenance

The Solution… Original Software Development Software Maintenance

Clean Code, Robert C. Martin Working Effectively with Legacy Code, Michael Feathers Refactoring, Martin Fowler Resources