Its already tuesday night to write a blog about last weeks Tech Ed 2011, but I remember each and every moment of the event so much. Microsoft Tech Ed is free for us (MVP) but paid for rest of the people. If you missed out this, you might like reading this post about it. In this post, I will cover some of the interesting facts points that TechEd showed us.

1. Connect

Tech Ed is a place where we connect with people. Being an Microsoft MVP, it is important for me to get in touch with other MVP's so that I could know the people who are experts in their respective field of interests. I am a bit nervous on the first day when I visited the Venue. Nice to see there is a special registration stall available only for us.

Well, if you are working with WPF or silverlight, and in VS 2008, I think you would have definitely found this issue or will find it sooner.

Most of us when dealing with WPF applications must have been using MVVM pattern where you want to completely separate the presentation layer into a View Models. Well, it would be hard to create MVP or MVVM pattern yourself in other applications, but WPF has inbuilt support of MVVM with Command interfaces and Binding. Binding is the concept which lets you to update the control whenever the underlying data object is modified and vice versa.

Most of the controls works great with Binding and hence can easily be used with MVVM pattern, but RadioButton has serious issue with it. In this post I will describe the problem with Radios and define some of the ways to solve it.

If you are looking already at my internal series, you must by now know what does an entry from Internal series means. Yes, In each of those articles, I have tried to at least give some basic idea about the usage and later tried to show you some of the internal process that is happening to achieve the technique. In this post, as the name suggest, I will show how the event system works in .NET (or rather C#) and how this system is actually achieved into the system.

The Basics

Event is a special object in .NET which allows you to give notification to the external world. As far as I am concerned, its a means of communication between the object to the external world, or rather a means of inversion of control to the caller. Now what exactly an event does ?

C# is a language which most of us like the most. I like to code in C# and want to delve deep into its internals. I wrote few posts too regarding Internals of C# language. Here in this post I am going to jot down all the links on Internal Series.for you. If you havent started reading them, its time to go on with it.

WPF is one of the major changes to the desktop applications in recent times. Most of us is using it in your day to day life programming. Some use for normal desktop or windows based applications while others write programs that run in browsers as Sandboxed application. The major investments of Microsoft on making silverlight to work out of browser enhanced the usage of WPF in a larger extent. But as for any other application, performance is the major issue for your application. Its not how well you structured your application, or how loose couple your UI with other layers, it is often a requirement for any software on how it acts in stressed situations.

One of such performance hits that might appear for your WPF application is over utilization of CPU. In this post, I will cover some of the general performance hiccups with WPF which you might consider unnecessary for your application or may be you want just to identify them for your application. Lets put few of the performance improvement tips for you in this post :

Have you ever tried to use your Code-Behind extensively in WPF rather than using XAML to design your objects? Certainly there is no way you would like to do this when you have an option to avoid, but sometimes it is almost necessary to do such code.

You may argue, even you are smart enough to deal such situation yourself using DataTemplates and Resources and make your application truly data driven. Yes it is possible, MVVM addresses such situation, but as I must say it is not always a silver bullet to address situations like this, it is more likely you might device your work more in code. Yes, even if you ask me, I am also less comfortable in Code to do the same design as I am in XAML.

Today, one of my pal asked me the code which would add some Random Ellipse in a black Canvas and these points will also move in the screen using a DoubleAnimation. As per my initial thought is concerned, the code seemed to me good. The code looks like :

Threads and Timers are the most common things that you need for your application. Any work that needs to be done in background without intervening the work that is running in the foreground needed to be done using a Thread. We create Threads to delegate a long running process in background so that the UI remains unblocked. Timers on the other hand is a special module which runs after a certain interval of time in background. So you would think Timers will also create a new Thread in background and runs the module associated with it after a certain time. This is not always true.
In this post, I will compare most of the timers available with .NET right now, and later on discuss about DispatcherTimer in WPF.

Difference between Concurrency and Asynchrony?

Now if you look back when Microsoft introduced async CTP in PDC 2010, or my own article on Async, it is clearly stated that Asynchrony and Concurrency are two different concepts. Asynchrony means running a job without blocking the Thread where it is working at. Concurrency is actually a special kind of asynchrony where it is achieved by creating a new Thread. Hence you can say, all sorts of concurrency is asynchrony while all asynchrony is not concurrency. You can have asynchrony without concurrency and it is really worth doing that, as you all know it is not good to put every work in Separate thread. ThreadPools could somewhat help by allowing you to manage threads but still Threads are for long running background processes, so beware to use it only when you absolutely require it.

Going ahead with this thought, lets compare the existing Timers.There are a number of Timers available with .NET before. Many of us might not know what is the basic difference between them. Lets put a comparative analysis on them one by one.

Blog Subscription

Learn MVC 5 step by step

My friend Shivprasad Koirala who is also a Microsoft ASP.NET MVP has released Learn MVC 5 step by step video series. It starts right from basics of MVC and goes to a level until you become a professional.
You can start taking the course for free using the below youtube video.
Please try it, you will find it awesome.

My Awards

Hit Counter

Twitter

Best .NET 4.5 Expert CookBook

Abhishek authored one of the best selling book of .NET. It covers ASP.NET, WPF, Windows 8, Threading, Memory Management, Internals, Visual Studio, HTML5, JQuery and many more...
Grab it now !!!
Another book on .NET 4.5 has been released very recently. It covers Debugging, Testing, Extensibility, WCF, Windows Phone, Windows Azure and many more...
Grab it now !!!GET ANY BOOK AT $5 from PacktPub. Offer is limited