Stithaprajyna

I use this blog to jot down what ever comes into my mind or get to see anything I feel is important.

Tuesday, February 28, 2006

Enterprise Library 2.0

Get the improved and updated Enterprise Library, a collection of reusable and extensible application blocks for enterprise development with Visual Studio 2005.

More at http://msdn.microsoft.com/library/?url=/library/en-us/dnpag2/html/EntLib2.asp

Monday, February 27, 2006

Program to Interfaces Whenever Possible

The .NET Framework contains both classes and interfaces. When you write routines, you will find that you probably know which .NET class you're using. However, your code will be more robust and more reusable if you program using any supported interfaces instead of the class you happen to be working with at the time. Consider this code:
private void LoadList (object [] items,ListBox l)
{
for (int i = 0; i < items.Length;i++)
{
l.Items.Add (items[i].ToString ());
}
}

This function loads a ListBox from an array of any kind of objects. The code is limited to an array only. Suppose that later you find that objects are stored in a database, or in some other collection. You need to modify the routine to use the different collection type.
However, had you written the routine using the ICollection interface, it would work on any type that implements the ICollection interface:

private void LoadList (ICollection items, ListBox l)
{
foreach (object o in items)
{
l.Items.Add (o.ToString ());
}
}

The ICollection interface is implemented by arrays, and all the collections in the System.Collection. In addition, multidimensional arrays support the ICollection interface.

If that's not enough, the database .NET classes support the ICollection interface as well. The function written using the interface can be reused many more ways without any modification.

Friday, February 24, 2006

Codezone User Groups (formerly MSDN User Groups

User groups are independently run, volunteer groups that meet on a regular basis to discuss and share information on a variety of technology topics. Joining a developer or .NET user group is an excellent, inexpensive way to receive technical education and meet with your peers to get more out of the latest platforms, products, technologies, and resources.

More at http://msdn.microsoft.com/usergroups/

Thursday, February 23, 2006

SSW Code Auditor

SSW Code Auditor is a tool that allows developers to take control of your code, ensuring large, complex source code can be simplified, cleaned and maintained. The built-in rules focus on the most popular .NET languages (C#, VB.NET) for both Windows Forms and ASP.NET; however, the flexibility of SSW Code Auditor allows the developer to add their own rules to target any language in any text file.

More at http://www.ssw.com.au/ssw/CodeAuditor/

Wednesday, February 22, 2006

Exception handling tips

Lets review some exception handling tips which lists the difference between throwing and rethrowing exceptions at http://www.tkachenko.com/blog/archives/000352.html

Monday, February 20, 2006

Oracle from unbreakable to unpatchable

Oracle from unbreakable to unpatchable by ZDNet's George Ou -- In a twist of irony, the proof-of-concept shellcode produces a sample text file on the server called "unbreakable.txt" with the string "ARE YOU SURE?" inside. When Larry Ellison boldly proclaimed Oracle was "unbreakable" to the world, the crackers of the world boldly responded with "root".

Monday, February 06, 2006

ASP.NET 2.0: New Feature: Use App_offline.htm file to make ASP.NET application offline

If you place a file with the name app_offline.htm in the root of a web application directory, ASP.NET 2.0 will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file (for example: you might want to have a site under construction or down for maintenance message).This provides a convenient way to take down your application while you are making big changes or copying in lots of new page functionality (and you want to avoid the annoying problem of people hitting and activating your site in the middle of a content update). It can also be a useful way to immediately unlock and unload a SQL Express or Access database whose .mdf or .mdb data files are residing in the /app_data directory. Once you remove the app_offline.htm file, the next request into the application will cause ASP.NET to load the application and app-domain again, and life will continue along as normal. Also There are also some other ways to make you Application offline like setting httpruntime to false in web.config