DCSIMG
February 2010 - Posts - Bnaya Eshet

Bnaya Eshet

Disclaimer

February 2010 - Posts

Rx - for beginners (part 5): marble diagrams, select and where

Rx - for beginners (part 5): marble diagrams, select and where

this post is the 5th in a series of posts about the new Reactive Framework (Rx).

the series TOC can found here.

 Rx, IObservable,IObserver

this post will focus on marble diagrams which is used for visualizing IObservable stream.

on this post we will visualize the select and where clause, while in the

upcoming posts we will discuss other operations that can be

used to upon IObservable streams.

 

the code sample for this post is available here.

 

What should we visualize?

the event stream should visualize the following:

  • on next
  • on error
  • on complete

Rx, IObservable,IObserver

Rx, IObservable,IObserver

 

How should we read the diagram?

marble diagram can have one or more horizontal line.

  • each horizontal line present the timeline of single IObservable stream.
  • the ellipse present single occurrence of new value event (on next).
  • the vertical line present the end of the stream sequence (on complete). 
  • the X sign present exception (on error).

 

The hidden assumption used by the Rx framework is that the IObservable stream

should stop either on complete or on error.

 

How can we draw select clause using the marble diagram?
Code Snippet
  1. // Create IObservable that has increasing long value each second
  2. var timeStream = Observable.Interval(TimeSpan.FromSeconds(1));
  3.  
  4. // invert the timeStream stream using Linq statement
  5. var negativeTimeStream = from value in timeStream
  6.                          select -value;
  7.  
  8. negativeTimeStream.Subscribe(value => Console.WriteLine(value));

line 2, creating IObservable stream that increment the projected value each second.

line 5, is using Linq statement to convert the stream into negative value.

line 8, subscribe to the stream and write it to the console.

the result is shown in the following image.

Rx, IObservable,IObserver 

 

the marble diagrams for the above snippet will look like the following diagram:

Rx, IObservable,IObserver

the marble diagrams show the construction of new IObservable stream using the select operation.

the vertical arrow present the transition from the source stream into the destination stream.

 

as the case with IEnumerable the select statement is extension method which

can be used on any IObservable stream, we will get same result for the following code:

Code Snippet
  1. var negativeTimeStream = timeStream.Select(value => -value);

 

Where clause marble diagram?

the where clause of the following snippet:

Code Snippet
  1. // taking only even values
  2. //var evenTimeStream = timeStream.Where(value => value % 2 == 0);
  3. var evenTimeStream = from value in timeStream
  4.                      where value % 2 == 0
  5.                      select value;

will be present:

Rx, IObservable,IObserver

 

Summary

marble diagrams is how stream manipulation can be visualize.

we already surveyed the select and where operations, and we will continue

with other operation in the upcoming posts.

 

Code Samples

the code sample for this post is available here.

 

תגים של Technorati:‏ ,,

 

kick it on DotNetKicks.com


Rx - for beginners (part 4): anonymous observer handler

Rx - for beginners (part 4): anonymous observer handler

this post is the 4th in a series of posts about the new Reactive Framework (Rx).

the series TOC can found here.

 

this post will focus on anonymous observer handler.

Rx, IObserver, IObservable

the code sample for this post can be download from here.

 

Anonymous Observer

as we mention on the previous posts, IObserver is used as a callback interface

which can be subscribe to the IObservable,

but this is a bit of overkill, when what we subscribe is relatively small (like Console.Write).

wouldn't it be nice to use Lamda expression instead?

doesn't we want to have something similar to button1.Click += (s,e)=>Console.WriteLine(…); .

 

IObservable extensions

using Lamda expression syntax in order to subscribe delegate into the IObservable is

available because IObservable got the following extension options for its Subscribe method

(under the hood we are speaking about extension methods).

  • Action<TSource> onNext
  • Action<TSource> onNext, Action onCompleted
  • Action<TSource> onNext, Action<Exception> onError
  • Action<TSource> onNext, Action<Exception> onError, Action onCompleted

so assuming we got IObservable instance called foo, the following code is perfectly OK:

  1. IDisposable unsubscribe = foo.Subscribe(value => Console.WriteLine(value));

for simple subscription only for the on next callback.

subscribing both for on next and on error will look as follow:

  1. IDisposable unsubscribe = foo.Subscribe(
  2.     value => Console.WriteLine(value),
  3.     exc => Console.WriteLine(exc));

what is actually happens is that under the hood the subscribe method creating

instance of IObserver, attaching the delegate, and hand it to the IObservable subscribe method.

 

Code Sample

I took the previous post's sample, which look as follow:

Code Snippet
  1. class Program
  2. {
  3.     static void Main(string[] args)
  4.     {
  5.         var obs = new Observer();
  6.         var observable = new FakeObservableFeeder();
  7.         IDisposable unsubscribe = observable.Subscribe(obs);
  8.         Console.ReadKey();
  9.         unsubscribe.Dispose();
  10.     }
  11.     private class Observer : IObserver<int>
  12.     {
  13.         void IObserver<int>.OnCompleted()
  14.         {
  15.             Console.WriteLine("Done");
  16.         }
  17.         void IObserver<int>.OnError(Exception exception)
  18.         {
  19.             Console.WriteLine("Error: " + exception.Message);
  20.         }
  21.         void IObserver<int>.OnNext(int value)
  22.         {
  23.             Console.WriteLine(value);               
  24.         }
  25.     }
  26. }

you can see at line 11, that we implementing IObserver with code one line

for each methods (Console.WriteLine ).

and at line 7, we subscribing this observer into the IObservable instance.

 

Code Sample using anonymous observer

this can be match simpler using anonymous observer, as shown in the following snippet:

Code Snippet
  1. class Program
  2. {
  3.     static void Main(string[] args)
  4.     {
  5.         var observable = new FakeObservableFeeder();
  6.         // subscribing handlers (Anonymous observer)
  7.         IDisposable unsubscribe = observable.Subscribe(
  8.             value => Console.WriteLine(value),
  9.             exc => Console.WriteLine(exc),
  10.             () => Console.WriteLine("Done"));
  11.         Console.ReadKey();
  12.         unsubscribe.Dispose();
  13.     }
  14. }

definitely less code was written.

you can see the subscription at line 7.

  • line 8, is handling the on next action.
  • line 9, is handling the on error action.
  • line 10, is handling the on complete action.

 

Summary

what we have seen is that simple action can be subscribed using anonymous observer handlers.

 

תגים של Technorati:‏ ,,

 

kick it on DotNetKicks.com


MEF Preview 9 released

MEF Preview 9 was released

 

MEF preview 9 changes will be reflected the in the release of .NET 4.0 and Silverlight 4.0.

 

except from bug fixing, there was some changes to the API,

most of the changes is related to  System.ComponentModel.Composition.Initilization.dll,

which is not yet available only for none Silverlight application :-(

 

here is a short list of API changes:

  • PackageCatalog were brought back, and changed it name to DeploymentCatalog.

  • PartCreator was renamed to ExportFactory.

  • PartInitializer was renamed to CompositionInitializer

  • CompositionHost.InitializeContainer was renamed to CompositionHost.Initialize

i do hope that the System.ComponentModel.Composition.Initilization.dll will finally find it place

into the CLR 4.0 release.

 

you can download it from the MEF codeplex.

 

the information was taken from Wes' Puzzling Blog.

 

UPDATES:

From: Glenn block

Unfortunately we will not be shipping CompositionInitializer / Host as part of .NET 4.0. .NET 4.0 and SL are on different ship cycles and the desktop locked long before we had the functionality in SL. We will do an OOB release on codeplex for desktop. I currently have an early version on my SkyDrive, but we will get bits updated for codeplex. The plan is to role CI into the desktop in the future.

 

תגים של Technorati:‏ ,,,,,


Rx - for beginners (part 3): IObservable Vs. IEnumerable

Rx - for beginners (part 3): IObservable Vs. IEnumerable

this post is the 3rd in a series of posts about the new Reactive Framework (Rx).

the series TOC can found here.

this post will focus on how exactly the IObservable/IObserver mirror IEnumerable/IEnumerator.

 1266073365_kghostview 

IEnumerator operations

IEnumerable expose the following operations:

Code Snippet
  1. public interface IEnumerator<T> : IDisposable, IEnumerator
  2. {
  3.     T Current { get; }
  4. }
  5.  
  6. public interface
  7. {
  8.     object Current { get; }
  9.     bool MoveNext();
  10.     void Reset();
  11. }
  • Move next: indicate whether the operation completed
    (no more item available on the item source).
    and it may also throw Exception if something have got wrong.
  • Current: is handing the current item.
  • Reset: is restarting the iteration.

 

IObserver mirrored operations

IObserver is mirroring IEnumerator, instead of asking the IEnumerator,

IObserver will tell you what's is happening.

this is known as "don't call us we will call you" :-)

Code Snippet
  1. public interface IObserver<T>
  2. {
  3.     void OnCompleted();
  4.     void OnError(Exception exception);
  5.     void OnNext(T value);
  6. }

the IObserver is actually a callback interface which will be called by the items feeder,

whenever something occurs.

  • On complete: is mirroring move next, by notifying that the feeding source
    has no more items.
  • On error: is also mirroring move next, but this time it mirror the move next throw exception behavior.
  • On next: is mirroring the current property, by pushing new value into
    the the observer OnNext implementation.
  • because of the push nature of the IObserver the reset does not mirrored.

 

IEnumerable Operations
Code Snippet
  1. public interface IEnumerable<T> : IEnumerable
  2. {
  3.     IEnumerator<T> GetEnumerator();
  4. }

IEnumerable has one method that return IEnumerator with can be use

to iterate through the items by pulling the items sequentially.

 

IObservable mirrored operations
Code Snippet
  1. public interface IObservable<T>
  2. {
  3.     IDisposable Subscribe(IObserver<T> observer);
  4. }

  • through IObservable we can subscribe to content feeders by handing
    implementation IObserver, then the feeder can use the IObserver interface
    for each of the operation we discussed earlier.
  • the subscribe operation return IDisposable  instance that is used
    for unsubscribe the observer from the feeder.
    this is match safer then using unsubscribe method because it doesn't has side effects, 
    just think of what's happens when you subscribe anonymous delegate

    in fact the disposable instance is mirroring IEnumerator<T> which is inheriting from IDisposable.

 

Summary

by mirroring IEnumerable/IEnumerator, IObservable/IObserver can change the data

flow direction from pull to push.

 

Code Sample

you can find code sample that implement simple scenario of feeder

that feed increasing integer sequence as long as the integer value is below 100.

the solution contain 2 projects, one implement the scenario using enumerable and the

other is using observable.

the code sample can be download from here.

 

תגים של Technorati:‏ ,,

 

kick it on DotNetKicks.com


Rx - for beginners TOC

Rx - for beginners TOC

 

Reactive Framework (Rx) for beginners:
Also available

 

תגים של Technorati:‏ ,,

 

kick it on DotNetKicks.com


Rx – Code cartoon

Rx – Code cartoon

 

the following cartoon emphasis the Rx – IObservable push nature against the

pull nature of IEnumerable.

 

image image

 

Summary

Reactive approach can reduce your phone bill :-)

 

 

תגים של Technorati:‏ ,,

 

kick it on DotNetKicks.com


Rx - Reactive Extension – for beginners (part 2)

Rx - Reactive Extension (part 2)

this post is the second in a series of posts about the new Reactive Framework (Rx).

the previous post discuss the concept of Rx (Reactive Framework Extension),

this post will focus on some basic practice.

 Rx, reactive framework, IObservable, IObserver

In this post we will create small WPF application that got images from different

image feeds providers (the source code can be found here).

 

Application layout

The application layout is described in the following diagram.

Rx, reactive framework, IObservable, IObserver

 

the image data will be pushed into the PhotoDataSourceProvider class which implement IObserver.

Code Snippet
  1. public class PhotoDataSourceProvider : DataSourceProvider, IObserver<ImageData>
  2. {
  3.     ...
  4. }

the class will take the pushed data and expose it to the UI through the DataSourceProvider overrides.

DataSourceProvider is used as mediator between the UI and the Feeders in order to make the UI data thread safe.

In short the IObserver is where the data get pushed.

 

The feeders implement IObservable

Code Snippet
  1. public abstract class ImageFeederBase: IObservable<ImageData>
  2. {
  3.     public IDisposable Subscribe(IObserver<ImageData> observer)
  4.     {
  5.       ..
  6.     }
  7. }

all feeders inherit from ImageFeederBase.

IObservable expose the Subscribe method, which can be use for subscribing the

PhotoDataSourceProvider (because it is an observer).

 

this is how the PhotoDataSourceProvider constructor look like:

Code Snippet
  1. public PhotoDataSourceProvider()
  2. {
  3.     var picasaFeeder = new PicasaImageFeeder();
  4.     picasaFeeder.Subscribe(this);
  5.     var flickrAircraftFeeder = new FlickrImageFeeder("Aircraft");
  6.     flickrAircraftFeeder.Subscribe(this);
  7.     var flickrFlowerFeeder = new FlickrImageFeeder("Flower");
  8.     flickrFlowerFeeder.Subscribe(this);
  9.     var flickrSmileyFeeder = new FlickrImageFeeder("Smiley");
  10.     flickrSmileyFeeder.Subscribe(this);
  11.     var fileSystemJpgFeeder = new FileSystemImageFeeder("*.jpg");
  12.     fileSystemJpgFeeder.Subscribe(this);
  13.     var fileSystemPngFeeder = new FileSystemImageFeeder("*.png");
  14.     fileSystemPngFeeder.Subscribe(this);
  15. }

it subscribing itself for different feeders.

then whenever the feeder Has new image, Complete or Has Error

the PhotoDataSourceProvider will be notify through it IObserver implementation.

Code Snippet
  1. void IObserver<ImageData>.OnCompleted()
  2. {
  3.     ...
  4. }
  5. void IObserver<ImageData>.OnError(Exception exception)
  6. {
  7.     ...
  8. }
  9. void IObserver<ImageData>.OnNext(ImageData value)
  10. {
  11.     ...
  12. }

 

Summary

the Rx is using the IObservable and IObserver in order to formalize push based operation.

the IObservable is the push supplier, while the IObserver is the push target.

IObserver can be subscribe to one or more IObservable.

 

Source Code

the source code can be found here.

 

תגים של Technorati:‏ ,,

 

kick it on DotNetKicks.com


Rx - Reactive Extension – for beginner (part 1)

Rx - Reactive Extension (part 1)

Rx, reacrive , IObservable, IObserver

this post is the first in a series of posts about the new Reactive Framework (Rx).

 

What is the Reactive Framework Extension?

the Rx formalize the push based programming pattern.

it is dealing with event like collection, in manner that can be describe as the mirroring of IEnumerable<T>.

 

How does it mirror the IEnumerable<T>?

the Rx framework most fundamental interface are,

IObservable<T> which is mirroring IEnumerable<T>.

Code Snippet
  1. // Summary:
  2. //     Represents a push-style collection.
  3. public interface IObservable<T>
  4. {
  5.     // Summary:
  6.     //     Subscribes an observer to the observable sequence.
  7.     IDisposable Subscribe(IObserver<T> observer);
  8. }

and IObserver<T> which is the mirroring IEnumerator<T>

Code Snippet
  1. // Summary:
  2. //     Supports push-style iteration over an observable sequence.
  3. public interface IObserver<T>
  4. {
  5.     // Summary:
  6.     //     Notifies the observer of the end of the sequence.
  7.     void OnCompleted();
  8.     //
  9.     // Summary:
  10.     //     Notifies the observer that an exception has occurred.
  11.     void OnError(Exception exception);
  12.     //
  13.     // Summary:
  14.     //     Notifies the observer of a new value in the sequence.
  15.     void OnNext(T value);
  16. }

 

actually we getting formalized pattern for push collection (collection that may be endless)

which can push data into our IObserver<T> instance.

on of the benefit of this formalization is that we can use Linq query upon that push collection.

we will discuss IObservable<T> and IObserver<T> in more details on the following post of this series.

 

Interactive Vs. Reactive (pull Vs. Push)

we will discuss Interactive (IEnumerable<T>) Vs. Reactive (IObservable<T>) paradigms

by using journal reading analogy.

let say that you do like to read several journals at your home each day.

before the reading part the journals should reach your home.

you do have 2 options (Interactive or Reactive approach):

 

  • Interactive: going each day to the nearby store (or several stores in
    case that the nearby store does not have all of your favorite journals), collect the journals,
    wait on the payment queue, pay for it and return home for reading.

Rx, reacrive , IObservable, IObserver

 

  • Reactive: subscribe to journal delivery service which will send the journals to
    your door front each day.

Reactive Extensions for .NET (Rx)

 

Summary

the Reactive model is more native for parallel computing

and it can save the collecting time:

  • go to the store
  • wait on the payment queue (in the software world waiting for blocking threads)

in the next pasts we will discuss more benefit, scenarios and techniques.

 

How to get started?

in order of start using the Rx you have to download the library from here (it is available both for framework 3.5 and 4.0).

then you have to add reference to System.Reactive

 

 


kick it on DotNetKicks.com


Catalogs (code cartoon)

Catalogs (code cartoon)

catalog are search boundary for the composition container.

MEF, Catalog, export, import,extensibility, ioc

 

 

 

MEF, Catalog, export, import,extensibility, ioc, composition

 

you can read more about MEF on MEF for beginner series, the TOC is available here

 

תגים של Technorati:‏ ,,,


MEF for Beginner (Catalogs) - part 10

MEF for Beginner (Catalogs) - part 10

this is the 10th post of the MEF for Beginner series, the series TOC is available here.

this post will focus on Catalogs.

 MEF, export, import, importmany, extention, ioc, catalogs, composition

What is MEF Catalogs?

MEF container is using catalogs as its search area definition.

the catalog have instructions about where can MEF look for

the compose-able parts (import and export definitions).

in short catalogs are actually a discovery instruction.

 

Out of the box catalogs

MEF is shipping with the following out of the box catalogs:

Code Snippet
  1. var typeCat = new TypeCatalog(typeof(IFoo));
  2. var asmCat = new AssemblyCatalog(typeof(Program).Assembly);
  3. var dirCat = new DirectoryCatalog("US", "*.dll");
  4. var aggCat = new AggregateCatalog(typeCat, asmCat, dirCat);
  5. var container = new CompositionContainer(aggCat);
  6. container.Compose(...);
  • TypeCatalog (line 1) define that specific types should includes in the discovery process.
  • DirectoryCatalog (line 2) instruct the discovery process to search for compose-able pars
    within specific assembly.
  • DirectoryCatalog (line 3) is the most common used catalog, which instruct MEF to
    search for compose-able parts within assemblies under specific directory using search pattern ("*.dll").
  • AggregateCatalog (line 4) is aggregation of different catalogs instances.
    this catalog enable to add and remove catalogs at runtime.

 

UPDATE

Silverlight (CTP 9) introduce new catalog named DeploymentCatalog which should replace the PackageCatalog.

my next post will discuss more on this topic (soon).

Silverlight is adding the PackageCatalog which is searching within assemblies which include

in the package.

the following snippet demonstrate the Silverlight PackageCatalog:

Code Snippet
  1. var catalogs = new PackageCatalog();
  2. catalogs.AddPackage(Package.Current);
  3. var container = new CompositionContainer(catalogs);
  4. container.Compose(...);

as you can see the PackageCatalog can include multiple packages.

 

Summary

The catalogs use to define the search boundary of the composition container discovery process.

different catalogs can be use for different boundary ranges.

 

Samples

each of the previous parts of this series contains samples which is using catalogs

you can explore the previous parts from the TOC.

 

 


kick it on DotNetKicks.com


does MEF apply the SOA paradigm?

does MEF apply the SOA paradigm?

 

in this post I'm going to argue that the Manage Extensibility Framework (MEF),

is actually applying to the 4 tenet of Service Orientation Architecture (SOA),

therefore MEF is actually, in-process implementation of the SOA paradigm.

 

Background

when we speaking about SOA we used to think about technologies like web services and WCF,

which is cross process technologies.

but does SOA define that services should always be consumed from the clouds?

local services like loggers, rule engine, cache and more are everyday practice for in-process services.

 
What make your architecture, service oriented?

different architect having different opinions of how to construct SOA architecture,

but most of them agree that SOA design should apply to the 4 tenets of SOA.

 

The 4 tenets of SOA

 MEF, Catalog, Extensibility, Import,Export Service should have Explicit Boundaries.

1264406391_Gear  Service should be Autonomous.

1264403639__bedingungen Service API should rely on Contract.

 1264404491_diagram_v2-26 Service behavior and compatibility should rely on Policy.

 

How MEF apply to the 4 tenets?

 MEF, Catalog, Extensibility, Import,Export MEF boundaries define explicitly by the Export definition.

1264406391_Gear  separating exports into separate dlls will create autonomous unit which has no need

for any reference but the reference for the services contract.

1264403639__bedingungen Imports does not aware of the actual implementation, imports are solely relay on the contract

(composition will find export that mach the import contract).

 1264404491_diagram_v2-26 MEF has different policies mechanism like metadata, creation policy,

instantiation policy, recomposition.

 

Summary

despite MEF being an in-process technology it does apply to the 4 tenet of SOA,

therefore it can consider as such.

 

תגים של Technorati:‏ ,,,


CLR 4.0 tip (Strong Name)

CLR 4.0 tip (Strong Name)

1264355035_binary

CLR 4.0 come with some changes of the security API.

one useful new API is a new way of getting evidence without iteration loop.

 

and this is how it look:

Code Snippet
  1. StrongName sn = typeof(Program).Assembly.Evidence.GetHostEvidence<StrongName>();


Posted: Feb 05 2010, 09:42 PM by bnaya
תגים:, , ,

CLR 4.0 transparent security

CLR 4.0 transparent security

security CLR 4.0 .NETCLR 4.0 come with some changes to the security model.

in general the CLR 4.0 no longer assume the sandbox for the application.

 

you can still sandboxed your AppDomain and the CLR 4.0 will onerous that sandbox,

but running the same exe from local computer or from network shared folder

won't grant the exe different privileges (sandbox).

 

as result the security setting goes back into the administrators hands,

as it was before the .NET era and application restriction will be define equally

for both manage and unmanaged code.

the security is back again done at the OS level.

 

what you should be aware of the the transparent code concept,

and that security is no longer can be define at the assembly level (all the definition should done at the AppDomain level).

 

Transparent code concept

the analysis of .NET fundamental operation observe that there are only 2 operation which are dangerous:

  • unverifiable code
  • calling unmanaged code (P-Invoke / COM)

potentially harm operations define as security critical, and cannot be invoke directly from security non critical (transparent) code.

if non security critical (transparent) code need access for security critical operation,

it should do so by calling security safe critical operation (which play the role of the man in the middle).

 

this exactly what happens when you need to persist data into file

using in-browser Silverlight application,

the file open define as security critical so you have no direct access to this operation,

and the isolated storage defined as security safe critical, so it give you indirect

access to the security critical file open but only to restricted file paths.

security CLR 4.0 .NET

 
Code snippet

you can get the code snippet from here.

Code Snippet
  1. [assembly: AllowPartiallyTrustedCallers]
  2. [assembly: SecurityRules(SecurityRuleSet.Level2)]
  3. namespace TransparentSecurity
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             var criticalFoo = new CriticalFoo();
  10.             try
  11.             {
  12.                 criticalFoo.DoDangerousOperation(AppDomain.CurrentDomain.BaseDirectory);
  13.             }
  14.             catch (Exception ex) { Console.WriteLine(ex.Message); }
  15.  
  16.             try
  17.             {
  18.                 criticalFoo.DoSafeOperation(AppDomain.CurrentDomain.BaseDirectory);
  19.             }
  20.             catch (Exception ex) { Console.WriteLine(ex.Message); }
  21.        }
  22.     }
  23.  
  24.     public class CriticalFoo
  25.     {
  26.         [SecuritySafeCritical]
  27.         public void DoSafeOperation (string path)
  28.         {
  29.             var prm = new FileIOPermission(FileIOPermissionAccess.AllAccess, path);
  30.             prm.Demand();
  31.             DoDangerousOperation(path);
  32.         }
  33.  
  34.         [SecurityCritical]
  35.         public void DoDangerousOperation (string path)
  36.         {
  37.             Console.WriteLine(path);
  38.         }
  39.     }
  40. }

line 1: by default your code consider security critical unless you decorate it with [AllowPartiallyTrustedCallers] attribute.

line 2: setting the security rules to level 2, is the default CLR 4.0 security model (level 1 is CLR 2 backward compatibility).

line 34: decorate the method as security critical (therefore it can be assessed only by security critical or security safe critical operations).

line 12: this invocation won't succeed because security non critical (transparent) operations cannot access security critical operations.

line 26: decorate the method as security safe critical (so this code can target security critical operation and be target by
             security non critical code).

lines 29,30: restrict the access using demand for file permission to the specific folder.

 
Summary

CLR 4.0 security model is taking one step back from absolute security management,

and one step to the to the side and forward by giving us more simple and understandable security model.

the transparent model dose not restrict malicious code from accessing critical operation,

(because the malicious code can be decorate with security safe critical), what it does is helping the

CLR to put it's security focus on the dangerous code section.

 

Point of interest

you can learn more about the CLR 4.0 security concepts on this video by Shawn Farkas.

 

תגים של Technorati:‏ ,,

 


kick it on DotNetKicks.com