DCSIMG
DEV - Bnaya Eshet

Bnaya Eshet

Disclaimer

Browse by Tags

All Tags » DEV (RSS)
EF 6: Async
EF 6: Async this post is the first in a series about what's new in EF 6 . great improvements are about to come with Entity Framework 6 . it is a major release and the first one since EF become an open source. each post in the series will be dedicate to a single feature. this post will focus on a new EF a-sync features. the first question that should be asked is, why do we need parallel data access ? moreover why do we need a dedicate parallel data access API , rather then using the TPL Task.Run...
Parallel and The C# Memory Model
Parallel and The C# Memory Model Parallel programming can be tricky , both compiler and CPU's optimization can lead into a twilight zone's debugging. lets take the following code snippet snippet: Code Snippet class Program { static void Main( string [] args) { Console .WriteLine( "Start" ); var u = new Util (); u.Exec(); Console .ReadKey(); } } public class Util { private bool _stop = true ; public void Exec() { Task t = Task .Run(() => { bool b = true ; while (_stop) { b = ...
Immutable Collections
Immutable Collections Immutability is a pattern which is suit well parallel programming , but you have to be aware of a potential memory pressure risk when it's not implemented right or used wisely. this post will cover a new BCL library (still in its preview stage) which is targeting immutable collections . .NET is already having Concurrent implementation for Queue, Stack, Bug and Dictionary, which is thread-safe , but other type of collection like List is missing. another type of collection...
MEF 2.0 - mini series: part 8 (Composition options and exception handling)
MEF 2.0 - mini series: part 8 (Composition options and exception handling) this is the last post in the MEF 2.0 mini series. you can see other posts of this series in here . this post will wrap-up the series with a quick survey to to the to some changes made for the underline composition process. Exception one of the most painful experience of MEF 1 was its misleading exception's description . some time it was really hard to figure out the exception roots.  you can read more about MEF 1...
The problem of animals and foods
The problem of animals and foods this is a short post that is dealing with a classic riddle. I was thinking on this riddle when I was trying to figure out a Scala feature. we are having (at Sela Group) a small Scala study group led by Israel Tabadi and while we were going over Scala's abstract type (which is by the way a cool implementation) I was thinking about the .NET equivalent solution. I will use the problem of " animals and foods " (taken from here ) as an anchor's point...
MEF 2.0 - mini series: Part 7 (Catalog filter and Deep hierarchic scoping)
MEF 2.0 - mini series: Part 7 (Catalog filter and Deep hierarchic scoping) this is the 7th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in the previous post I was talking about composition scoping and lifetime management. on this one, I will extend the composition scoping topic toward hierarchic along with catalog filtering capability. hierarchic scoping is not trivial, you must understand the hierarchic behavior and what it was design for. MEF hierarchic...
This Week On Channel 9
This Week On Channel 9 my blog was manage to get on Channel 9 week's top developer news .
MEF 2.0 - mini series: part 6 (Composition scoping and lifetime management)
MEF 2.0 - mini series: part 6 (Composition scoping and lifetime management) this is the 6th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will cover a new concept of scoping and part lifetime management , which is a great improvement over MEF 1. MEF 1 was coming with a fairly naïve lifetime management . part's lifetime could be either shared or non-shared ( you could also apply 'any' but eventually 'any' will be created...
MEF 2.0 - mini series: part 5 (Fluent export properties)
MEF 2.0 - mini series: part 5 (Fluent export properties) this is the 5th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will cover the fluent property's export . Exporting properties is a less known feature of MEF . MEF 1 was supporting this feature by using the attribute model. you could decorate a property with a [Export] attribute and then it become available for imports. the following code demonstrate property exporting in MEF...
Open House at Microsoft
Open House at Microsoft yesterday I was lecturing at Microsoft about VS 2012, .NET 4.5, async/await, Rx and TPL Dataflow. there was 90 people attended and I hope that everybody has learn something new. the code sample for this lecture available here .
Async and AggregateException
Async and AggregateException this post is a complementary to Eran Stiller's post . I was reading Eran Stiller's post about exception handling using async methods and I want to add a few side notes. 1) the exception handling behavior decisions is well documented in this post (by the TPL team), it decided after they had consider different options. 2) I was suggesting that compiler will check whether the a catch of AggregateException is implemented and if so to avoid the unwrapping behavior...
MEF 2.0 - mini series: part 4 (Fluent Import)
MEF 2.0 - mini series: part 4 (Fluent Import) this is the 4th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will discuss the Fluent import API . we was talking about Fluent Export and Constructor Injection in the previous posts. this post will complete the main scenarios of Import's fluent API . I will demonstrate the import technique using the following classes: Code Snippet public class Foo { public Logger Log { get ; set ; } ...
MEF 2.0 - mini series: part 3 (Fluent import constructor)
MEF 2.0 - mini series: part 3 (Fluent import constructor) this is the 3rd post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will discuss the fluent constructor injection API . Constructor Injection the following code is having a Logger and Worker class which is having 2 constructor (one has no parameters and the other is getting ILogger ): Code Snippet public class Logger : ILogger { public void Write( string message) { /* ... */} } public...
MEF 2.0 - mini series: part 2 (Fluent and Conventional Export)
MEF 2.0 - mini series: part 2 (Fluent and Conventional Export) this is the second post in the MEF 2.0 mini series. you can see the following TOC for more. in this post I will start to cover the fluent discovery model and the idea of discovery by convention . traditionally , out of the box, MEF come with a single discovery model , which was the Attribute model . it is true that you could extend MEF's discovery model by using either a custom catalog or a custom export provider , but this task wasn't...
MEF 2.0 - mini series: part 1 (Open Generics)
MEF 2.0 - mini series: part 1 (Open Generics) this is the first post of a new mini series about MEF 2.0 . MEF 2.0 is a reflection of a community requests. features like Open Generics , fluent and conventional discovery , lifetime handling of the part , better exception handling and more, was all requested by the community. each post of this mini series will target a single enhancement. Open Generics one of the most annoying missing feature in MEF 1 was the lack of support for Open generics. the following...
More Posts Next page »