framework design guidelines for brussels users group
DESCRIPTION
Belgium Visual Studio User’s Group on 10 Years of Framework Design GuidelinesTRANSCRIPT
![Page 1: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/1.jpg)
10 Years of Framework Design Guidelines
Brad AbramsProduct Unit ManagerMicrosoft Corporationhttp://blogs.msdn.com/bradaTwitter: @brada
![Page 2: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/2.jpg)
![Page 3: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/3.jpg)
Happy 10 Year Birthday
![Page 4: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/4.jpg)
Joyeux Anniversaire
Happy 10 Year Birthday
![Page 5: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/5.jpg)
Proficiat met je verjaardag
Happy 10 Year Birthday
![Page 6: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/6.jpg)
Member Design
![Page 7: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/7.jpg)
10 years ago….
![Page 8: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/8.jpg)
Communicate via leaving artifacts
Framework Design Artifacts:• Properties• Methods • Events• Constructors
![Page 9: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/9.jpg)
9
Constructors are
Do minimal work in the constructor Be Lazy! Only capture the parameters
public class XmlFile { string filename; Stream data; public XmlFile(string filename) { this.data = DownloadData(filename); }}
public XmlFile(string filename) { this.filename = filename; }
lazy
![Page 10: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/10.jpg)
Properties
Property getters should be simple and therefore unlikely to throw exceptions
Properties should not have dependencies on each other Setting one property should not affect other
properties Properties should be settable in any order
public class ArrayList { public int Count {get;}}
![Page 11: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/11.jpg)
Properties versus Methods
Use a Property: If the member logical attribute of the type
Use a method: If the operation is a conversion,
such as ToString() If the getter has an observable
side effect If order of execution is important If the method might not return
immediately If the member returns an array
![Page 12: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/12.jpg)
EmployeeList l = FillList();for (int i = 0; i < l.Length; i++){ if (l.All[i] == x){...}}
if (l.GetAll()[i]== x) {...}
public Employee[] All {get{}}
public Employee[] GetAll() {}
Moral: Use method if the operation is expensive
Calling Code
Properties and returning arrays
![Page 13: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/13.jpg)
Today…
![Page 14: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/14.jpg)
Extension Methods
namespace MyCompany.StringManipulation {
public static class StringExtensions{
public static bool IsNullOrEmpty(this string s){ return String.IsNullOrEmpty(s);
}
}
}
…
using MyCompany.StringManipulation;
string message= “hello world”;
if(message.IsNullOrEmpty()){
Console.WriteLine(“EMPTY”);
}
![Page 15: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/15.jpg)
Extension methods marry the usability offered by object-oriented APIs with the flexibility of functional APIs.
![Page 16: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/16.jpg)
CONSIDER using extension methods to "add" methods to interfacespublic interface IFoo{ void Bar(string x, bool y); void Bar(string x);}public static class IFooExtensions{ public static void Bar(this IFoo foo, string x){ foo.Bar(x,false); }}
…IFoo foo = …;foo.Bar(“Hi!”);
![Page 17: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/17.jpg)
CONSIDER using extension methods to manage dependencies
Uri uri = “ftp://some.ftp.uri”.ToUri();
// higher level assembly (not mscorlib)
namespace System.Net {
public static class StringExtensions{
public static Uri ToUri(this string s){ … }
}
}
![Page 18: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/18.jpg)
AVOID frivolously defining extension methods, especially on types you don’t own Might add clutter Choose namespaces for sponsor types carefully Remember that not all languages support
extension methods Users will have to use static method call syntax
![Page 19: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/19.jpg)
AVOID defining extension methods on System.Object
// C# declaration of the extension methodpublic static class SomeExtensions{ static void SomeMethod(this object o){…}} ‘ VB will try to find the method at runtime‘ … but extension methods are resolved at‘ compile time.Dim o As Object = …o.SomeMethod() ‘ THIS WILL THROW
‘ VB users will have to call the method using the regular static method call syntax.SomeExtensions.SomeMethod(o)
![Page 20: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/20.jpg)
Type Design
![Page 21: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/21.jpg)
10 years ago….
![Page 22: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/22.jpg)
Framework Design Theater
The Main Character: Bright young developer
The Setting: Her first big project
The Setup: Create a class that models a car
Actions required: Start and Drive
![Page 23: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/23.jpg)
Design Pass One: Meets Requirements
Pass one: meets requirements
![Page 24: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/24.jpg)
Design Pass Two: More than Enough
![Page 25: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/25.jpg)
25
Design Pass Three: Way too much
![Page 26: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/26.jpg)
Time to Ship…
Time to cut…
![Page 27: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/27.jpg)
27
What we ship: Too much and not enough…
![Page 28: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/28.jpg)
V.Next: Worse Yet
Now we want to add Color and Model, and we know exactly how
But it is much harder because the design is half done and mostly wrong
![Page 29: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/29.jpg)
The moral
Do as little as possible now (but no less) to ensure room for extensibility in the future
![Page 30: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/30.jpg)
Abstract and Base classes
Prefer broad, shallow hierarchies Less than or equal to 2 additional levels – Rough
rule! Contracts and responsibilities are difficult to
maintain and explain in deep complex hierarchies
Consider making base classes not constructible (that is, use abstract classes) Make it clear what the class is for Provide a protected constructor for subclasses to
call System.Exception should not have had a public
constructor
![Page 31: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/31.jpg)
Virtual Method Example
public class TheBase : Object {
public override string ToString() {
return “Hello from the Base";
}
}public class Derived : TheBase {
public override string ToString() {
return “Hello from Derived";
}
}
![Page 32: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/32.jpg)
Virtual Methods
What is printed out?
Derived d = new Derived();Console.WriteLine (d.ToString());
TheBase tb = d;Console.WriteLine (tb.ToString());
Object o = tb;Console.WriteLine (o.ToString());
![Page 33: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/33.jpg)
Virtual Methods
They all output “Hello from Derived”. Why? Method call virtualizes at runtime The static type doesn’t matter
This is the danger and power of virtual methods Danger: Owner of base classes cannot control what
subclasses do Power: Base class does not have to change as new
subclasses are created
![Page 34: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/34.jpg)
Overriding: Follow the Contract
Don’t change the semantics of member Follow the contract
defined on the base class
All Virtual members should define a contractDon’t require clients to have knowledge of your overridingShould you call the base?
![Page 35: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/35.jpg)
Virtual and non-virtual
Use non-virtual members unless you have specifically designed for specialization Have a concrete scenario in mind Write the code!
Follow the Liskov Substitution Principle References to base types must
work with derived types without knowing the difference Must continue to call in the same
order and frequency Cannot increase or decrease range of inputs or
output
Barbara Liskov
![Page 36: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/36.jpg)
Interface Usage
No common implementation (the ActiveX problem)
Challenging to version over releases The smaller, more focused the interface the
better 1-2 members are best But interfaces can be defined in terms of other
simpler interfaces
public interface IComparable { int CompareTo(object obj);}
![Page 37: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/37.jpg)
The great proof of madness is the disproportion of one's designs to
one's means. Napoleon Bonaparte
![Page 38: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/38.jpg)
Today…
![Page 39: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/39.jpg)
Type Dependency Management
Careful dependency management is the necessary ingredient to successful evolution of frameworks. Without it, frameworks quickly deteriorate and are forced out of relevance prematurely.
![Page 40: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/40.jpg)
Framework Layering
![Page 41: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/41.jpg)
DO NOT have upward dependencies
BCL
WPF XML
Reflection
AVOID horizontal dependencies
![Page 43: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/43.jpg)
CONSIDER placing library types higher on the dependency stack Definition:
Library types are types that are not passed between components
Examples EventLog, Debug,
Easy to Evolve Leave old in, add new one Beware of duplication!
![Page 44: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/44.jpg)
DO keep primitives policy free (i.e. simple)
Definition: Primitive types are types that are passed between
components and have very restricted extensibility (i.e. no subtype can override any members)
Examples Int32, String, Uri.
Hard to Evolve Little need to Evolve Typically in lower layers
![Page 45: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/45.jpg)
DO NOT create abstractions unless you know what you are doing Definition:
Abstractions are interfaces or classes with unsealed members that are passed between components.
Examples Stream, IComponent
Hard to Evolve Unfortunately, pressure to evolve
![Page 46: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/46.jpg)
Trends
![Page 47: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/47.jpg)
10 years ago….
![Page 48: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/48.jpg)
The Secret of Achiving Great
Productivty A Pit!!
![Page 49: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/49.jpg)
The Pit of Success: in stark contrast to a summit, a peak, or a
journey across a desert to find victory through many trials and
surprises, we want our customers to simply fall into winning practices
by using our platform and frameworks. To the extent that we make it easy to get into trouble we
fail.- Rico Mariani
![Page 50: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/50.jpg)
50
Is using your framework correctly like…
Climbing a mountain?
![Page 51: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/51.jpg)
51
Is using your framework correctly like…
Scaling a peak?
![Page 52: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/52.jpg)
52
Is using your framework correctly like…
Running across a desert?
![Page 53: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/53.jpg)
Is using your framework correctly like…
Falling into a pit?
![Page 54: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/54.jpg)
Make using your framework as easy as falling into a pit –
then you have achived great productivity
![Page 55: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/55.jpg)
Today…
![Page 56: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/56.jpg)
Test Driven Development
Write tests first, design later Requires reusable APIs to be testable:
Avoid heavy dependencies, consider inversion of control.
Consider designing for dependency injection.
![Page 57: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/57.jpg)
Heavy Dependencies and Testability
// your API
public class Tracer {
MessageQueue mq = new MessageQueue(…);
public void Trace(string message){ mq.Send(message);
}
}
// your customer’s program that is hard to test
Tracer tracer = new Tracer();
public void ProcessOrder(Order order){
tracer.Trace(order.Id);
…
}
![Page 58: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/58.jpg)
Inversion of Control
// your better API
public abstract class TraceListener {
public abstract void Trace(string message);
}
public class Tracer {
TraceListener listener;
public Tracer(TraceListener listener){
this.listener = listener;
}
public void Trace(string message){
listener.Trace(message);
}
}
![Page 59: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/59.jpg)
Dependency Injection
// your customer’s program that is easier to test
Tracer tracer = new Tracer(new FileListener());
public void ProcessOrder(Order order){
tracer.Trace(order.Id);
…
}
![Page 60: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/60.jpg)
Dependency Injection Containers
// customer’s program that is even easier to test
Tracer tracer = container.Resolve<Tracer>();
public void ProcessOrder(Order order){
tracer.Trace(order.Id);
…
}
Check out DI Containers (a.k.a. IoC Containers): autofac, Castle Windsor, PicoContainer.NET, Spring.NET, StructureMap, Unity, and others.
![Page 61: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/61.jpg)
Tools
![Page 62: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/62.jpg)
10 years ago….
![Page 63: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/63.jpg)
When you pick up your rental car….
Push the seat all the way back Find an NPR station Find the exit
Read the manual??
![Page 64: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/64.jpg)
Oh, down to lock…
![Page 65: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/65.jpg)
How to use a key…
![Page 66: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/66.jpg)
Oh, you push the PRESS button…
![Page 67: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/67.jpg)
Who actually needs this data?
![Page 68: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/68.jpg)
Why you don’t read rental car manuals ???
You know how to drive your car All cars work basically the same way Your rental car is a car Therefore, you can drive your rental car
That is…
![Page 69: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/69.jpg)
Naming Conventions
PascalCasing – Each word starts with an uppercase letter
camelCasing – First word lower case, others uppercase
SCREAMING_CAPS – All upper case with underscores
![Page 70: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/70.jpg)
Naming Conventions
All types and publicly exposed members are PascalCased
Parameters are camelCased
public class MemberDoc{ public int CompareTo(object value) public string Name { get;}}
![Page 71: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/71.jpg)
Hungarian Notation
Do not use Hungarian notation in publicly exposed APIs and parameter names
public class CMyClass { int CompareTo (object objValue) {..} string lpstrName {get;} int iValue {get;}}
![Page 72: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/72.jpg)
On Abbreviations, acronym, initialism and the like…
Avoid them! They are a classic JLT (jargon loaded term) OK to use them once they become words
Html, Xaml, etc Don’t just spell them out
Use a meaningful name Abbreviations of more than 2 letters are cased
as words, otherwise ALLUPPER IO vs. Html
![Page 73: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/73.jpg)
While we are on naming…
Good naming is hard—it takes time Be meaningful but brief
Use US-English Colour vs. Color
Principle of least surprise Look for prior-art
NumberOfElements vs. Count
![Page 75: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/75.jpg)
Today…
![Page 76: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/76.jpg)
Framework Design Studiohttp://code.msdn.microsoft.com/fds
![Page 77: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/77.jpg)
Dependency Management Toolshttp://code.msdn.microsoft.com/fxarch Define Components
<Group ID=“Component1”><Bin Name=“MyCompany.FeatureA.dll”/><Bin Name=“MyCompany.FeatureB.dll”/>
</Group>
Define Rules <Allow From=“Component1" To=“WPF"/><Deny To=“XMLDOM”>
Run and Get Output:From group Component1: MyCompany.FeatureA.dll should not depend on:
SomeOtherComponent SomeOtherComponent.dll
Also check out NDepend – a tool for visualizing dependencies.
![Page 78: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/78.jpg)
Summary
10 years of Framework design.. Core Principles of Framework design have
stayed the same There are some significant new advances
Check out the new book!
Brad Abramshttp://blogs.msdn.com/bradaTwitter: @brada
![Page 79: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/79.jpg)
Q&A
![Page 80: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/80.jpg)
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
![Page 81: Framework Design Guidelines For Brussels Users Group](https://reader034.vdocuments.us/reader034/viewer/2022051609/546320fdb4af9f671c8b4abc/html5/thumbnails/81.jpg)