dotNETwork 5th Gathering – Really enjoyed that Silverlight & SOA Anti Patterns Mix (Part I / II)

This Sunday, I went to dotNETwork 5th gathering to see how interesting it would be to have some Silverlight fun followed by SOA and Patterns and Anti-Patterns goodness. It was a really fun day, and here comes its writing as I saw it.

Starting Out (No tech – you can skip)

The day started by meeting Mohamed Samy (the SOA guy, and my friend!) at 10 AM, getting some sandwiches (and coffee for me as I didn’t have sleep the night before), then, going to the buses place in El-Sekka club (as neither of us figured out how to go to the Canadian University). We tried to follow the first bus by his car (so that I could hopefully get a front row seat as for my eye sight issues), but we moved too late, got stuck at some traffic signal, and we simply lost the bus after we were already far from the original bus stop.

We tried to continue the way on our own using guidance from dotNETwork guys on the phone and trying to track the university signals. That was around 11 AM. Long story short, we arrived at the university around 12:45 PM, after going to so many places that look very different from each other, and false tries to meet with other guys from dotNETwork in any known place in this area (if “known place” can ever exist in it).

Thankfully, that was the only inconvenience of the day, yet, the only adventure as well.

Silverlight 2.0 – Yasser Makram

Yasser is really deeply technical guy, especially when it comes to Silverlight. He works for a company that does Arabization for Silverlight, so, you can imagine how deep he needs to be to get into that.

Clearly I reached his session 15 minutes late at least (given the session started later than it should). I found him discussing Silverlight competition with Flash, mentioning earlier acquisition Microsoft has made that did not help the competition, and why he thinks Silverlight will make it. He said there’re other things

The reasons he believes Silverlight is going make it is that Microsoft is playing well on many roads. For developer reach, it’s very clear having thousands of threads in Silverlight forums while still in BETA. For partners and component developers, there’re many controls, some are free, like Devexpress AgDataGrid, a very advanced grid control. In terms of showcase applications, there’re cool goodies like  Popfly and Silverlight Streaming service (which hosts any Silverlight application not just streaming media with up to 10 GB and streaming is free up to 5 TB of aggregated bandwidth). For public websites (which Microsoft relays on to spread installation of Silverlight). there`re many, like the upcoming Olympics in August 2008. I asked Yasser though whether there`re even rough numbers of how much of a percentage Microsoft expects for Silverlight market share, but he said there’s none.


Afterwards, Yasser moved from his exploratory Silverlight and PowerPoint slides to the XAML of a basic Silverlight demo, which remained until the end of the session. He briefly introduced XAML, and how every XAML tag is used to instantiate an object of a corresponding class. Also syntax for mapping CLR namespaces and assemblies to XAML namespaces for use with custom namespaces, and said some of them are in AssemblyInfo.

Then he talked about object properties. Those are expressed in XAML as attributes or sub elements for properties of complex (or custom) types. The element name is in format “ComplexTypeClassName.PropertyName”. Silverlight uses “Type Converters” to map the XAML element names (which are strings) to types of objects to instantiate them.

He also showed how VS has the ability to generate event handler method stubs for the events when you type the event name in XAML markup. Small thing we web developers miss with ASP.NET markup :D.

Controls: Data Binding & Layout

The next point was Markup Extensions, which syntax-wise are just other attributes that start with curly brackets “{}”, usage-wise similar to both “$” and “#” i build extensions and data binding in ASP.NET. They are used in builtin implementation for getting data from static resources, but you can use them for any data manipulation, even better (more extensible as per Yasser( than type converters. Talking about data binding, he stated how Silverlight 1.0 didn’t have any input controls or data binding. Silverlight 2.0 has bunch of those.

Silverlight in general has two types of controls, ‘simple control” and “content control”. Actually, most of built in Silverlight controls are content controls. A content control is a template based control, so, you can embed any other control in it even when you think you normally can just add plain text or nothing at all. an example is a tool-tip or a button, in Silverlight, you can for example put an entire grid inside the tool-tip!!

Data binding also works in fashionable way. You basically map the namespaces you need, create a “resource” (which is something like data source in ASP.NET as per my understanding), give it a key, and use that with the control you want to bind to. The last step is to fill the source with any enumerable (list of values). I asked Yasser how the data binding work, whether you have to call “DataBind” manually as in ASP.NET or it works automatically and bi-directionally as in win-forms, which Yasser said it does. Talking about data binding made him mention Devexpress grid as well which has more features than the basic built-in one like built-in sorting, paging, and inline-editing.

The next topic was Silverlight “Layout”. This is determined via a layout manager which as I understand defines how controls are sized (called “Measure”) and located/aligned together(called “arrange”). Three main layouts in Silverlight are the Canvas (sounded like absolute layout to me) the Grid layout (just a table layout), and the Stack Panel (where elements are stacked next to each other). He explained that you can always create your own layout manager by implementing “measure” and “arrange”.


Silverlight has support for LINQ-To-Objects. Yasser presented how to use it to apply certain change to all controls of certain type contained in another parent control. I asked him about other 2 LINQ providers, he said LINQ-To-SQL is not supported, but LINQ-To-XML is. I asked him about creating customer providers, he said it is supported given the created provider is built to target CoreCLR (Silverlight CLR) of course.

Yasser also mentioned Isolated Storage (like temporary folder for caching or whatever), which he said we should only use as advanced alternative to cookies. For example in last MIX conference, there was a demo of an email application that used Isolated Storage for keeping a local cache of the email inbox. Note that the quota (max size) for the Silverlight application storage is 1 MB. The user can configure the quota size still of course.


Of course talking about Silverlight wouldn’t be complete without mentioning developer/designer separation having developer using VS and designer using Expression Blend. He mentioned two design terms, styles, which are like property setters that are saved in application level file (while the developer works on the content file), and control templates, that have template contracts (the parts to inject controls in the template), states (like enable, disable, hover, …). He used Blend (in the designer, with no manual markup) to show how you can change completely what a control looks like or hat nested controls it contains.

Next topic was Animations. He said they can be specified in code (called “procedural”). It can be also defined in markup, he showed how those can be created in Blend with the story board designer (similar to time line in Flash I guess). Then mentioed a not about Flash procedural animation libraries being ported from Flash to Silverlight.

He also mentioned DeepZoom. This enables you to make as big picture as you want (he mentioned an example of 6 million pixels), and not download them at once, but zoom and download zoomed part only as needed.

Arabic Support

Silverlight has no support for Arabic right now. This is funny thinking that Silverlight has general good localization support. Yasser showed how you can put Silverlight in a page by JavaScript or an EMBED html tag, and how to pass “culture to it”. It recognizes Arabic and shows the Arabic characters but in reverse order and separated from each others.and from right to left just as if they were English (Yasser showed that via applying the culture on an application with a Calendar control – he mentioned it’s not extensible BTW).

Santeon, the company Yasser works for, has provided free Arabic support for Silverlight.Yasser explained why Arabic is hard to get. You could just reverse the order of all characters but how about numbers and mixed English and Arabic content ? There’s also the issue that the character looks different based on its place in the word, and in some fonts based on what character comes after it. Also word wrapping. Someone hold a side discussion why Microsoft although is known excellence in this in Windows didn’t just use that, and Yasser said any application that supports Arabic well is mainly using system service built into the operating system itself, while Silverlight implementation tries to be not use an OS specific services.

The Arabic support for Silverlight from Santeon is done by creating alternative controls to the ones built into Silverlight. A way I personally don’t like but understand it might be the only way to go. They give out their Arabic support at:


Yasser is a very knowledgeable guy. He knows much about Silverlight coding and it makes sense as per his work in its Arabization. I think he could make the session last longer though and had much more to tell than he did :). Most of the guys felt he could have improved the way he gave the sessio, but in general it was a good session with a certain depth that I was not expecting to reach in a Silverlight session.


I had a discussion with Yasser about Silverlight and DLR (Dynamic Language Runtime), and why there’s a CodePlex project called DynamicSilverlight if it’s included in Silverlight already. He said he didn’t know. We did not agree on him to send me further information or such, but he later found my blog and usedmy contact page to send me the following:

Hi Mohamed,
I have checked the Dynamic Languages SDK project on CodeProject, and I found out that this projects is used to host the following:
IronRuby Silverlight libraries
IronPython SIlverlight libraries
Chiron tool, which is a commandline tool used to package Dynamic Languages applications in XAP files (ZIP file with a manifest which is used to redistribute Silverlight 2 applications)
Source code for IronRuby, IronPython for Silverlight
Dynamic Languages Samples
The tools (Chiron), and the libraries are included in the distribution of Silverlight SDK (by default located at C:program filesMicrosoft SDKsSilverlight). So there is no need for confusion, the CodePlex project is not a separate project, as the libraries coming with Silverlight SDK is actually compiled from this CodePlex project.

He sent me his contact info, but I’m not putting them here without asking him of course! Thank you, Yasser.

He also sent me the following information about himself when he knew I was going to blog the event. It’s very interesting info, so, I’m sharing it here:

Hi Mohamed,
I have seen your blog and noticed that you will be blogging about yesterday’s session, and also noticed that in a previous post that you don’t know about me. So I though to briefly introduce myself to you, and specifically regarding Silverlight. I have been active in the Silverlight community since the beginning. I have been camping daily on the Silverlight official forums, reading threads and answering questions till I became the first to post over 1000 posts and have been ranked as the top contributor. In the last few months I have not been as active, but I still ranked as one of the top 5 contributors in SIlverlight community hall of fame . I have worked on some Silverlight projects, including and . I am very glad to see bright developers like you in Egypt, after reading through your blog. Good luck and wishing you more success in the future.

Heading to SOA Patterns, OOPS, AntiPatterns (Coming in Part II)

The next session was very enjoying one as well as informative. I have had the honor to see Mohamed Samy putting the following touches on it before it happens, but seeing it in action was completely different. In order to not make you all wait until I finish that other long part, I’m publishing this part right now and will be sending about all the fun great SOA story in a separate part/post. I hope it’ll be as fun and informative to you as the session was to me.

Sorry for taking long to write. I’m already overwhelmed with investigating some other SOA related stuff :D :D :D, and some other less fancy stuff of course.

Stay Tuned !!

Share With Friends:

How did I learn that?

As a bonus for coming here, I'm giving away a free newsletter for web developers that you can sign up for from here.

It's not an anything-and-everything link list. It's thoughtfully collected picks of articles and tools, that focus on Angular 2+, ASP.NET (4.x/MVC5 and Core), and other fullstack developer goodies.

Take it for a test ride, and you may unsubscribe any time.

You might also want to support me by checking these out [Thanks]: