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

So, it has been exactly a week since I have been to dotNETwork 5th gathering. This is yet one of my too late events coverage (maybe I should write a long boring post about why that happens lately in as much annoying details as possible!). Let’s  hope we have something worth the wait this time …

Intro (No tech – you can skip)

This time I’m talking about the second session in the last gathering. The 1st session was already covered earlier. This session is special to me for two reasons: It was delivered by my of my dearest friends in the field, Mohamed Samy. I know Mohamed four years ago, since He was moving from VB 6 to C#, until he became one of the super guys in the field of enterprise computing and architecture in the .NET in Egypt, being a technical architect in ITWorx, one of the top posters in MSDN forums, and finally getting his Solution Architecture MVP lately (which he tells us a story about). The second reason is that I had the pleasure to see the latest part of his preparations for the session, and it was very interesting to see “the making” as well as “the show”.

Anyway, getting back to the session… The microphone stopped working at the very beginning. Mohamed moved to the middle of the rows and looked like a student leader talking to his fellows. this warmed things up a lot as well. He started warming them up by going really quick on his start as a developer, and choosing to continue in the technical career path (technical lead, architecture) while most prefer to take the manager path (project management, etc). He told us about his MVP how he was so happy to earn it in “Solution Architecture” then having the “Solution Architecture MVP” canceled, and having to choose a product specific MVP award instead. He went for “VSTS MVP” as relatively a bit close to his work, having “Solution Architecture” as a “competency” to the “VSTS MVP” award.

As we got lost in our way to the CIC (Canadian Collage, where the gathering took over), he mentioned that software is like finding the CIC, you ask people you find in your way about the road to go, each gives you a different answer. You need to get to that road and not ask again.

Going more into the session


Mohamed went through how “XML” suddenly became a buzzword. People tell you you’ll get rid of SQL and Oracle and replace them with XML files. It’ll solve all developer problems, and all this kind of talks. He bought a 1500+ pages book about being “proficient in XML” and he still didn’t understand what XML is really about. This is a buzz, just like the university sign, it tells you go certain way and everybody just follows. Later Mohamed recognized the simple fact that XML is just a text format based on tags that can be consumed within any platform. This is good because it solves communication problems between platforms (say COM from Microsoft and CORBA from Java) that were problematic because of using specific binary formats not text formats that before XML it was meaningful to prepare an entire PhD on communication between such platforms!

From this example, we see that every buzzword is said to solve all our problems. Few years later, the buzzword will just get deleted in favor of newer one. People need to understand the “concepts” behind the buzzwords not just how to use the tools and technologies related to them. He made fun of how people earlier earned so much money by writing about “Java & XML” when “Java” and “XML” were both buzzwords!

Patterns, Anti Patterns and Architecture

Getting more into the topic Mohamed asked the audience whether they know what patterns are. Well, few did! So, he explained “patterns” as solutions to common problems. He said that even architecture has much to do with this (more on that coming). Same as in building, there`re patterns in designing a living room or even a kitchen (like American furniture designs and such).

What happens is that someone faces a problem and solves it. Someone comes with better solution etc. and many people like it and repeat the same thing when solving the same problem. Someone draws UML diagrams and writes explanations for what the problem is and how the solution works, and this last work is what we call a pattern.

So, if patterns are the common practices we do to solve a repeated problem, then, following naming analogy, Anti Patterns will simply simply what what we should NOT do when soling our problems!

How about architecture? Lets use analogy with architecting buildings again. If a building buildings “designer” (similar to software designers) worries about the best use of spaces inside the buildings themselves, then the “architect” worries about the space “between” each building and the other, the green areas that should exist, where to have a garage, what ration should be between the building size and the width of the street it is build in, etc…An architect worries more about the interaction between systems and each other. Many applications have to talk to each other. Looking at a sample finance application, you may have an HR application that applies bonuses for example, for that, the HR application will have to talk to say a payroll financial application to apply the bonus payment.

But, not all applications run on the same platform, even more, each of them is likely designed in different way than the other. But we still need applications to talk to each others. That’s why we look at standard protocols, like HTTP, HTTPS and such. Those enable us to perform “integration” between those systems.

SOA, Who ??

SOA (Service Oriented Architecture) is an architectural style. What dos this mean? Well, back to buildings analogy. Mohamed showed pictures of example of Islam and Romanian architecture. All the audience could recognize each. The common parts in Islamic or Romanian architecture are what define an architecture style. The common parts between different architectures are what define the architecture style.

When you recall a 3-Tier architecture, you know what you are talking about, data access, business logic and UI. When talking about “Service” Oriented Architecture, you expect to see services.

What is the goal of SOA? Every architecture style has a goal. In buildings, why are the ceilings of the old houses very high? It was a pattern that solves a common problem. They no good fans or ACs back in that time, so, they made ceiling very high so that warm air goes up and less warm air remains in the normal height – to understand what the goal of SOA is, let’s get more on what SOA is.

SOA is an architectural style that emphasizes standards based integration between systems. This means enabling the components of different systems to talk to each other using standards. That’s one reason why WCF is good BTW, because it enables you to make components of the same system talk to each other in binary way, while still allowing components to talk to other components outside the same system using say XML. Clearly, this is not the easiest way to build applications nor one that guarantees success of the system. Not all applications should be built leveraging SOA, actually, trying to do SOA in all applications is a common mistake, Mohamed says. A Point of Sale (POS) application in a really small shop for example, has nothing t do with SOA.

Mohamed gave an example of Egypt back when there was no interaction between countries, all the goods are either made locally or very hard to get. Now, with all worldwide agreements, borders on getting and sending stuff are removed. SOA features standards: HTTP, SOAP, etc… It’s all about friction free interaction between different systems (again, standards based integration). It’s just a way of designing your application, a way of thinking.

Of course there’s lots of buzz/hype around SOA. You hear all that stuff about “Loose Coupling” and such. Some people might say applications should not not even know each other and have locators to tell them how to find each other. These are points of different opinions. Who said you need this overhead (or you don’t)? You still in all times have the overhead of translating from your internal system types and data to the standards format and the reverse overhead on the other system, so, if you are designing say a real time application with thousands of transactions in seconds, SOA will not work. If someone tells you 2e’ll go for SOA to improve performance, just tell him “you are so wrong”!

So, If I understood SOA is designing the system having services communicating with services of other systems using standard protocols like HTTP, and formats like XML, etc, etc… What is a “service” at all then? A service is an interface to your business process. When you are renewing your car driving license, you fill a form that is agreed upon between you and the responsible department, typically (does not quite happen in Egypt) you should be able to give it to only one terminal, without having to know say how many employees it goes to inside. This makes me personally think of a service as a method that will be called remotely with standards protocol and also parameters in standard format that a method caller should not worry about what the implementation of the method actually looks like.

The 4 tenets of SOA

By this we mean those tenets:

  • “Boundaries are explicit”
  • “Services are autonomous”
  • “Services share contract and policy not class”
  • “Service compatibility is about policy”
Boundaries are explicit

Mohamed showed a picture of a country border. There’s a fence, a STOP sign, a guy holding a microphone. If you are going full speed in the highway from Egypt to Libya, you have to stop at the border between the two countries (slows your total average speed). You also have to show say your passport and maybe visa (Authentication and Authorization). Services also have logical boundaries, could require authentication and authorization.

Also, when you re doing a money transfer from a country to another. you need to convert you local units in your country to the other country’s local units. For services, this is changing from the internal data types and schemas in your system to those of the system that has the service you want to connect to. Crossing the boundaries and doing the transfer takes time, that’s why we said that SOA is not the way to solve application slowness.

So, what are the boundaries of each service? We define that when we are architecting our services. We first agreed that those are logical boundaries. An example is, who should be able (and hence responsible) for changing a customer address? A sales application or a marketing application ? This is one kind of the questions we ask our selves when putting the boundaries.

Services are autonomous

If there’s a problem in having fish in Libya, should Egypt be affected by that? Of course no. Same with services. Each service should specialize in one operation. Services should be as least dependent on each other as possible.If service A depends on service B internally and for whatever reason service B is down, Service A should (ideally) still work with 100% its performance, or (more realistic) should provide downgraded performance. It should not be completely stopped.

Back to driving license renewal analogy. If the renewal requires getting your traffic offences, and those are got from say the ministry of justice that is down, it should tell you to come another day, or better off offers to give the renewed license to your house that other day. Note that “another day” is a degraded service.

The point is to make sure to not crash if the dependency is not found or down. Otherwise, a failure in one service, will fail all dependent services, that will cause failure to other services depending on them and so on, that you can easily find your entire company business down because of this.

Services share contract and policy not class && Service compatibility is about policy

The two are related. Back to countries analogy, to get the visa to travel from Egypt to Canada, you need to get police clearance(showing you are not a criminal). This is both a contract and policy. The contract is the police clearance certificate itself. The policy is that if the one applying is a criminal, s/he will not be allowed to get the visa.

For services, the contracts are the schema of data transferred between those services. The contract could be different from platform to another even when using standards. For example, if your service returns a customer record by sending a DataSet containing that record after applying XML serialization, the Java fellows trying to call your service will have hard time parsing the XML that gets generated from this serialization. Instead of that, you should send a typed Customer object XML document. A document that has the information needed clearly without any platform specific additional tags.

Policy is the protocol of the contract. For example, if the service requires authentication/authorization, works on HTTPS not HTTP or so, has certain timeout for results, etc… al this would be parts of the service policy. There’s an overlap between the policy and contract though (is the schema being XML or binary or what a policy or a contract?). In general, the policy is the definition of what’s allowed and required in the conversation between the service and its client (caller).

Thinking of contracts and policies, Mohamed showed that you should not require more data than you need. If your services just changes the address of the customer, it should require a “Customer Address” document not an entire “Customer” object document. This is called “Just Enough” Validation (MSDN). This is good also because the data is meant to come from a likely remote location, requiring less data will make things go faster.

One reminder on polices as well. This is like whether to use SSL or not, what protocol to go to, what to enforce, etc.. Mohamed mentioned the WS-* specifications that can give you in-the-box encryption, trust, transaction and other services, but there was no room to talk about WS-* here as we needed to move to the title of the session, SOA Anti Patterns ….

The Anti-Patterns

The session was originally called “Patterns and Anti Patterns of SOA”, due to time limitation, and prior permission from the dotNETwork guys, the session was split to two parts. One for the patterns, and one the anti patterns, which Mohamed has chosen to start with Anti Patterns as to clear up the thinking before telling us what we should be doing. He’s more interested in what SOA is NOT than what it IS. Let’s see what he talked us about…

Remember, this is what you should NOT do.

Anti Pattern: “CRUDy Interface”

OK, so we want to start SOA, and want to expose our system components as services. Let’s start by the easiest parts. Our system will always have to deal with Create (Insert), Read (Select), Update, and Delete operations (CRUD). Lets create services that encapsulate those – WRONG.

Changing a record can have so many side effects, let’s take an example of changing a customer address. This sounds very direct (update customer set address = …), and that’s it. Not really! If you change a customer address, many things could change as well. Tax rate for example. In Nasr City district in Cairo there’s some area called “Free Zone” or “El mantea’a El Horra”. If your business is in it, you’re exempted from taxes for certain years. If your business is anywhere else in Nasr City or Egypt in general you do not get that. So, changing an address from or to this area even still within Nasr city can have a big effect. Also, you may want to send an email to the branch that the customer will be transferred to when changing address, so, this is taking an action not just changing the address.

It happens in reality. If you change your address in the ID card, it does not affect your driving license, passport info, or bank account. Some guys came with an argument that it should, as al the systems should have the same database. Mohamed said that in reality we could have very good system for banking running ith IBM stuff, a good system for car licenses running on SQL server, while the ID system might be Oracle based. Because the systems are already packaged into different databases and database schemas, they just cannot share the same DB.

Anti Pattern: “Enumeration”

This means something like CustomerService.MoveNext();. A virtual curser  (meaning a pointer, not SQL curser). This allows the client to treat the data and iterate (loop) on them as if they were already loaded to the client, while they’re truly on the server. For the server to be able to enable this. It’ll have to hold the entire list for each client, and that would be a huge performance headache on the server, and the service should not have to worry about caching this and storing the last position and such. Remember (from the tenets) that services are autonomous. A service should care about one operation.

To explain this, Mohamed mentioned a system he joined in the past after it was created. There was too much work done on the DB server for updating recording dependant on each other and/or updating some complex calculations fields, etc.. This was done via SQL dynamic cursors. The cursors have been running all day locking the data in the DB from being accessed by any application.

The point is, the consumer (AKA client) of your service should not be the one who controls your server resources. You have no guarantee who’ll call the services. Even more, you have no guarantee who wrote the code that will call your service (even if you know which system it is via authentication), and you cannot guarantee whether they’re good developers or not.

Anti Pattern: “Chatty Interface”

This is when you require say 5 different service calls to do the same thing. Something like Customer.MarkForDelete(); Customer.Delete();. Two calls to perform deletion. This way you required the consumer to go all the way long from the client to your server and backwards two times instead of one. Well, not just that, how about if “MarkForDelete();” was called first and “Delete();” was never called??

This is actually something you may want to do in some certain cases, but most of the time you don’t. The problems with this are the additional time things will take to perform just one operation, and that it can easily get your data into an inconsistent state. If some of the steps were called and the next steps were for whatever reason not called, your system now has a weird state!

Anti Pattern: “Loosy Goosy”

Why don’t you just make all your services a single services that looks like XmlDocument PerformOperation(XmlDocument input) {…} ? BAD BAD BAD.

The point here is the difference between implicit and explicit behavior. If you do the example above, how would the clients know the way to call a certain operation than another? How will they know what data you need to be filled in the input XML or what to expect in the returned XML? An explicit behavior DOES matter. When creating your services, give them good names that shows what operation each service does perform. When defining your inputs, remember the “Just Enough” Validation rule. Make XML schema for the fields you need only better than using  a bigger XML schema that already exists. A services that updates a customer address only required a CustomerAddress document (With address and ID inside) not an entire Customer object document. You should also be explicit about what the service returns, whether nothing, a document with certain info, etc..

Why is implicit behavior bad anyway? Mohamed gave a very funny example.He went to work on an old COBOL based government system for salaries (salary laws were defined in 1936 and had endless changes afterwards all handled by this system),. The system was a single long routine with no modularity at all, and when trying to make it more modular, Mohamed got stopped at an entry point to the application that takes 3 flags.ZEFT (Asphalt), MIDO (fun name), SOSO (fun name). He couldn’t know what those 3 flags refer to until he asked the people using the system. They told him the woman who created this system has chosen MIDO as per the name of her son, SOSO as per the name of her daughter, and ZEFT (meaning asphalt) as per the name of  ….. whatever :D.

People kept  a notebook including what exactly the operations that are performed when you set ZEFT, MIDO and SOSO to certain different numbers. You can imagine what maintenance nightmare Mohamed found himself in, and this is exactly the nightmare you give your clients when you go for an implicit behavior. Mohamed says it’s like a house of dominos. It doesn’t survive long.

Last thing Mohamed mentioned was about the “Just Enough” Validation. What would you if your system earlier required a customer document with single field for address and now happened to have different fields (Line1, Line2, City,…). You then need to version your services. He showed how this can be done with XML serialization of objects. The main idea is you use your platform native types as long as you are inside the same system’s boundaries, and serialize/de-serialize that to/from different XML documents when returning/accepting XML data in your service. You can apply “version” and “optional” flags to allow versioning of the documents.

Just after the session, I asked Mohamed to show his Links slid, and guess what? He had my blog (with the old GeeksWithBlogs URL he likes more than this one) in his SOA recommended readings!!! I can’t pretend like I didn’t know it, having asked him for the references myself made it very embarrassing to me. But anyway, thanks a lot, Mohamed for this invaluable trust.


As I mentioned before, these are only the Anti-Patterns. The patterns are to come in the next gathering in July (God Willing).

Now to my comment: Mohamed did well for a guy explaining this to people who did not know what design patterns are. I’ve seen few advanced developers sitting in between and they were looking satisfied too. The microphone problem was a good thing for him. Everybody was happy, but for me, I was still missing some. Maybe that’s why he kept kidding with me about along the session “you feeling OK now, Meligy? :D :D” :D :D :D.

I didn’t like that he assumed SOA is all about SOAP and WS-* while other paradigms exist like REST and such, but I cannot blame him at all, as mentioning such would probably cause a huge disturbance to people and could simply get them completely lost. I also was sometimes losing the software example that maps to the building/countries/real-life examples he gave. That was in few cases though. Maybe I just wanted to hear so much technical stuff though! One more thing is that he had a very interesting flow of the talk that he could highlight and clarify a point either before or after its original place in the presentation. This didn’t cause people confusion, but it was really tiring when  came to transfer my session notes into this blog post, that I feel it does not tell the content of the session in a proper way.

Generally it was a very good session. If you could please people with different knowledge levels to good percentages in such a complex topic, then you have done something. Good job, Mohamed. You DID meet my expectations. I’ll be there for the Patterns session (God Willing).

BTW, Mohamed is now working on getting his VSTS related portal, theVSTSguy. I’ll update this blog as soon as he gets it up and running.

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 !!

Blogging dotNETwork 5th Gathering Today, Silverlight and SOA


Hey all, I’m still blogging about my very interesting trip to dotNETwork 5th gathering, what Yasser said about Silverlight 2.0 and Mohamed Samy said about SOA Anti-Patterns.

This will be coming late tonight (God Willing).

I just had a sudden graduation project documentation help request to have to in its writing to start final printing. But I still have my OneNote pages and those are still going to be converted to blog post(s).

I write this to confirm the writing though latency. This post is likely to be updated or deleted when I post my take on the day.

Stay tuned1!!


I’ve already started finished my writings. Here are the published blog posts:

dotNETwork 5th Gathering – Silverlight and what ? SOA Patterns, Yay!!

n587461065_1343848_971The 5th dotNETwork gathering will be: Saturday, June 28, 2008.

The agenda is as follows:

12:00 AM – 01:30: Delivering Rich User Experience Applications using Silverlight 2 by Yasser Makram

01:30 PM – 2:00 PM: Coffee Break

02:00 PM – 3:30 PM: Patterns and antipatterns of SOA by Mohamed Samy

03:30 PM – 4:00 PM: Lunch


It’ll be in: Canadian International College Busses will be available at: Nady El-Sekka (11:00 AM – 11:30 AM).

The gathering being on Sunday not Saturday as usual makes it harder to attend it The gathering facebook event said by mistake it’ll be on Sunday, but it’ll be on Saturday normally like all other dotNETwork events.

Regarding the sessions

I do not know about Yasser, but Silverlight 2.0 is a fairly new topic and it’ll sure be interesting to come and see it. I think Yasser will bring us a lot of amazement!

For the SOA topic, I want you all to set high expectations starting now. Mohamed Samy is a Solution Architecture (VSTS) MVP who has worked in and talked about SOA patterns more than most people I have met in person as both a personal passion and a job responsibility as a Technical Architect in ITWorx. I know Mohamed in person and believe he’ll be delivering a rocking session. Do not miss that.


Related Resources



I’ve already started finished my writings. Here are the published blog posts:

dotNETwork 4th Gathering: May 31 – SharePoint & Silverlight

dotNETwork 4th gathering will be Saturday May 31st.


12:00 PM – 01:30 PM SharePoint Development
Marwan will give us an overview about SharePoint development. This session will be first session of a SharePoint sessions series.
Marwan Tarek
MOSS MVP – Team leader
01:30 PM – 02:00 PM Coffee Break
02:00 PM – 03:30 PM Introduction to Silverlight
Hussien will talk about Silverlight. Silverlight™ is the Microsoft® cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of media experiences and rich interactive applications for the Web.
Hussien Zahran
Development Manager
Link Development

The gathering will be in:Canadian International College.
There will be busses available at: Nady El-Sekka (11:00 AM – 11:30 AM)

See the map on the right.


Unfortunately I’ll not be able to attend due to exams. A number of students have the same issue as well. However, it is a dotNETwork habit to have a session every month you know.

The official statement on this is:

“Hi Guys & gals,

We’re really sorry, but we were already
canceled last month’s gathering not to conflict with EDC.. We’d better
keep it regular for the continuity of our userGroup gatherings.. That u
can always get compensated by attending the next months’ gathering..

& be sure we will do our best to compensate u soon isA..

Thanks for your passion about =)” 


However, if you can make it, go attend the gathering. I have heard good stuff about Hussien Zahran if I recall correctly. I have also attended a SharePoint session for Marwan Tarek before and it was a very nice one (I wrote about it in my old blog).

Event Links:

dotNETwork Third Gathering – Thank you for coming – Slides Available

Let me give a very big thank you to all of you who have come to dotNETwork 3rd gathering yesterday. To those who don’t know what I’m talking about, read here :).

I’ve enjoyed with you all Mohamed Hossam‘s great session on Windows Workflow, and enjoyed you, the great attendees during my Scrum session. his came clear in many areas. The fun sole that you all had was great, the input and interactivity from the most was very inspiring, and the way how our talk moved from applying Scrum in the real world environments from the real world perspective to the issues that any developer would suffer from / worry about in his company in  general – the job security talk was fun too, LOL – so, I hope I could share with you some real world experience I had through my friend developer net as well as shared what Scrum is mainly about, and the small enhancements/techniques I have invented and/or learned from colleagues though applying it.

The gathering files have already been uploaded. WF’s session files contain the session slides as well as the files for the session’s main demo. The files for Scrum session include the slides and sample Excel files used for tracking and Burndown chart generation.

You can check the slides shown below:



For download, you can find the sessions’ file as a single ZIP file available dotNETwork official website in the downloads page. (direct download)
The dotNETwork site was updated and didn’t keep old files. Alternative download location – download from HERE.

Again, thank you all for coming :). See you next gathering.

dotNETwork 3rd Gathering – I’ll be talking rather than blogging, Bashmohandes too!

n542293349_349500_9935dotNETwork third gathering has been announced. It’s Saturday of the 3rd week of the month as planned since the 2nd gathering.

If you are unfamiliar with dotNETwork as a whole, that’s simply (as I mentioned before here) the first big offline .NET usergroup in Egypt. So far the main activity of the group though is to provide FREE monthly events ton .NET related topics, focusing on the latest topics that matter for the average .NET developers.

Windows WorkFlow Foundation, AKA, Mohammed Hossam (Bahmohandes)’s Session

Mohammed Hossam is known for many deep technical blog posts in his popular blog Bashmohandes. He’s also the founder of the Middleeast Developers Yahoo group (an INETA Community). To me, he’s an old friend from ArabTeam2000 online forum and small offline community. He’s also our lead software engineer here in SilverKey Egypt. During this, he was very essential in preparing our couple of DemoDay public free events and his DemoDay sessions used to get the highest ratings. Now he is moving to Microsoft Canada to work in Windows Live Team)

At least through working in SilverKey, Mohammed was involved in very advanced implementations and customizations of WF that required direct contact with WF guys inside Microsoft since WF was still in BETA, and identifying bugs that remained even to the current release :D.

I don’t know about all the details of the story. I’m not also sure what he has in mind for the session, but honestly you can take my word that this is going to be a very special WF session for you!

Scrum for Developers, AKA, My Session

The 3rd gathering is very special to me as I’ll attend it as a speaker this time not as an attendee. I’ll be talking about Scrum. The information that developers need to know whether they work in an organization that is still evaluating Scrum, or that’s already implementing it on the go. I’ll be focusing on the practical implementations and even customizations of Scrum emphasizing what the developer needs to know rather than waiting to be told by the project manager. Most of my Scrum experience comes from practical implementations of it in SilverKey, so, the achievements, winnings, gotchas and even mistakes of implementing Scrum in different projects in SilverKey are likely to drive my session.

Of course I’ll also go into an introduction to Agile methodologies in general by the opening, as I expect many to not be familiar with Agile concepts in general.

Although I have presented before in public events like SilverKey public DemoDay I and II (which had even more audience than dotNETwork), and private events like SilverKey internal DemoDay and ITWorx internal CuttingEdge club, this event is very special to me because it’s formed by totally independent efforts of a usergroup, which I used to believe we completely miss in Egypt.

I would sure like my very first session in .NETwork to be a more into coding, but hey, I’ll be talking after Bashmohandes anyway :).


How to get there

the event will be in Canadian International college (CIC).

On Saturday, March 22, 2008 : 12:00pm to 4:00pm.

There will be busses in ‘El-Saka El-Haded’ club ("Nady El-Seka") at 11:00 AM.

The agenda is shown in the first picture to the right.

Hope to see you all there. Again, this is a FREE event ;).

More Information

Note: I’m not going to be blogging about the detailed minutes of this gathering as before (1 , 2) of course, as during WF session, I’m likely to be having the last checks on my own presentation, and during my session, I’ll be busy giving the presentation itself, LOL!

Of course the slides and even event videos will be available soon after the day.

Related Links


Last Word

As I’m still in the process of making my presentation, it’ll be great to hear from you all what you’d like to hear in a Scrum session. Your input is highly valuable as the most I care about is make this session helping a developer to get to start with Scrum, not just hear a few words about what it is, and forget about it totally afterwards :D.

So please, drop your comments here, or send me email (use the "Contact" page, or reach me via Facebook or private email if you have any) and tell me what you recommend to include, or how you imagine such a Scrum session to look like.

Thank you very much in advance, and hope to see you all very soon.

About dotNETwork Usergroup 2nd Gathering -Or- WCF Messaging, SQL Server 2008 Manageability

Today was .NETwork usergroup second gathering. The usergroup is the first and only large/effective "offline" usergroup in Egypt (although there’re many others in INETA). They had a great success in their first gathering when they brought Steven Forte to talk about SQL Server 2008 new features for developers and ASP.NET MVC design pattern. I had a detailed post about it in my GWB blog at that time. Check it out for details.

Background: First To Second Gathering (Warning: Boring Part!!)

The .NETwork gatherings so far are more like small independent events. We -SilverKey Tech- were the first to start such events with our full day event, DemoDay (See GWB posts on DemoDay I, DemoDay II ), and later ITWorx had their CuttingEdge Club (See GWB post); which were both great corporation contribution to the developer community (and I believe we need more guys to start doing similar events), but, didn’t have much of "offline user group" nature between each round of either events (although almost each of us is friend to the other or at least friend of a friend!!). While .NETwork preferred the same "event" model, they had online and offline communication between the users of the usergroup (although mainly between students and organizers so far, but it’s a step anyway). It’s very interesting what Mahmoud Ghozz (one of the organizers) told me that the 2nd gathering session topics/speakers setup was done mainly through just phone calls!

So, in the 1st gathering, they were very successful getting all support from Microsoft Egypt, who held the meeting in their building and provided deserts as cool treat, LOL! They also used corporate contacts of the organizers to get Steven Forte (a frequent MDC speaker) to deliver the sessions. That was more than great but it was hard to keep. I think there were two main issues there: the fact that the gatherings need a determined location that can be available for "frequent" gatherings, and the other fact that to comply with the event model and also for the sake of hosting more events, the speakers need to be "local", from Egypt. The two goals were so clear as Remon (the main organizer) announced them in the 1st gathering, and were nicely achieved in the 2nd one.

The idea was simply simply getting the location from a private university. Sure any university would welcome that! They chose the Canadian University in Egypt, which was (like all private universities) quite far from Cairo that it still required buses to get the attendees (Not sure whether the university or Microsoft Egypt – who also brought free food I heard :D – provided the buses), and got an Egyptian MVP and Egyptian Microsoft Redmond Employee to deliver the sessions. That was a great step in stability that I heard some intentions that the gathering is going to be in the same location every 3rd Saturday of every month. Great news to here :).

So, as you see, it’s insightful great advance, and I really like that to the extend of getting you too bored before starting walking through the sessions, so, let’s start!

Session 1: WCF – Messaging & Channel Model (By Khaled Hnidk)

Khaled is a BizTalk MVP, and when he talks, you can see clearly that he just knows pretty much what he’s talking about, which used to be a little bit missing from certain speakers in events I attended during the last few years (but is increasing nowadays thanks God). It’s interesting how he went slowly during the session, but still delivered one of the deepest sessions I have attended in the topic (and I have attended many!). What helped this is that he was wrongly thinking or informed that the session time was 2 hours not 1.5, so, he a lot to say, and those who know the sessions I deliver or attend know how much I LOVE that ;).

As most of the attendees were students (I may talk about it more thoroughly after covering the sessions), he started the talk with regard to Webservices, why they exist at all, and the webservice (ASMX) model. When a client want to send a message to the service, it needs to serializes the message, send it through a transport layer (client proxy), get to the service transport layer, which de-serializes the message in order to process it. He discussed the idea of dispatching (directing requests to service method calls) in that model through WebMethod attributes. After processing, the service response is sent back to the client through the same steps, but in opposite direction.

Then he went into webservice model limitations. You know, in terms of method of communication and static host, requiring HTTP method (and hence HTTP server) to work, and also having to define security through attributes making the security code that’s part of the message header something you care about when writing the service itself, and have to maintain along with it (although it’s not part of the service logic). Added to that the limitation of the message itself, for example, as the message size would be dependant on server general web settings, and you have no built-in way to define metadata of the service (i.e., how about a sequence required for message calls?). He mentioned how WS-* standards have come to sort of try to work around such limitations, which required Microsoft to release Webservice Extensions (WSE) to support those in its ASMX implementation.

Well, as you may think, that was a where the talk of WCF started and took place. Khaled reminded the audience that now we have multiple ways of communication. On .NET, there’s COM+, Remoting, Webservices (ASMX) – hey, with and/or without WSE -, which are too much. Of course other platform vendors have their own stack of tools/standards as well (like the stuff coming from IBM). Yes, of course. That’s what WCF came to unify and improve its model from the .NET developer side. Before going further, Khaled approached Microsoft’s decision on hiring Don Box, the father of SOAP, and having him to work on creating WCF.

Getting into WCF ABC (Address, Binding, Contract), Khaled stated how a message in WCF can be hosted in any application, event a simple console, and the host needs to have an endpoint "Address" to be called through. Getting the client to know "how" to call the service (i.e., whether it requires SSL, what max. amount of data can be sent at a time, etc) is the "Binding". Now what to expect from the service or what the service "can do for you" is the contract. Being recently married, he compared the model to what you do when you get a worker to do some painting or such for your house. To arrange the deal, the worker would example give you his mobile phone number (hey, "Address"). He would tell you "You can call me from … to …" (That’s "Binding"), he will agree with you to deliver a certain service -let’s say painting- (Which is a "Contract"). Khaled noted that almost the same concepts apply to the client.

Still talking about ABC (invested by Clemens, on a side note from Khaled), he showed a figure of the message lifecycle, and focused on the messaging communication:

  • Request / Response (Each client request has a service response on the same wire)
  • One way (A message will be sent and that’s it)
  • Duplex (After a request, there’ll be a response, not in the same time frame, not even using the same address/binding).

He used a funny example of that, slapping! If you slap someone in the room and he slaps you back, that’s "Request/Response". If he just does nothing, that’s "One Way" communication. If he leave you right away, just to wait you (or get someone) to slap you in the street, that’s a "Duplex" communication!!

Going through addressing scenarios and special talk about the transport layer, Khaled had more to say about Duplex Communication. You know, you need to host the service, define ABC of the endpoint. The client is a bit similar, after all, the client has a service that has an endpoint, but this one complies to what what the service that the client requests does define.

Using the same demonstration of ABC and message lifecycle, Khaled went into talking about "Binding". He described the lifecycle as the channel model stack. Below in the stack you have the transport layer (Last), then upwards comes the message encoder (that’s the serializer), and then you have more layers of your choice in the middle, typically the security layer, and then the dispatcher at the top of the stack (First).

Talking about security, he noted that you may want to use symmetric session key (one key for communication during a session), that for example would require the security layer to send additional message (other than the message you are sending itself) to set that key first for the client and then later will use that key to encrypt your message when sending it. That brought up a new topic, "In Band" and "Out Of Band" messages. This concept is important for those who do work on extending WCF features. Simply "In Band" messages are the messages that your service code deals with and has to worry about- in short, knows about! "Out of Band" messages on the other hand are ones your service will not ever know about, like that key message mentioned before, and like the messages of WS-MessageDelivery Large Message Exchange (WS protocol that defines splitting of large message into smaller ones and combining them as one message back). Knowing the difference between both -Khaled reminds- is a necessity for those doing security extensions for WCF.

Still with binding, we went into "Behaviors", as the name implies, this means changing (overriding) the way WCF works. To explain that, we started digging into demos.  The first demo was walking through a pre-created solution (Khaled recommended to have a separate VS Project for each service host, and a separate VS Solution for the service – that’s another VS Solution for the service client). He walked through the defined contract (that’s an interface that the service class implements), and related attributes. Serializing the non-primitive .NET types (say classes) involved in the service and using DataMember on the members needed for the service to operate properly. He noted that out of band messaging like security will be configured in the binding not the service code. He then moved to the service host, showing the snippet to tell the host which service is should host at all :). The host app.config file (which he calls -for fun- app."ounfid", that’s "Hedgehog" in Arabic!) has the binding. He showed how that’s defined using the service class name, and showed different endpoints demonstrating that each endpoint has its own ABC, showing the binding models that come with WCF out-of-the-box (answering a side question, he stated the binding can be defined in code as well).

The next topic in the same context was meta data exchange, defining different channel model than standard. Yes, that’s where the behaviors come to play. The behavior is defined either for a service, endpoint, or operation (Method). He showed how you can for example inherit one of the built-in service behaviors and override its main processing models. An interesting point he showed was using HTTPWS binding on the host (meaning the host will provide the service over HTTP with WS standards), and while just defining HTTPWS binding on the host was enough, Creating a reference from the client application to the service showed that the client had each detail (instruction) it needs of that binding stated in its app.config, that’s like whether there’s quota for message size. That’s "right" because, that client might have been for example a JAVA application that knows nothing about binding and needs these instructions. The last part of the session was tracing the states of the client calling a service, proxy creation, opening and closing the connection to the service.

The next demo started by iterating over dispatchers collection. that’s a dispatcher on each endpoint for direction to class methods, plus an additional undocumented zombie dispatcher that you read about only in blogs, Khaled mentioned. He noted that he "saw very few developers that needed to override dispatchers versos other WCF stuff"

Now we started talking about service instances (creating service object that has the methods to call from the service class) by mentioning state management as the enemy (for the expensive memory it requires), Khaled reminded everybody of having a service instance per message. It was a good time to mention the 4 tenets of SOA (Service Oriented Architecture):

(Note: I merged the original terminology with Khaled’s explanation)

  • Boundaries are explicit: Or service isolation (Each service is a separate contract)
  • Services Are Autonomous (You cannot deploy a service partially, or to clarify: each service should be able to perform regardless of any other service availability or so)
  • Services Share Schema And Contract, NOT The Class (You shouldn’t need an assembly to use the service, just the schema, like WSDL for example)
  • Service Computability Is Based On Policy

Back to overriding service behaviors, Khaled demoed different service instance creation modes (when a new instance of the service is created). that’s Per-Call (every service request), Per-Session (every new client session), and Single (just one instance for all client calls, which is not good for memory performance). He showed us the number of service instances created in each mode for a client connection with 2 service operation (method) calls, and one more connection with single operation making every service instance response a GUID field he added to the service class.

The next topic was "channel factory", he briefly mentioned you create a factory for overriding channel by code, that’s meaningful when the biding is variable in runtime. Speaking of binding and endpoints, I wanted to know his recommendation on hosting services in console-like applications like windows services, etc versos in IIS, He seemed to agree with me that IIS is the practical option, and added a note on the in-the-box power of IIS 6 application pools. He also added that Windows 2008 has another practical option, which is WAS (Windows Activation Services).

The next topic was WCF tracing. Khaled demoed setting up tracing configuration like tracing sources for tracing each message/activity, adding tracing listener to a text file, and opening the trace file using Windows SDK 6 SVCTraceViewer tool, going through the log entries for mapping to service model (like initializing the service host, etc), and showing tracing entries mapping to the transport layer. He gave everybody an few advices. To go home and play with the SVC Viewer tool if they want to learn, and to remember that tracing the host (mainly IIS) would be through Windows Event Viewer, while tracing the service behavior itself would be through that SVC viewer tool.

After a side question about encrypting part of the message not the whole message (which would be for certain business processes) that he recommended instead of having single service, splitting the services and having a central workflow as main service that splits the message and directs it to the right services; he went on a detailed demo for overriding Endpoint behavior. You get a method for applying client behavior (if the behavior is on the client endpoint, if not, just throw a meaningful exception there!), and another to apply the behavior on the service, which he used for a dispatch behavior for the WCF Message Inspection WCF Patterns (inspecting parts of the message and request parameter filtering). You access the message after receiving the request (that’s before executing the service code) and before sending response (yes, that’s after executing service code). Note that a message is immutable (that means you cannot change it). You normally take the message (passed to you by ref), put it in a buffer, do whatever you need to with the message buffer, and use it to create a new message that you replace the original message with. The last step needed after writing the behavior is adding it to the config.

Here was the end of the demos. The rest of the slides and demos were cut due to discovering that half hour difference I mentioned above. The next part Khaled added after asking someone in Microsoft if she believes Microsoft would love to deliver certain messages to his audience. He stated that at the very beginning, but I thought it would be more appropriate for me to bypass it until we reach the part he started telling these messages, and here it came!

The first talk was about BizTalk 2006 R2 WCF LOB (Line Of Business) Adapter SDK . A framework for with legacy code. You create the meta data in band stuff), inherit some classes and implement certain interfaces, which after you’re done can be used as yet other WCF channels than you can be bound to. It has tools that help generate you all you need to start (Overview). He also mentioned the SDK adapter pack which is contains adapters for SAP, Siebel and Oracle, etc. The last words were about "Project Oslo", which is a set of process/workflow modeling tools that aim to be the actual runtime of the code, not just a code generator like WF designer model. He said it’s said to be released with first quarter of 2009, and it’s work in progress with regard to Emacs-like editor.

As a whole it was a great session. although many things had to be simplified for the majority attendance of students, and, that misunderstanding of time thing made us go very slow  in the beginning, and then have to skip parts at the end. Still, the guy is pretty knowledgeable and I now that next time he presents, I’ll likely be there.

Session 2: SQL Server Manageability (By Mohamed Meshref)

I used to know Meshref in ArabTeam2000 forum (a short while after he was accepted to join Microsoft SQL Server Team in the U.S.) and later MiddleeastDevelopers yahoo group. He is know for having a special way in talking about stuff, especially when it comes to talking about Microsoft (and it always does of course). Unfortunately, the guys was kind of sick yesterday (Oh, it’s already yesterday!), and it was hard for him to do the talking, however he managed to deliver a light interactive session with good demos still :).

At the beginning, Meshref went talking about Resource Governor, it was mentioned by Steven in the first gathering (which I wrote about), but, I think it’s an essential feature (Many guys were "not" of the 1st gathering attendees still, and it didn’t take much for the talking).

The next features he talked about were all built with regard SMO (SQL Server Management Object), that’s a library that has representation of all SQL Server Objects that enable doing something like another SQL Server Management Studio theoretically possible (Just kidding – let’s say a way to reach many parts of SQL Server Management Studio features by code). That’s very logical building in my opinion and I like the fact that Meshref and the other SQL Server did stick to it.

The biggest feature Meshref talked about was Declarative Management Framework. This is basically a policy management framework. It allows you to define a certain policy on any object available within SMO (You do it normally through the familiar management studio), like setting a certain naming convention for all tables in the DB for example, and the policy can be applied to all DBs in the server, and/or exported to other server(s). Meshref went on demoing the creation of a new policy, showing that a policy can consist of more than one condition (and each condition can be reusable in other policies – think of it as Many-to-Many relationship). He showed how the policy does prevent violating it when enabled, and then went back to show us how we can set a description for the policy to appear to the user trying to violate it.

Afterwards, he showed how we can "evaluate" our policy. That means seeing which objects do not comply with the policy (for example, objects created before the policy was created and and set active). At this point, Meshref mentioned the difference between the two types of conditions:

  • Deterministic: Those are the fixed rules, similar to setting a certain property of an object to always have a certain static value. The cool thing about such conditions, Meshref demoed, is that when you are using it, and checking what objects do not comply to your policy, you just click a single button to make SQL Server apply the policy for you on all the non-complaint objects or only one of them.
  • Non-deterministic: Those are the dynamic conditions well, the conditions in all are a bit limited to say "dynamic"!), En example to that is defining that all your table names should be "like ‘tbl_*’". Such condition cannot be applied automatically. You click the same button, but to apply it yourself this time.

By the way, I asked Meshref whether there’re performance worries when using large number of policies (yeah, I was thinking of managed stored procedures), and he said that they tested them over huge number of policies (I think those were 15,000!!!), and I shouldn’t worry.

Before going to the next demo, Meshref highlighted that the DMF is a SQL Server Engine feature, not a feature of SQL client or so. It makes sense and was important for feature after the demo. The demo was setting different policy modes for when the policy will be evaluated:

  • On Demand: Policy evaluated only when you go evaluate it yourself.
  • Schedule :Using SQL Serer agent to evaluate the service according to certain schedule and log that.
  • On Change Prevent: The policy is enforced. No one will be able to bypass the policy as long as it’s enabled
  • On Change Log: When someone tries to bypass the policy, this is let go, and just logged

The next feature was Multi Server T-SQL. This is a small SQL Server Management Studio (SSMS) feature that is still great. Simply, this enables you to right click the top of the Servers tree in SSMS, choose new query, and the new query you write gets executed on all the servers you have registered in SSMS. Because this thing is on the client side, the registered servers can be any version (well, I think I mean SQL Server 2000+ still).

The next demo was on PowerShell Integration. Being able to write something like "CD [ServerName]", "Dir" (gets DB list), "CD [DB Name]", "CD Tables", "Dir" (gets stables list in the DB) is really fun thing to do :D. This is intended to replace SQLCMD old SQL command tool as said by Meshref. I asked him whether I need to do anything on the server to access it via PowerShell on another machine, and he said it’s the same stuff required to use SSMS against it from another machine – interesting!

Then he demoed SQL Server Intellisense. I don’t need to talk much about this I guess :). Meshref stated that they do caching of the objects you use to enable some sort of "Client Complication" as he called it, which is validating your query (including column and parameter names, etc) when working against a remote Server without having to actually send the query to it.

The next big thing was "Data Collection Framework". That’s a SQL Agent based feature that is very useful for dataware housing through it’s performance monitoring collection sets and their collection items. He demoed us sample reports of what is collected and it was SQL Objects usage reports, and performance measures (CPU, Memory, etc). The two questions he was about this feature was that whether this requires SQL Reporting Services, whose answer was No, and whether it’s available to consume through SMO APIs, and the answer was yes.

The last thing he showed before the session ends was a small [x] that appears next to objects in SSMS when they are not compliant with current policies. Good to see. Actually the rest of the session was mainly weird questions from some attendees. Maybe I talk about that in a next post

Conclusion (You knew there has to be one!)

OK, it’s morning already, and today is suddenly yesterday. I just wanted to say that I really enjoyed the day and the cool guys. The day was great, and I wanted to tell .NETwork what I believe is missing here.

Actually the .NETwork guys as I mentioned have made great success in setting up sessions. You made a great frequency. You maintained communication between half or so of the group members, but this leads to ask about the next step. I believe (as I said to Mahmoud) that there should be friendly group gatherings with even higher frequency than the events. Those can always be with little number of guys and with normal talks without sessions or having single session in the meeting. That’s mainly how I hear about usergroup most frequent activities, and I’d love to see it. I believe that this will eventually attract more professional developers, whose presence will help raise the levels of the starting level developers, because with having starters as the majority always, you find yourself sort of stuck in certain level of knowledge exchange instead of increasing that level. I think having regular gatherings in certain times as that "3rd week of a month" intention as well as more smaller gatherings will bring more developers whose presence can take the hands of those starters. It’ll take months to be sensed though. I’m not talking about 3 or 4 months here, but 7 or 10, but that’s affordable I believe as some guys tried for few years.


To everyone around, I’d like you to check the usergroup and attend the next gathering. I’ll post about it enough time before it happens and will link to the session slides and videos as soon as I know they’re available, but, don’t count on me, and check the usergroup yourselves ;)