Friday, December 12, 2008

Refactoring: Improving the Design of Existing Code

Today, I finished from another invaluable reading. The “Refactoring: Improving the Design of Existing Code” book by Martin Fowler and other contributors.

During and after this reading I felt that I was following the different refactroing types by intuition - seriously! It is really amazing to feel about this as I also experienced this in the previous reading for Design Patterns.

In the end I can say that there are a lot of things the skilled programmer needs to know and as Kent Beck often makes about himself, "I'm not a great programmer; I'm just a good programmer with great habits."

Saturday, August 30, 2008

Another Reading about Design Patterns

Last week I finished reading from another book Foundations of Programming by Karl Seguin.

In these days I am busy with picking and reading good resources to establish a solid foundation to the next level of my career path:). I am not digging into theory too much! The authors of the aforementioned book and the previous one are not just explaining ideas and concepts; it's about a consolidation of practical experiences from different people got involved in consulting and implementing software solutions for real life scenarios.

You can download a free copy of the book, click here.

Saturday, August 23, 2008

Design Patterns by GoF

Last week I finished from reading the Design Patterns: Elements of Reusable Object-Oriented Software book for GoF.

This book is the most solid book I ever read about design patterns. You will improve your design skills and discover that you are using patterns by nature :)

Saturday, July 19, 2008

WCF with SSL

As we are more close to the production date, and as usual security delayed till production rollout! We tried to simulate the production environment security for our solution.

We will have multiple sites that can be accessed from the internet or intranet and communicate with a backend web services built using the WCF technology. Now, we want to secure this dialog between the clients and the service. As most of us know there are a lot of options and scenarios when interacting with a WCF service. So, we opt out to use the WSHttpBinding binding, TransportWithMessageCredential security mode, with username/password to authenticate the client’s identity on the service, and an SSL certificate installed on the IIS hosting the service.

After initial setup of the environment we got the following exception:

System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust relationship for the SSL/TLS secure channel with authority 'dev-srv-03'. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

You can solve this by using the following code snippets:



This is actually may happen due to the use of a certificate that is trial or not self-signed – you can have some clues from the value of the error parameter provided for the server certificate validation callback. On production environment you should remove the above callback code, given that you will use a valid SSL certificate issued from a trusted CA.

Wednesday, July 2, 2008

Sys.InvalidOperationException: ScriptLoader.loadScripts cannot be called while the ScriptLoader is already loading scripts

If you are using ASP.NET AJAX extensively, it is inevitable to have the JavaScript error: ScriptLoader.loadScripts cannot be called while the ScriptLoader is already loading scripts. We got this error for some pages that have grid and you sort quickly the result displayed.

One of the workarounds for this is to put the below code in your ASPX page:








For more information you can check below link:
http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=14712