On #EgyGeeksOnSkype => #EgyGeeks, and .NET

Name Change: #EgyGeeks

Our first meeting on Friday, or technically the first hours of Saturday (starting 12 AM), we found technical difficulties in establishing the conversation on Skype, with around 25 attendees, and the need to share desktop view with the entire group, for the first part of the gathering (Ayman’s session).

That’s why we decided we may have rushed it by including the word “Skype” in the name. I don’t know why we needed a name and all that anyway, because the idea is simply some friends who have common interests (all do .NET related stuff) that meet together online weekly talking about their common interests.

Methods of Communication

For twitter, since this gathering used another tool “webex” for conferencing, and we haven’t determined yet how we’ll manage the next gathering, we changed the twitter hash tag to just “#EgyGeeks”.

Also, we created a Google group to enable us to email everybody when we settle on how the next gathering will be. The group has the same name”EgyGeeks


We agreed we won’t focus on any other online activity like facebook group etc.. until we settle one or two more gatherings. However, some friends already created a couple of facebook pages for it, which is welcome effort from their side anyway, except that one of the pages is called the “official page” (no official page yet) and the other page has me, Ayman and Ramy admins for it, asking us to focus on that page or this. This reminds me with classic Arab forums efforts. Arab guys, you know what I mean!

imageWhy .NET ? Why .NET Only ?

#EgyGeeks is NOT about specifically .NET!

When we first met, we were all .NET developers. We decided we want to meet talking about our common interests. And asked all friends who have similar interests to join us as well.

But, what are those interests? If you are in .NET world, you care about many things, .NET is only one. you probably also care about SQL Server, Oracle maybe, Agile methodologies, integrating your work with graphic/web designer and also QA/QC/testing/process people. So, those all are candidates for upcoming talks. if you notice, the first session we had was about “SharePoint No Code Solutions”. So, it’s around what typical .NET related people would think is important.

This is not new by the way. this is what dotNETwork offline user group for example is about. It’s just we’re doing it online!

I want You To Talk About “X Y Z”

Now that you know what we are about, you are likely to know whether your topic may interest the most guys or not. You can send a suggestion to the Google Group for specific topic and we’ll have a vote on it.

If you have a totally unrelated topic, you can get friends who care about it and start something. This does not mean we’re selfish or we don’t welcome contributions. But of course talking about Linux or such won’t interest most of the people.

If you want to start that, we’ll help you based on our small experience yet with this group, seriously.

How Can I Choose The Next Topic?

Since the topics belong to the people, this is what happened in first gathering:

  1. We asked everybody who attended to suggest topics
  2. Ayman collected the list of answers
  3. Ayman created the following online poll:

Poll For Next Gathering Topic: Pre-Organized Session And Open Talk Time


You just go check the poll and tell us what topic you want. You can choose from the list or write your own suggestion.

Who is Organizing This?

For now me, Ramy Mahrous, Ayman El Hattab,(sharePoint MVP) and also some small helping network containing Shady Naguib and Yasser Makram (Silverligth MVP). Some of the network were there from the first unplanned gathering also and are very passionate about it like Mohamed Gamal and Doha El Sayed, Emad Mokhtar.

Thank you very much for attending CairoCodeCamp`10 – Session Slides

My first DotNetwork Cairo Code Camp in 2009 was a great experience, because it was one of the biggest events I’ve spoken at (in terms of audience count, similar to SilverKey Demo Day II). However, Cairo Code Camp 10 had a much different taste!


Not just that I met Scott Hanselman, one of the most popular Microsoft guys, and hold him down as you see in the picture (which I’ll never forget), the great person and popular guru…


Not just that I met so many great other speakers, many of them are my friends and some of my friends talking for the first time in such event or after long pause…


But also because we all (speakers and organizers – both volunteers) met so many great attendees. Some of them were interesting people I’ve followed on Twitter for some time and haven’t seen them yet. Some of them were old lovely faces that we meet very rarely (especially I no longer work  in Egypt). Some of them were totally new faces, bringing a lot of ideas and very useful discussions….

Thanks a lot everybody. You made Cairo Code Camp 10 the sweetest speaking experience yet for me. I really hope you had as much fun.

Give Me Those Slides

Now to the part you are probably reading this for! I promised the great guys who asked that the slides will be up on this blog in 3 days maximum after the event closing although probably they’ll be available by DotNEtwork pretty soon. So here they’re below.

It’s really sad we couldn’t get recording this event also. You can’t imagine how hard the setup for this can be. I may consider next time to buy an extra microphone and record the talk as a webcast, but usually things are not that easy.

Using jQuery To Survive In ASP.NET Webforms World

here are the slides hosted on SlideShare:

Session Downloads:

Download: Using jQuery To Survive In ASP.NET Webforms World.pptx

Download: Using jQuery To Survive In ASP.NET Webforms World.Demos.zip

It’s interesting how we went through jQuery all from beginning. I’m so happy the goal from this session was achieved, which is to show that jQuery can does regular tasks we see in many websites without much of the pain we picture in our heads once we think about JavaScript.

Introduction To ORM Patterns With Code Samples In NHibernate

Here are the slides hosted on SlideShare:

Session Downloads:

Download: Introduction to ORM Patterns with Code Samples in NHibernate.pptx

This session had three goals, one is to open minds about patterns and practices and choices instead of follows, which was accomplished. the second goal was to introduce some common ORM patterns, which was  partially accomplished. The 3rd goal was introducing NHibernate, which we didn’t have time to since the open talk was getting much more benefiting information.

I hope most of you liked how this went, and for the rest and everybody, would you like me to refer to existing NHibernate resources that I find most useful? (most of them are in the last slide in presentation), or create my own article on it? Or Screencast? And if so, would you like them to be in English or Arabic? (which reserving terms in English of course).

Tell me and I’ll work on something…

Thanks to all of you…

This event would never have been so great without the participation of every organizer, speaker and attendee. You guys created all the great atmosphere that I will be missing probably until the next big event – only if it has you or people as great as you were. Thank you very much for everything.

Related Resources

Usually the twitter accounts are the most updated of course (maybe more than you ask for sometimes), and the facebook group/page profiles are used for emailing members/fans with the more important news. By the way, my twitter username is @Meligy.

Thanks a  lot.

See you all in dotNETwork May 09 Gathering in Egypt, Lesser known .NET Enterprise Patterns & Practices




There was a sudden last-minutes issue with the transportation / flights configuration that prevented me from making it to Cairo. I’ll be unfortunately missing out this event. M. Smay my friend will be a great backup with all the additional details he has to provide about his session content as well as an open session for the convenience of all of you.

Sorry for missing out. I had to. I’m working with dotNETwork to re-organize my session as part of June 2009 gathering, but this is gonna be another story!


Most of you already know I have moved recently from Cairo to Abu Dhabi. What only a selected set of you are aware of, is that I am still having my heart all set for the developer community in Egypt and still communicating with many of them via Twitter; not only that developers in Abu Dhabi are not into spending time in gatherings or anything than doing work and surviving, but also because I have made the only long lasting and fulfilling friends relationships with the key persons that I see in the different communities, especially my old friends from Microsoft MDC and ArabTeam2000, Demo Day attendees (who still talk to me since 2007), and – of course – dotNETwork, admins, speakers, and participants (who are much more than just attendees).

Fridays City Stars 23rd of May 10:00 AM – 01:00 PM

This Saturday isA I’ll be giving a session that relates to one of my beloved topics in development. Here is the information of the session:

Session Title

Lesser known .NET Enterprise Patterns & Practices

Tag Line

Is your mind ready? Booting up journey in enterprise patterns & practices in .NET

Session Summary

Through an illustration and a thoughtful discussion we are going to see how to go with our applications to the next level, leveraging ease of maintenance, integration points, and scalability out of the box; showing sample enterprise patterns and best practices that are very popular in many development platforms but are rarely used or even known for typical .NET developers

The session will be like April’s session in Fridays City Stars, Nasr City. If you want to know what that is, this is because the Canadian University in Egypt  has stopped all activities in Saturday temporarily for reducing cost; you know, the crisis!


Agenda, date and location

  • Lesser known .NET Enterprise Patterns & Practices
    by Mohamed Meligy – Information Analyst, .NET Technologies – (Injazat Data Systems, Abu Dhabi)

  • A lap around Visual Studio 2010
    by Mohamed Samy – Technical Architect (iSource Egypt)

Fridays City Stars 23rd of May 10:00 AM – 01:00 PM


Have you noticed something? Yes, my closest friend and one of the most lasting / oldest friend in this life, and in the field of course, Mohamed Samy, will be giving a session the same day. HE is such a true guru, and I fear everything ‘m going to say may look very pale compared to what he has to say about VS 2010.


By the way, the attendance will require you to only pay 19 EGP or so– for a sandwich or meal that YOU eat (they have discounts for attendees). This is the host requirement and dotNETwork has NOTHING to do with it. After all, the only available host is now a commercial place. If you can help dotNETwork host the sessions in a completely free place, please contact anyone from dotNETwork and help get that done. PLEASE.

Anyway, I think 20 EGP for something YOU get within the day is not very little but not much also. I saw guys paying the same to the cafe near the University when it was hosted there.


Please be there. I know everybody was too busy to do right publicity of this event, and I myself am writing this very shortly before the event day, but, I’ll not be able to come back to Egypt even every few months, so, this time is very rare for me. Please let me meet the most of you who can make it. This is a personal request, to my true friends. period


Related Sites


dotNETwork CodeCamp ‘09: Framework Design Guidelines & Managed Extensibility Framework (MEF) Slides Available

First off, thank you all so much who have attended the very special gathering of dotNETwork user group, Code Camp ‘09, that took place in the British University in Cairo (BUE) during last Thursday and Friday. This has been one of the biggest events I have been talking in, and that was a great honor.

You can find the slides for the sessions I have been giving below:

Framework Design Guidelines

Download (PPTX File):

Managed Extensibility Framework(MEF)

Download (PPTX File):

(Note: Links to the source code are in the last slide)

Notes On The Event

The speakers and dotNETwork Team

The event went with a similar theme to Microsoft Middle east Developer’s Conference, MDC, which became Egyptian Developers Conference, EDC, which used to take place annually in the beginning of February, but, is yet to happen this year. I’m not sure whether I should be happy or sad for the fact that many attendees came to the event thinking it’s organized by Microsoft as another replacement to MDC/EDC. To make this clear, Code Camp is organized by an independent user group of 11 organizers, known as dotNETwork group (I mentioned a lot in my blog), and was sponsored by Microsoft Egypt, and number of international companies (sponsoring foreign speakers transportation), and the British University in Egypt (BUE, hosting the event). All speakers (foreigners and Egyptians) are volunteers.

Within tow days, with over 300 attendees, and over 10 speakers from both Egypt and world wide, and a great variety in topics, dotNETwork has excelled to make this a GREAT experience for everybody. This is one of the best events I have attended ever in general, which  compares with great improvement to the other best events/sessions I have ever attended/delivered: MDC 2005 (if you skip the Bill Gates pat!) and SilverKey Demo Day II.

Thank you very much dotNETwork and great attendance for the true nice time!

PS. I have notes from the other sessions I have been to as an attendee not as a speaker. Those will be available by the ened of the week or beginning next week (God Willing). Hopefully this time I’ll make it in schedule.

Related Sites

dotNETwork 10th: Architecture Speaking for Itself (DI / AOP)

As ever, there’s

The usual intro …

The .NETwork day for December that took place this Saturday as the 10th group gathering/event was pretty much worth being the day that makes a whole year for .NETwork group, which started December 2007. The day was pretty much different than usual, maybe similar to the very first gathering in organization, and some other days in topic, but the style and taste was a bit different. Pretty much concentrated, although on a variety of topics.

The day was just a couple of sessions. Love it or hate it, no parallelism there. The sessions were given by a single speaker, Omar Besiso, a half Egyptian senior Architect living in Australia, a consultant, Tech Ed presenter, book editor and reviewer – a very great guy as I’ll explain later :).

Actually I really enjoyed the first session. Really want to attend / give many similar sessions in the future.


I have not been very honest while writing this! Since I have a similar interest in the topics discussed during the session, I have written some parts of the post that were not said during the presentation the same way,a and provided some examples and such that represent my own understanding which may or may not be the same as Omar’s.


Lets give it a strong start :-) …

… On Architecture

“Who here is an architect, or works as an architect?”

Having a very quick meal just before entering getting us exactly a minute late (me and Mohamed Samy, my dear friend, without getting lost in the way this time), and before we finish plugging in our laptops and firing OneNote, we were hit by the question as the true start of the session.

Of course I and M. Samy stood for it. This led us to talking about what an architect does exactly. the short answer is “everything”. He designs applications, interfacing between those applications. He meets customer. He still writes code and maybe Prototype or Proof of Concept. But there are types of software architects:

  • Solution Architect: Close to the team decided to work on the solution, performs architecture for a specific solution.
  • Enterprise Architect: This is the one that does everything communications to the office boy and to the CEO. In other words, he handles the solution from the very beginning of whether to have a single solution or series of connected ones.

That talk was before Omar introduces his work-in-progress book “Reactive Programming & Domain Driven Design”, speaking on himself as a “Not technologist.,, but very low Java IQ” (It was interesting to know such exists!). This means that he has no special feeling about any specific .NET technology, or a language, and this is very important, to be able to mentally choose the right technology for the right situation (he made another statement that he uses SharePoint whenever the budget allows, plain ASP.NET only otherwise, which is another interesting topic). However, this is all on top of the .NET platform, as “The technology-Independent architecture that we heard of in the 90s is no longer a fact”.

… On Architecture Myths and Data Driven Architecture

Those are the things most people believe in and do, while are no longer relevant to today’s and future architecture.

  • Myth No.1: 3 Tier Architecture
    • You know this  UI –> Business -> Data thingy!
    • Of course we today know we need other layers
    • How about logging, where does it fit here. Object Pooling, etc…
  • Myth No.2: N Tier Architecture
    • There are so many styles, but usually that’s what it ends to: UI -> External Service –> Business –> Internal Service –> Data
    • The point is, as in the next myth, that is all goes in circles around data.
  • Myth No.3: Data Driven Architecture
    • Bring the DB, fire up the DAL generator, build some “business” that just calls this and bake some UI for it.
    • The argument here was: what if you do not have exactly a database. How about things like Office or Photoshop or so.
    • “We use CodeSmith/.NETTiers as our architecture” What a statement. Is code generation exactly an architecture?
  • Myth No.4: Architecture and design are an overhead
    • Architecture is like an investment. Omar quotes: “If every investment is an overhead, it’s time to sell your assets”. To be fair, I mention he has been working with big projects of hundreds of developers still in one project.
    • The point is about maintenance and updates that takes most of the real time of a project. It’s about responding to change, and the time it takes to actually do respond to that change.
      • For example, for an interest rate value to change, this may be as easy in your design as changing a configuration value, but, how about changing the way this interest rate value is used or the interest way of calculation?
    • Side Arguments:
      • A bad architecture can cost an entire rewrite of the whole solution from scratch not even parts of it. Sometimes if things go bad such a decision is the right one to have.
      • No university on earth teaches the “right” software engineering! Even MIT has hundreds of methodologies, that you don;t know which to follow.
      • “Do not let a software engineer build your house”, you cannot afford a bug or rebuild in there ;).

Clearly, Omar is against the Database-First approach. I heard the same things many time on ALT.NET threads, and it takes many posts to talk about without much benefit, but anyway, Omar’s main argument is that you heart your model (say the classes you use to represent types of business objects, like “Product”, “Customer”, etc) so much when it is just a representation of your database row.

If you change a column in your database for whatever database performance reason, and the model class is a serializable one, and then you de-serialize an objec serialized before change. How will you manage that? (I actually had the same exact situation before, with an object serialized to be persisted in Windows Workflow and de-serialized after months where the class changed due to coupling to the DB).

… On General Guidance

Here came some general notes on achieving in software. Software NEEDS to be (just as in those old computer science books):

  • Highly Cohesive
  • Loosely Coupled
  • Hardware Independent
    • Not that it works on PC and Mac :)
    • But that it (as much as possible) works on 1-processor single machine to a farm or cloud of servers with so many logical and physical processors in them.
  • Reliable
  • Performing
    • Concepts have changed here. People now no longer apply a rule like “reflection is too expensive to use in our applications” (and many great things we see today use reflection heavily in their core)
    • Odd enough but works: In many situations, when you have issues with performance, you just put more RAM (Hardware in general) into it until later you fix/re-factor. Hardware is cheaper than programmers.
  • Maintainable
    • This is what today’s designs and patterns focus on most.

In general, software is developed to fulfill certain needs. It need to be architected and planned to fulfill those needs. Software needs to be:

  1. Envisioned
  2. Planned
  3. Executed
  4. Adapted

… On Layering With Recent Architecture

Then Omar went on talking about architecture in a bit weird way. He went through architecture of the future, and afterwards, of today.

Here’s how he sees architecture of the future:

  • Subsequent of the past
    • New Tools, Old Patterns
      • Design patterns have been there for years.
      • The best way to describe Service Oriented Architecture (SOA) is in terms of component oriented design, the same concepts of the old COM+.
      • Service Locator and Dependency Injection are just glorified factory patterns.
  • Destruction of religious discussions
    • Religious Discussions
      • Dynamic Queries vs Stored Procedures
      • C# vs VB
      • Plain ASP.NET vs SharePoint
      • …..
    • As mentioned before, do not special feelings about a certain technology.

To reach this, that’s how an “Architecture of the Present” consists of for Omar:

  • Consumer
    • ASP.NET, WPF, …
      • Note that a WCF service that depends on another service or solution is also a consumer of that
    • Needs to talk to black box that has the engine
      • Knows nothing about implementation, just a contract
      • Normally you should be easily swapping implementations (contents of the black box) while keeping the interface(AKA, the box).
      • Black box is only DLLs, with no tech, not It’s not SharePoint not anything, the only dependency for it is .NET framework.
        • I asked Omar how do you test and mock work that you do in MOSS (SharePoint), he said that it’s usually just dump code that calls WCF services that are actually the front faces of all the real operations.
  • Domain
    • Entities and Services
      • Entities are the model, again, the “Product”, “Customer”, etc. To explain I tell you they do NOT contain anything except their own knowledge. No persistence or such.
      • Service are:
        • Data Services (“UpdateCustomerRecord”)
        • Business Services (“CalculateDailyReport”)
  • Core
    • The very basic entities and interfaces for the services
    • The contracts live here, the implementation goes to the domain.
    • Say this is a VS Class Library Project. Then this will be the only Project that does NOT depend on other Projects in the Solution, and mostly all other Projects will be depending on it.
  • Aspects
    • Cross Cutting Concerns, the things you perform/need for almost every solution
      • Validation
      • Security
      • Logging
    • They should be implemented in a way that provides consistency path. So that developers are not confused when writing it.
    • Omar says those should be injected. We’ll see how next.
  • Only now after defining those, Omar tends to create the database.
  • Then comes the actual service implementation.
    • He uses dependency injection to makes the consumer just calls the domain via the contracts (interfaces) to and then the implementation gets injected.
    • For Aspects, he uses Aspect Oriented Programming (AOP) / Policy Injection to save the developer from writing those for every method / property.

… On Dependency Injection

Dependency is about interface oriented programming:

  • The Core will have its IService interface
  • The domain will have its ServiceImplementation class that implements the interfacen.
  • The consumer will NOT reference the domain directly. It’ll call “something” called Dependency Container that returns an instance of that interface.
  • The container is then configured to return an instance of ServiceImplementation whenever it’s asked for an IService.
  • Normally you wouldn’t have interfaces for entities (just the services).
    • So, you might not have IProduct interface, but most likely you have an IProductRepository (a data service for Product).

Think of contracts for your day-to-day services. Say a Plane Ticket. This is an API, an interface. It has Date, class of food provided, flight no., etc…, but it knows nothing about the exact physical plane that will hold this number, how it works, or the name of its captain, because this is all implementation detail.

This guarantees ease of changing the implementation (say replacing the plane itself). Services need to be designed by the architect. Of course they all reference the core (which holds the contracts), hence you can easily have other service implementations later.Note that the entities implementations are just testable unit/implementations on their own with no special dependency/reference

Again, the cores references nothing,and most other layers reference it. That’s why internal dependencies need to be defined. This is what products like NDepend provide today and what VS 2010 is going to have built-in.

… … The Service Locator

This is just a factory. It’s job is to locate the service implementation (I’d ask you to imagine a GetProductService function with return of type an IProductService as a service locator). That’s how the consumer never talks to the domain. It calls a Service Locator to get a reference to the service without knowing anything about the service except its interface that lives in the core.

There’re two ways the locator can locate and return the desired service. The service type may be written down in some configuration file and it uses reflection or so to get it, or it can perform some other code logic to get the service (which can be as easy as loading some service assembly and getting a specific class from it).

There is no standard for implementing the locators. You may want to provide a singleton object (have a single ProductService and return it every time an IProductService is requested rather than creating a new object for every call). You may want to cache the object for a certain period.So, implementation does differ.

… … The Dependency Injection

What dependency injection adds to implementing a service is:

  • Standard
    • You have a certain library that you call to get the dependency (service). You configure this library for your specific needs.
  • Turns Service Locator into Glorified Smart Factory
    • It can do more functionality, and it has been tried.
  • It can crate an entire chain of objects, not just one.
    • What if you have (and this is not an accurate example or best-to-do) an IOrderService that has one property of type IShippingService, and you want to create the order service and the dependencies of Order service itself. A dependency container library should provide you with a way to define in the same place what order service to use, and what shipping service to use with this specific order service.
  • There’re main libraries for it
    • Castle (Windsor)
    • Structure Map
    • Spring.NET
    • Enterprise Library (Unity)
  • The style is simple, you have a component (any kind of consumer code), it calls a configured dependency container, and this container returns a ready-to-use instance.

To demonstrate this, Omar presented a demo of an IProcessor interface with only a single method: ProcessMessage and a single property SubProcessor of type ISubProcessor, ISubProcessor also has a single method ProcessToConsole. Each of the methods takes a single parameter “”Message” to process.

Now the service factory is easy to create. Using Unity, that’s just a few lines of configuration copied from documentation. The implementation is pretty easy too. Just write the classes Implementation1,Implementation2 that indicate (by simple writing to Console) they were created and called and then pass the message to the sub processors, SubImplementation1, SubImplementation2 that also just indicate they were created and called.

The console program that acts as a consumer was also easy. It has some code like:

IProcessor processor = ServiceFactory.GetProcessor();

processor.ProcessMessage(“The message”);

So, hrere you seethe consumer just talks to the service locator. In the app.config file we tell what implementation to call when asked for IProcessor and when defining that tell it also what to return for ISubPorocessor. To demonstrate, Omar showed calling Implementation1 with SubImplementation2, Implementation2 with SubImplementation2, and even showed that Implementation1 with SubImplementation2 would just work. And run this on the console to see it actually did work.

… On Policy Injection

As mentioned earlier, the policy injection is a pattern that handles cross cutting concerns, the normal things in all projects. Exception Handling, Logging, and Exception Handling would make it for great examples. They’re things shat we shouldn’t be writing code for them everyday!

The way you do this is by using a global handlers that you inject them (say as you do in dependency injection or by putting Attributes on the thing you want to inject into, which is [in OVERLY simplified manner] Aspect Oriented Oriented Programming). Then have then create events that you implement handlers for. Those handlers become the single place to write your policy code (the logging, exception handling, authorization check, etc..).

There are of course frameworks that help you doing this:

  • Castle (Windsor)
  • PostSharp (Code Contracts in .NET 4)
  • Enterprise Library (Policy Injection Block)

The idea of using is similar. The consumer creates object from a factory, then this instance gets a proxy class created around it (similar to the proxy class that gets created when you have a plain old ASMX web service, anyway, it depending on the library and whether it works in runtime or compile time) around the object, and have events in every property/method in that proxy, then others can subscribe to those events later to inject their policies.

To illustrate, Omar presented another demo. He had a Calculator class (that of course implements an ICalculator) with one method SubtractTwo(number) that just does as its name says (subtract 2 from the given parameter), and showed how to use the Enterprise Library Policy Injection to put a logging handler for it that was set in conifg for all objects of type ICalculator. That’s how the policy is applied to all objects from configuration while the consumer got the ICalculator object itself normally by asking a service factory to create it.

So, as per Omar, that’s how you would do it (like other parts in the post, made longer to illustrate more):

  • Configure what implementation to attach for the specified contract
  • Configure what aspects to to have along with entities and services that implement this contract
  • Create the the actual implementation of the attached service
  • Wrap it with the chosen aspects.

Omar also showed another demo. A real life code from a real customer (one of the big customers he has been working with). We saw the –now– normal stuff, the core that references no one (with interfaces, aggregates, and service contracts in it) , the services either business (which We things like SomethingEngine or SomethingManager,…), or data (which were called Repositories – as usual in similar architectures).

… On Summing up

On summing up,Omer emphasized:

  • Do not code logging (and such) over and over again
  • Watch for performance, moderately
  • Go for standards
    • Use Standard Frameworks, not no name ones (DISCLAIMER, that’s Omer speaking).
    • Standardize your own frameworks.

I have the feeling that I didn’t include everything here, especially some side talks that were worth noting (some are noted). It was a great session with some discussions that are rarely there except in very small groups. Again, I really want to bring similar discussions, either as a speaker or an attendee.

Then came the open sesion …

Well, This one was an open session. I haven’t seen a “bad” open session in Egypt, but also never saw one that would meet my standards for “Successful”, “effective” or such …

There wasn’t much audience this time (Which is really funny and always happened! Seeing that a vast majority of the attendees are students, when the sessions are prepared to meet this level, the audience that attends happens to include many high rank developers. As you may have guessed, when the sessions are prepared to meet this advanced level …. Yeah, only the junior ones are there. This is another post on its own!).

This time the audience was ready for the session but much fewer than it should have. The open talk session didn’t have much talk then more than a demo that shows Tech ED domo on how to use the MS Reporting Services 2008 Report Viewer to create a report from scratch, publish it to your server, and export it to MS Word n less than 5 minutes. Not something that would impress me personally when it has the “less than 5 minutes” in it and Omar himself said a simple report in reality would take around half an hour to design.

The other talks were all like “”What do you think about using the X… technology in Y…. situations”. It was limited to one-hour session anyway due to accidently tight buses seclude.

Some things that are good for example are mentioning the models of doing software in/outside the cloud (topic brought by Mohamed Samy).Omar said those are the common themes:

  • I build software and build data
  • The two at Microsoft (or whatever provider)
  • Data is here but the software is by another provider
  • Data by vendor and he’s liable to it
    • By looking at the terms and statements of Windows Azure, Omar says he found nothing that expresses liability from Microsoft’s side.

Also, when someone asked him whether to use WPF or Win Forms for desktop “Business” applications. He said he uses WPF for all his applications, for business applications he has a WPF theme that looks just like Win Forms. He explains why he does it this way:

  • WPF works directly on the GPU.
  • XAML is a great language, same like HTML but without all the browsers headache and even better syntax.
  • Basically a business application does not have complex UI requirements, but, if some are requested, a WPF application is ready.

He also mentioned the best way to learn .NET is to open reflector, browse the namespaces and see the code for anything whose name grabs your attention. An example is how Serializable attribute is implemented, it’s just an enum :). another example is how to implement an Object Pool. So that for example whenever an object is requested, no more than say 5 instances are created and reused in later requests. Before you think about the implementation, it’s just there in the BCL,in System.EnterpriseServices.ObjectPool. Just have an ObjectPool with Max set to 5 and you are done with it :) :).

It was a really great day. Thanks a lot, Omar.


Slides for dotNETwork 9th: Applying DDD on Asp.net MVC – Part 1: Asp.net MVC

Thank you all for attending my “Applying Domain Driven Design on Asp.net MVC” session. It’s interesting how things went that we got a bit deep into the ASP.NET MVC framework and have achieved the geeky talk goal via covering the other aspects of ASP.NET. Even that this took the entire session, it is nice that it could benefit the attendance.

I am not sure whether we can arrange another session for Domain Driven Design fundamentals and combining that in the same project while using the MVC pattern and ASP.NET Framework. If you are interested in a similar session, please contact me via this blog or email.

Session Slides

Here are the slides for this session:

Sample Code

For the HaackOverflow code sample and another great presentation about ASP.NET MVC, check the PDC 2008 session: “ASP.NET MVC: A New Framework for Building Web Applications”.

Related Sources

dotNETwork 9th Gathering: Domain Driven Design, ASP.NET MVC, you know, tada tada…


Presentation slides and sample are now available. Please click here to find them!

Poster Yeah, somehow dotNETwork decided to allow me to show all my psychopath about design and implementation in a session with a very weird long title, “Applying Domain Driven Design on ASP.NET MVC”.

Yeah, two unrelated topics. In 2 hours frame, I should be introducing day to day development styles from a different perspective. I had a small talk about the process side of the world. This time we move towards the other areas related to architecture and design.

About the event

dotNETwork is an independent .NET user group in Egypt. They organize a semi-monthly FREE event about various .NET related topics. This is going to be the 9th gathering/event. I have delivered a couple of sessions there before, about Scrum for developers and Design Patterns in C# 3.0.

This time the event will be:

At: Saturday, November 29th, 2008. 12 PM to 4:30 PM

In: CIC Canadian International College

Busses Availability: @ Nady El Sekka, Nasr City (11:00 AM to 11:30 AM)

This is the event agenda, note that session videos will be recorded:

12:00 – 14:00

Applying Domain Driven Design on ASP.NET MVC

Mohamed Meligy
Senior Software Developer,

Information Architecture

Mostafa Mourad
Team Leader,

14:30 – 16:30


Hossam Kamel
Senior Software Enginee,

BizTalk-SharePoint Integration

Hossam El-Deen M. Barakat
Senior Software Developer,

The sessions are all really great. Again, the parallelism hits me once more. I know almost all the speakers, Maybe I don’t know Hossam Kamel that well, but I heard very great things about him from friends. While on the other hand Hossam El-Deen M. Barakat will be giving a session that I attended the smaller version of it in Raya. IT was more than great explaining things I thought were too complex that just happened to be so easy, and … Man, I know I must attend the complete one. But this is special to me because I have hit so many IIS 7 issues before and played with its various interesting features, so, maybe my choice is not the best for you.

The one I really regret to miss is the one Mostafa Murad will be delivering. Once more I’ll have to do much effort to prevent myself from leaving my own session and go attend the session in the other room!!

I expect it to be a super great day.  The session topics and speakers are of a very high quality, yeah yeah, except that white guy in the beginning called Meligy or Something and his weird session :).

About the session topic(s)

Domain Driven Design

Domain Driven Design (DDD) is a thought paradigm. This means it is a set of thoughts to have in your mind when designing software. This usually has its effect on how you organize your layers (and question yourself whether the 3-tire typical model is truly the right answer), and affects also how you write different pieces of functionality in your code (which happens to meet some OOP principles that are not emphasized usually in day to day work). It also introduces some other concepts like Dependency Injection (DI) / Inversion of Control (IoC).


One of the patterns that fit pretty much within DDD style is Model View Controller (MVC) design pattern. The idea of having some way to represent business entities in a way independent from technical operations calling them Models is the shared part, having a core business flow and control in the Controllers, and a dumb View that only gets the model from a controller and knows nothing except how to display it properly. There have been some famous MVC frameworks in the world that were built to make it easy to develop applications applying the MVC style. The one that was highly noticed was one called Ruby on Rails. Microsoft has recently developed its own MVC framework calling it just as it may sound: ASP.NET MVC Framework.

Wrapping Up

So, during this session, I’m going to try to touch the surface of both the concepts and tools and how they all play together. Of course I will not be able to go deeply in any of them because each requires a separate session,but just introducing the mindset and throwing out some names will be something for the session time. My purpose is to get you leaving the session, and opening your favorite search engine looking for more information about the topics.


If you have some time to invest,go see those great guys. If you have sometime to waste, come to my session and lets go crazy together :).

If you decide to attend the gathering,please mark yourselves as attending in the facebook event page, so that the organizers can estimate the number of attendees.

Related Pages:

Design Patterns Via C# 3.0 – Presentation Featured on SlideShare!

Slideshare is quickly becoming the defacto standard for sharing presentation slides, just as YouTube for videos, and Flickr for images. I recently got into the habit to share my presentations there and use the embed feature to include it in my weblog, and this was the same for the "Design Patterns Via C# 3.0" session.

This morning I got this email from SlideShare

Hey Mohamed_Meligy!
Your slideshow
Design Patterns Via C# 3.0 has been featured on the SlideShare homepage by our editorial team.
– the SlideShare team

WOW .. I couldn’t believe it until I went to SlideShare.net and saw it myself …

Featured Homepage


Thank you SlideShare. I never expected the slides to be interesting to that extent :D :D :D.

dotNETwork 7th: Design Patterns Via C# 3.0 Slides and Demos

Design Patterns Via C# 3.0
View SlideShare presentation or Upload your own. (tags: design patterns)

Yesterday was my 2 part session about Design Patterns as part of dotNETwork 7th gathering. Thank you all guys for being there, There was so much interesting stuff about the audience. The conversation we all had even before the session starts, the interaction with all parts of the session, and the great questions.

Thank you all.


You can find the slides for the 2 parts combined in single downloadable file.

Download the Presentation Slides

For the code examples/demos, you can find them in single ZIP file as well.

Download the Code Samples


I hope you enjoyed the session.

Related Links

dotNETwork 7th Gathering: Delivering Design Patterns via C# 3.0

dotNETwork, the most active offline user group in Egypt is having its 7th gathering next Saturday, August 30, which will have two parallel tracks for the first time in the group gathering. BizTalk Introduction, and C# 3.0 Design Patterns, which I will be delivering!

Facebook Event

If I were you to attend the event, it would have been a hard choice too (unless you go simply for BizTalk) ! BizTalk beginner introduction as a topic was not delivered in public sessions before. The only BiTalk sessions I know of were either advanced ones or introducing newer version to those familiar with old version. If you are my friend or you are pretty much into patterns, you may want to give what I have to say a look.

The session parts were primarily intended to be in a couple of dotNETwork gatherings. Now that dotNETwork decided to try out the parallel tracks model having two sessions in the same topic in each track (which is a decision I really like, except that I’d love more distinction between the topics), it was logical to have them in the same gathering / track. I have been thinking whether this should go for the simplest level possible ever, then, decided to stick to the original plan, and even use the long time available for the presentation (1:30h for each part) to go say more about related topics, as I have so much interest in delivering this in certain way for long time now.

About the Session

I’m still messing around with the agenda / exact sequence of the components to be delivered in the session, but I’m going for making an intro to so many topics. The session is meant to target a very wide range of developers. Pretty much anyone who knows a little about C# 2.0+. I’ll start by identifying what a "pattern" means, and then go talking about different object oriented design principles, meaning things like OCP "Open Closed Principle", not "what’s the different between class and interface?" or "what are abstraction, polymorphism ?" stuff) assuming basic knowledge of the latter but still going through it.

I’ll present around 2 examples of each category of the gang of four object oriented design patterns, and probably a couple more from other sources, highlighting few C# 3.0 features using examples from O’reilly "C# 3.0 Design Patterns" book. Building on the object oriented patterns and principles, I’ll go introducing some enterprise patterns (yeah, pretty much Martin Fowler work), and end with a small introduction to "Domain Driven Design", which I plan to deliver in a long session (may another two part one, with dotNETwork or maybe ITWorx CuttingEdge Club or public SilverKey DemoDay – if any) with respect to ASP.NET MVC framework in similar manner to Rob Conrey’s StoreFront series.

This can move the range of fresh and classic developers knowing just the basic language features and getting that to work in small project to see the trends in the software industry world wide, and in the same time provide some exciting topics for the experienced developers willing to know more about the rarely discussed topics in Egypt developers community. Needless to say, the key to the session is audience interactivity. I’m dying for questions and discussions from now already.

Of course this is not going to be fully covering any of the topics. After all, this is still a presentation, not a course!

About the Day

The event will be next Saturday, August 30th at the Canadian International College, in "El-Tagamo3 El-5ames".
There will be buses at Nady El-Sekka (11:00 AM – 11:30 AM)
Remember, this is a FREE event.


12:00 – 13:30

Tec-Talk Wiz BizTalk (Part 1)
Tamer Mohammad Fathy AL-Khouly,
Mohammad Yousri El-Farsi.

Design Patterns via C# 3 (Part 1)
Mohamed Ahmed Meligy.

13:30 – 14:00


14:00 – 15:30

Tec-Talk Wiz BizTalk (Part 2)
Tamer Mohammad Fathy AL-Khouly,
Mohammad Yousri El-Farsi.

Design Patterns via C# 3 (Part 2)
Mohamed Ahmed Meligy.

Sessions will be video recorded. Good that I’m not missing the BizTalk track completely :).

Related Links


Please drop me a comment here or email via blog contact page if you intend to come and have certain tip / suggestion for the session.