Thursday, January 5, 2012

2011 Achievements and Plans Ahead

2011… How fast that was? it seems as if it was yesterday only that 2011 began and here we are in 2012 BUT I really had an exciting year with great memories, rich experience and some good learning.

Like each year, I try to take little time out to reflect on what I have accomplished so far so as I can analyze myself, set new goals, and identify area of improvements. This blog post contains some of the highlights of 2011, popular blog posts and my plans ahead.

Flash back:

Popular Posts:

Plans Ahead

  • A new role of husband! I am used to play role of Developer, Team Lead etc. but this something different and quite different :)
  • Intent to author a book
  • Improvement Areas: Software Architecture and Design, Project Management, Leadership

I believe 2011 was really a great year for me Alhamdulillah, with lots of achievements and remarkable events. This would not have been possible without great support of friends and family, so thank you all for your extraordinary support and care.

I really looking forward to great year ahead and I am sure it’s going to be more exciting, different yet fun. I hope and pray to Allah that year 2012 will bring peace, health, happiness and prosperity to world and in particular to your (reader) life.

Friday, November 25, 2011

IIS 7 not loading CSS and Image

Yesterday, I faced a wired yet crazy issue. My machine has a bit freshly installed windows 7 and so while running web site hosted on local IIS, I was getting a pretty plain asp.net pages without CSS and Images being loaded properly.

After a little investigation, it appears to be a problem with Windows feature installation. All you have to do is run ‘optionalfeature’ command and make sure ‘Static Content’ option is checked.

Windows Features - Static Content

Hope this would help you, if you face similar kind of issue.

Thursday, November 3, 2011

Microsoft Certification Overview [Update 2011]

Q: How can I become Microsoft Certified Professional?
Q: What are the available certification tracks for me?
Q: I am a web developer, How can I prepare for MCTS exams?
Q: Which paper do I have to clear to become SharePoint Administrator?

These are some of the most frequently asked questions to me by Industry Professionals via email or forums or community events. If you have been following my blog posts, I have written a kind of introductory post on “Getting Started with Microsoft Certification” back in 2009. Since things have changed slightly by now, so I thought may its good time to re-write on this topic.

In this post I will be answering some of the questions above. This would help, at least me, in sharing such frequently asked information to IT Professionals or Developers working on Microsoft Technologies and are interested in becoming Microsoft Certified Professional (MCP).

Chances are that, if you are reading this blog post, you already have some idea about the what Microsoft Certifications are and so I am not going into introductory detail which you can also check from my previous blog posts LINK-1 and LINK-2.

Recommend Paths and Audience

The very first thing I would like to make clear is that for different level of audience, there are different set of certifications available. Refer to image below which depicts the suitable track for you based on your level. For example, if you have more than 3 years of experience in development solutions using Microsoft Technology then recommended track for you is Microsoft Certified Professional Developer (MCPD) or if you are entry level professional with 1-2 years of experience then Microsoft Certified Technology Specialist (MCTS) is the right track for you.

Plus within these levels, there are further exams available based on particular technology. For example, MCTS: Microsoft Exchange Server 2010 – Configuration or MCTS: Microsoft .NET Framework 4, Web Applications etc. You must target your relevant track considering your background, experience and career ambitions.


MS Certification Audience

Experience vs. Certifications [A Great Debate]

Yes I do agree that experienced professional is somehow more worthy however I would say that neither Certifications without Experience is good nor Experience without Certification is perfect instead they both are BEST when balanced together.

Consider certifications as a way to validate your skills and/or for your own learning, just clearing exams without grip on the technology won’t give you anything. I have personally completed Microsoft Certification Professional Developer (MCPD) track with experience and it has benefited me especially in terms of knowledge or skill set.

So bottom line is certification and work experience are best when balanced together. However required experience varies depending on the level of certifications.

Work Experience and Certifications

Preparation and Testing:

Usually, Training Kits and online/offline course trainings are available for each exams BUT I would strongly encourage proper hands on before giving exams. For details on preparation, visit here.

Exams are usually MCQs and Case Study based out of which you have to score 70%. Total number of question varies from exam to exam but usually its around 40-75.

For testing, Prometric Centers are available worldwide on which you can register yourself online. Cost varies from region to region, typically from $85-150 per exam. Please note that photo identities such as Driving License or Passport or Identification Card are required on the day of exam. For details on registration, visit here.

References and Further Readings:

I hope this information would be helpful to IT Pro/Developers interested in Microsoft Certification. Still, if you have any questions, please feel free to contact me or ask a question on “MSDN Training and Certification Forum”.

Good Luck!

Sunday, October 30, 2011

Session: Refactoring to SOLID Code

We recently organized October User Group Meeting on Design Principles and Practices at MIC, Karachi. I did a session on “Refactoring to SOLID code” and really enjoyed discussion with developers on design principles and practices.

We talked about aspects of bad design, better design and how we can apply SOLID principles to our day to day code. The session was irrespective of any technology and more related to Object Oriented Principles. As ‘software design’ is one of the area I am passionate about, so I love the talk.

AttendeesAdil Mughal - Refactoring to SOLID Code

The objective was to provide awareness and realization to developers on how following different design principles and practices will eventually make their life easy. I would like to thank everyone who attended the session and the contributors who made this event reality especially speaker (visitor) Zubair Ahmed and Kamran (from MIC) for needful arrangements.

As promised, I have shared session presentation and source code. See details below. StructureMap, the free Dependency Injection tool can be downloaded from github or Nuget Package

You can download source code demonstrated and presentation from shared folder.

For detail summary of event, please visit Event Summary: Oct UG Meeting on Design Principles and Practices

P.S. Hope everyone enjoyed lucky draw ;)

Tuesday, October 18, 2011

WCF Custom Header with Silverlight

In my previous post "Client Additional Parameters using Custom Headers in WCF", I discussed about passing additional parameters from client in SOAP header with WCF service by implementing IClientMessageInspector, IEndPointBehavior and BehaviorExtensionElement.

I am really glad to know that it help some of you. However, I have received some queries from readers for implementing custom headers with Silverlight client which I am going to discuss in this post.

While working on Silverlight client, we have limited framework available and to implement custom headers there are some slight changes:
  1. Instead of App.config or Web.config, you have ServiceReference.ClientConfig
  2. MessageHeader (Generic) class is not available instead you can use MessageHeader class
  3. There is no BehaviorExtensionElement class available in Silverlight 4 Runtime
  4. Since there is no BehaviorExtensionElement class, therefore you cannot define extension in .config file
  5. You need to programmatically bind/add custom endpoint behavior

I have pasted the code snippet below, that would work fine with Silverlight 4 client to pass custom header to WCF service.

IClientMessageInspector

   1:  public class MyMessageInspector : IClientMessageInspector
   2:  {
   3:      #region IClientMessageInspector Members
   4:   
   5:      public void AfterReceiveReply(ref Message reply,
   6:                                      object correlationState)
   7:      {
   8:          Debug.WriteLine("SOAP Response: {0}", reply.ToString());
   9:      }
  10:   
  11:      public object BeforeSendRequest(ref Message request,
  12:                                      IClientChannel channel)
  13:      {
  14:          const string STR_Customer_Unique_Id = "Customer Unique Id: 12345";
  15:          var header = MessageHeader.CreateHeader("Identity", 
  16:                                                  "http://www.adilmughal.com", 
  17:                                                  STR_Customer_Unique_Id);
  18:          request.Headers.Add(header);
  19:          Debug.WriteLine("SOAP Request: {0}", request.ToString());
  20:          return null;
  21:      }
  22:      #endregion
  23:  }

Note that the header is now created (see line 15) using simple MessageHeader class.

IEndPointBehavior

   1:  public class CustomBehavior : IEndpointBehavior
   2:  {
   3:      #region IEndpointBehavior Members
   4:   
   5:      public void AddBindingParameters(ServiceEndpoint endpoint,
   6:                                          BindingParameterCollection bindingParameters)
   7:      {
   8:      }
   9:   
  10:      public void ApplyClientBehavior(ServiceEndpoint endpoint,
  11:                                      ClientRuntime clientRuntime)
  12:      {
  13:          clientRuntime.MessageInspectors.Add(new MyMessageInspector());
  14:      }
  15:   
  16:      public void ApplyDispatchBehavior(ServiceEndpoint endpoint,
  17:                                          EndpointDispatcher endpointDispatcher)
  18:      {
  19:      }
  20:   
  21:      public void Validate(
  22:          ServiceEndpoint endpoint)
  23:      {
  24:      }
  25:      #endregion
  26:  }

You may have observed that in contrast to previously discussed solution in last post, we are not implementing BehaviorExtensionElement any more.

Adding Behavior to Proxy

ServiceProxy.TestServiceClient proxy = new ServiceProxy.TestServiceClient();
proxy.Endpoint.Behaviors.Add(new CustomBehavior());

Without BehaviorExtensionElement, we cannot define custom endpoint behavior in .config file so need to plug it programmatically.

That is all. You may download code sample-LINK TO CODE. Hope this helps. If you have somewhat different solution, please do share.