MEF for Beginner (repeatable metadata) – part 9

2010/01/29

MEF for Beginner (repeatable metadata) - part 9 this is the 9th post of the MEF for Beginner series, the series TOC is available here. this post will focus on having repeatable metadata definition (cases like definition of multiple categories). if you not familiar with the MEF metadata concept you may want to read part 8.  Bad practice for repeatable metadata In order to explain repeatable metadata, we will start by decorating export with untyped metadata declaration (which consider as bad practice, use typed metadata whenever you...

MEF for Beginner (Metadata) – part 8

2010/01/20

MEF for Beginner (Metadata) - part 8   this is the 8th post of the MEF for Beginner series, the series TOC is available here.   this post will focus on the basics of MEF metadata capabilities, the next post discuss the ability of multiple metadata decorations.   What is Metadata? metadata is piece of compile-time information that can be attached to exported part. metadata is adding peripheral information to the part, (metadata information may define which operation system supported by...
one comment

Changes in the CLR 4.0 security model

2010/01/19

Changes in the CLR 4.0 security model   The CAS (Code Access Security) model of the .NET is changing in CRL 4.0. in general Microsoft has obsolete many of the CAS operations, simplify the access to security related information, and omitting the support for having security restriction at the assembly level (security restriction will solely manage by the AppDomain sandbox).   using obsolete APIs result with warning at the compilation and exception at run-time. in general you should be suspicious of any APIs that getting Evidence parameter...
tags: ,
no comments

MEF for Beginner (Recomposition policy) – part 7

2010/01/15

MEF for Beginner (Recomposition policy) - part 7       this is the 7th post of the MEF for Beginner series, the series TOC is available here.   the current post will focus on the recomposition policy.   What is the recomposition policy? by default the composition should assign the Import only once (trying to recompose on already composed import will result with exception). using the recomposition policy we can define that our Import is allowing reassignment whenever the container is having...
5 comments

MEF for Beginner (Part Creation Policy) – part 6

2010/01/09

MEF for Beginner (Part Creation Policy) - part 6 this is the 6th post of the MEF for Beginner series, the series TOC is available here.   this post and a few that will follow will cover some of the policies options available with MEF. we will start with the instantiation policy.   How do we define policy? we will define policy as instruction that will guide behavioral decisions that related to the compose-able parts (the imported and exported parts behaviors). ...
3 comments

MEF for Beginner: TOC

MEF for beginner is a blog series for developers that want to learn How To use the MEF (Manage Extensibility Framework) technology.   the following post is currently available for this series: Concept How To build your first MEF application Hello Silverlight A-sync Silverlight loading Import  Part Creation policy Recomposition policy  Metadata (part 1)  Metadata (part 2 – repeatable) Catalogs  Import from Xaml  Deployment Catalog   ...

Secured directory catalog

2010/01/07

Secured directory catalog   I was discussing the question of how to secure your MEF application on this post  where I was publishing replica of the MEF bits hopping that the Secured Directory Catalog will find its way into the MEF core.   but as sad as it is :(, it won't make into the core. you can read more about the MEF team consideration here.   anyway Glenn Block has suggest a solution for haw to build the secured catalog without rewriting half of the...
no comments

MEF for Beginner – Part 5 (Import)

2010/01/02

MEF for Beginner – Part 5 (Import) this is the 5th post on MEF for beginner series, you can see the previous post here, here and here. this post will focus on the Import aspect. we will soon learn about the different signature that can be apply with the Import decoration, but before starting with that, we should introduce the Lazy<T> class which is a first citizen at the MEF world, and part of the CLR 4 types.   Lazy<T> definition Lazy<T> is used in order of delaying the actual...
2 comments

Securing the MEF Directory Catalog

2010/01/01

Securing the MEF Directory Catalog   during my MEF lecture, on of the attendant (a fellow from check-point) ask the following question: "How can we secure our catalog?"   this is a really good point, because without securing our catalog, hackers can exploit our extensibility model for injecting malicious code.   so can we defend our MEF gates? the short answer is yes. and the long one is yes but…   Secure techniques I will mention 3 techniques, each defend our...
2 comments