So it all began on Tuesday, Moty (CEO), Roee(CTO), Ken (Team Leader and a major guffy) and myself drove about 5 hours to Eilat. The view on the way was nice but I’m not a big desert landscape fan so you won’t get me excited about that. We got to the hotel at 15:00 and took our stuff to our rooms (nice, big, comfortable rooms, I might add). From there we went to the kick-off meeting which was kind of sad; too much folks, too much noise, and a poor lecturer who had to suffer from all of that. There I met my good friends Shani Raba (aka human debugger), Alex Iagovsky and Yossi Ganot and said hello to a few colleagues from MS. After mingling around I went to my first lecture. Oh, on the way to my first session I took a pic of this cute parrot:
Cute parrot – speaks C# 2.0 for living
Session 1: Introduction to WinFX, by Payam Shodjai
This was a great lecture and really served it’s purpose. Payam is a great speaker, one of those guys that makes you feel comfortable sitting 1.5 hours and listen to some high-ground material and still have a smile on your face (I’m one of those geek that loves the bit & bytes stuff). This session gave me the order I need to the new technology Microsoft is about to deliver in the following year. Payam presented the 4 wheels of WinFX: WPF (windows presentation framework), WCF (windows communication framework), WWF (windows workflow framework) and (4) InfoCard (a huge progress to the real deal – Identity 2.0). I guess you wonder “so what can you tell me about those 4 features ?! come on, I’m dying here! ” (if not, something is really messed up with you :)), so here is a short summary about the 3 magic beans:
WPF (or in it’s old name – Avalon) is the new GUI framework from MS and damn they did a fine job in this hot-spot topic. No more drawing with GDI+ or DirectX, it’s time for vectors to kick-in. Imagine develop an application which will look beautiful on 1024*768 resolution but at the same time it will be as smooth and clear on 640*480 with no need to change CSS or images ! The name is XAML (pronounced ZAML) and it’s a descriptive way to create your forms (web or windows). In addition, you can really change the way SelectList, Radio-Buttons, Grids and other controls rendered. A quick example of a vectorial clock can be found here; Just enter this link and I promise you will be amazed by the simplicity of this technology. Superb!
WCF – We all had the pleasure(?) to write WebServices, to enhance them via WSE (1.0, 2.0 and 3.0), to use Remoting, Windows Services, Transactions, MSMQ and many other communication API providers. It’s time to make some order and to unite all this technologies together – WCF ! This new API will help you communicate between you apps with ease, and it’s about time…
Oh, it almost got away: WCF(new name) is equal to Indigo(old name).
Ken, our talented (but still guffy) guy will take this one. I can bet that his going to do magic with it, just hold on to your sit.
WWF – This is the real deal (I’m biased). This puppy can make you Business Logic describe itself. Image a drawing (kind of UML) which describe the set of actions you perform according to a set of logic conditions. This workflow engine allows you, the developer, to write a set of “Activities” and connect to via a logic process diagram. Each activity is just a simple class which implements Execute method. You can obviously create “sequence” workflow and pass arguments between the steps in the flow. You can change the steps order or the logic conditions (sometimes without re-compilation, depends on the change) with a simple drag-and-drop around the screen. Creating some “template” activities can make some of your application’s flow a drag, drop and to-production. All in 5 minutes.
I will be the one that takes charge on this beauty. Prepare to be WWF spammed !
My grade for payam’s lecture (1-10): 9.
Session 2: Deep relfection – What’s new and important in .Net 2.0 Reflection, by Roy Osherove
This one really blew my mind away. I’ve learned a bunch of new stuff and got really excited about DynamicMethod and ReflectionOnly-*. This two immediately got me thinking about some implementations I can use today. Roy sent the message loud and clear and the lecture was smooth and fun. Let me elaborate on the things you should know about:
DynamicMethod – This is the fastest way to create code on-the-fly and inject it into memory. I’ll use Roy’s sample: Let’s say you want to clone object from type A to a new object, something like:
A a = new A();
a.Name = “Oren”;
A a1 = a.Clone();
a.Clone() will perform a (deep\shallow) copy of a. So you can say – OK, let’s create a Clone method in each of our custom objects and implement it, something like:
public A Clone()
A newA = new A();
newA.Name = this.Name;
Well, if you have a lot of custom classes (and each custom class has more than one property, most of the time), this could be quite exhausting. The idea with DynamicMethod is to generate the IL code which will copy the object on the first time you call it; meaning, on the first call to a.Clone() you’ll probe the object and create, dynamically, the Clone method and save it into memory. Roy will upload his presentations and examples so you could view some nice usages of this new great feature. One thing though, this feature requires knowledge of understanding IL which can be quite hard for novice programmers, but I see some great usages if you’re an infrastructure guy: Serialize, Deserialize, Cloning, Attaching methods to events (like Handles keyword in VB.NET), Formatting objects (to xml for example) and many other things I’ll leave under my sleeves for the moment (I’ll implement and upload, in time).
ReflectionOnly-* – If you ever reflect some of the assemblies or types in your system (e.g Plugins system), this one is for you. See, the minute you ask questions like GetCustomAttributes() you actually running the constructor of each one of the attributes. Now let’s say that the attribute is a Custom Attribute which you’ve wrote and you want to upload (to memory) all the classes with that attribute. This could be unsafe. The reason is that I(hacker) can inherit from your custom attribute and put some malicious code in the constructor which will be run in the context of your application (the one that called GetCustomAttributes) !!
With ReflectionOnly-* you can be with and feel without – this is a safe way to probe your assemblies\types. This is something I’ll take advantage of immediately so thanks Roy !
My grade for Roy’s lecture (1-10): 9.
End of the day – Cocktails “party”:
This was nice although I hate standing while I eat. Good drinks, nice food, a lot of gifts (if you give your name, email and phone number to the devil – the spamming machine). Nice.
Myself and Shani Raba
A look from above (Hey! I’m 1.70m guy, what can I do ?!)
End of day 1.