Its a great experience to work on WinFX technologies. When I started to lap around WPF, I found it pretty interesting to develop UIs with less code and jazzy effects. Before that we had to write lot of GDI+ even for a simple animation. WPF has made the life of developers easy.
Microsoft released a Community Technology Preview of "Avalon," the new presentation subsystem for Windows.
The following are the highlights of this new release though there are a couple of caveates to this release:
- Support for today's operating systems.
- Layout and control features.
- 3D drawing enhancements.
- Continued refinement.
To read more on this release visit Avalon November 2004 Community Technical Preview.
Google has launched a new search service aimed at scientists and academic researchers. Google Scholar is a free beta service that allows users to search for scholarly literature like peer-reviewed papers, theses, books, preprints, abstracts and technical reports. The new service accesses information from resources such as academic publishers, universities, professional societies and preprint repositories. because the service automatically analyzes and extracts citations and presents them as separate results, users can find references to older works that may only exist offline in books or other publications.
Read the news article here...
Access Google Scholar Search Service here...
"Inside the Guts of CLR" - this was the topic of the MSDN session held on November 3rd Chennai, India. M Anand, MVP presented this Level 400 session and these days he is becoming the regular presenter for the MSDN sessions in Chennai. the session was quite informative and interesting. The crux of the presentation was CLR hosting and GC. A short listing of the things discussed:
- CLR Hosting - CLR hosting basics and advanced concepts like manually hosting CLR through COM. Actually it was interesting to learn that the infrastructure of the CLR is completely COM based.
- Garbage Collection - Basics of Memory handling, .NET GC algorithm, Object Finalization, Strong and Weak references etc. A demo on GC process using a simple string concatenating application was really informative. Infact I/we were amazed to see the GC differences when building strings with usual string concatenation and StringBuilder. This demo also helped to understand the best practice for string building.
- CLR enhancements in Whidbey - EnC and Generics.
Update: One of the attendees has posted the complete content of the seesion in the comments section here.
With the new components of today, everyone wanting to upgrade to the latest and greatest, it goes unrealized that we might be overloading the power supply in our computer.
With all the high end mainboards, super fast processors, extra hard drives for storage, and case mod items such as LED fans, cathode lights (not to mention all the USB devices hanging off today's PC), people don't stop to think about all the wattage being used. However, the power supply is a very important and often overlooked component.
Check here to see if your power supply is large enough to take care of your power-hungry computer!
The FxCop team has released FxCop 1.312. Major features of this release:
- Simplification of report xml.
- New Fix Categories: Each message is marked to indicate if the suggested fix will constitute a breaking change for previously shipped code.
- User Interface Improvements: windowing behavior has been made more consistent
- Auto Update: Sign up to get notified when a new version of FxCop is available.
New rules in the areas of Design, Interoperability, Mobility, Naming, Performance, Portability, Security and Usage has been introduced. To read more on this release visit What's New in FxCop and download the tool here.
For people who ask what is FxCop, it is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. It uses reflection, MSIL parsing, and callgraph analysis to inspect assemblies for more than 200 defects in the following areas:
- Library design
- Localization
- Naming conventions
- Performance
- Security
FxCop includes both GUI and command line versions of the tool, as well as an SDK to create custom rules.
MSDN has just released a new architecture and design guide for Smart Clients which provides information on several topics for those creating smart client applications. Issues addressed include data handling, connection state management, security, and threading.
The definition of "smart client" is dependent on requirements and implementation details but all share the following characteristics:
- Make Use of Local resources
- Make use of network resources
- Support occasionally connected users
- Provide intelligent installation and update
- Provide client device flexibility
To understand more on Smart Clients this article by David Hill would be helpful.
Access the Design Guide here...
People at Compona have given some really good free components.
Thanks to dredge for this piece of info.
Enumerations provide a convenient way to work with sets of related constants and to associate constant values with names. It is a is a special form of value type, which inherits from System.Enum and supplies alternate names for the values of an underlying primitive type.
While doing some study on this area I came across this interesting post that speaks about Enums and its performance implications by Wesner Moise. Until I read the article I didn't have the least idea that an enum would have performance implications.
Generics is a feature that has been added to .NET2.0. I have been recently attending lectures on Generics where I heard people saying it is a .NET version of C++ Templates. But these articles contrast on this. From the explanation given I am now in sync with the fact that Templaets and Generics have a very minimal overlapping in their functionality else are different from each other. Read the articles at Are Generics in .NET like Templates in C++?, Comparing .NET Generics and C++ Templates and Templates & Generics.
At last Microsoft has decided to extend the Edit & Continue feature for C# also. Many C# developers including me have been looking for this option that is available in Whidbey for VB.NET and C++, but not for C#. Thanks to Micrososft for this decision.
For people who ask what is Edit & Continue, it is a debugger feature that allows you to pause an application being debugged, make changes to the code, and then continue without a full project recompile.
Read more on this and other VS .NET 2005 features
here...
Web services are also classes just like any other .NET classes. Nevertheless they have methods marked as WebMethods that can be exposed by the WebServices to be consumed by the outside world. Apart from these WebMethods they can also have normal methods like any other classes have.
Since a web service is a class it can utilize all the OO features like method overloading. However to use this feature on WebMethods we need to do something more that is explained in this article.
Creating WebMethods:
Let us create a simple WebService that has the following overloaded methods:
public string GetGreeting()
public string GetGreeting(string p_Name)
public string GetGreeting(string p_Name, string p_Message)
All these three methods return variants of a Greeting message to the WebClient. Let us now mark the methods as Web Methods. To acheive this apply the [WebMethod] attribute to the publis methods.
[WebMethod]
public string GetGreeting()
{
return "Hi Guest";
}
[WebMethod]
public string GetGreeting(string p_Name)
{
return "Hi " + p_Name + "!";
}
[WebMethod]
public string GetGreeting(string p_Name, string p_Message)
{
return "Hi " + p_Name + "!" + p_Message;
}
This would compile fine. Run the WebService in the browser. That should give an error saying that the GetGreeting() mthods use the same message name 'GetGreeting' and asking to use the MessageName property of the WebMethod.
Adding the MessageName property:
Add the MessageName property to the WebMethod attribute as shown below:
[WebMethod]public string GetGreeting()
{
return "Hi Guest";
}
[WebMethod (MessageName="WithOneString")]
public string GetGreeting(string p_Name)
{
return "Hi " + p_Name + "!";
}
[WebMethod (MessageName="WithTwoStrings")]
public string GetGreeting(string p_Name, string p_Message)
{
return "Hi " + p_Name + "!" + p_Message;
}
Now compile the WebService and run in the browser. You can see that the first method is displayed as GetGreeting wherein for the second and third method the alias we set using the MessageName property is displayed.
1. 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
2. Use Properties Instead of Raw Data
With the addition of properties as language elements, there is absolutely no reason to declare data elements with any access level greater than private. Because client code will view properties as data elements, you don't even lose the convenience of working with simple data elements in classes. In addition, using properties gives you more flexibility and more capabilities. Properties provide better encapsulation of your data elements. Properties let you make use of lazy evaluation to return data. Finally, properties can be virtual. They can even be abstract. You can also declare properties in interfaces.
3. Use Delegates for Producer/Consumer Idiom
When you create a class that implements the producer idiom, use a delegate to notify consumers. This will be a more flexible way to implement this idiom than interfaces. Delegates are multicast, so you can support multiple consumers without creating extra code. Also, you lower the coupling between classes by using the delegate model rather than a full interface model
4. Pay Attention to Initialization Order
The C# language adds the concept of initializers on member variable declarations. These initializers get executed before the body of the constructor gets executed. In fact, variable initializers get executed before the base class's constructor gets executed
Read the complete article here...
Microsoft has announced new MVPs and here is the list from India.
- Hari K. Prasad, Trivandrum
- Dhamayanthi N, Chennai
- Sanjay Vyas, Mumbai
- KS Naveen, Bangalore
- Sarang Datye, Pune
- Tarun Anand, Delhi
Hearty Congratulations to them...
Thanks to Vishal and Arun for the info.
This post is an update to my post on Circular References / Memory Leaks /other baddies at 'A Novice On Writing'.
Having a garbage collected runtime removes one of the biggest sources of program errors, memory allocation errors. Unfortunately, memory leaks are still a reality. A memory leak can occur if an instance is unintentionally being referenced from some other long-living instance, or from a static field. In this case the instance cannot be garbage collected. A very common unintentional reference is an event handler that is never removed.
Here is a .NET Memory Profiler as claimed by the vendors, that helps locate instances that are being referenced unintentionally, and it will tell why the instance has not been garbage collected.
This post is an update to my previous post on CNUG's Anniversary celebrations. The event was a great success with 300+ students and developers attanding the Technical Sessions and other events. Though the number dwindled in the afternoon sessions, the reponse was quite good.
Vadivel, a .NET MVP speaks his observations about the event in his blog - CNUG 2nd year celebrations ...
I would like to share the credits he gives with JD Arun, without whom I would have not been able to work for the event's success. Thanks to Anand, for giving me an opportunity to be a part of the event.
The Chennai Net UserGroup aka CNUG, with which I have been involved since March 2003, has completed two years last July. We are relishing this tomorrow with a One Day celebration with Technical Sessions on latest MS technologies and Fun Events like Quiz. The attendees also get a chance to have a look at latest Microsoft Devices, like Tablet PC and Pocket PCs.
Mor information on this is available at CNUG's homepage.
There are plenty of excellent pages on the usual SP2 issues such as programs that behave differently or don't work. Instead, this is about a particular issue that is currently not covered in Microsoft's pre-install checks. Other significant installation problems are covered here.
Most SP2 issues (and discussions thereof) will be the result of what SP2 does by design, and how this affects other programs that do things that run foul of that design.
This is to be expected, given that SP2 design represents a change in direction for Microsoft; from allowing just about anything to do anything, to blocking several behaviors that malware exploit on a regular basis. Developers who followed Microsoft's original direction to the max are now likely to find themselves caught in the crossfire (especially if they slept through the generously long SP2 beta period).
The best way to manage SP2 and the problems it may cause with other programs, is to understand what it does, and why. That way, you can make a better call as to whether you should give the problem program what it wants, or not!
However, some users may be in for a nasty shock if they try to install XP Service Pack 2 on a PC that is running an Intel Prescott processor on a motherboard that isn't quite as Prescott-ready as was hoped. The rest of this page is dedicated to such users, as what they will experience is far more traumatic than a couple of apps that don't work.
Read more on this at XP SP2 vs. Intel Prescott
Also visit Plethora of Information on XP SP2 for more info and links on XP SP2.
One of the challenges the Developers face is implementing efficient paging mechanism in case of large data. Jeff gives an efficient solution to Efficient paging of recordsets with T-SQL.
Adding to this, Richard is giving a code-based solution here.... Both have their own advantages and disadvantages as listed by Richard in his blog.
I was studying on installing assemblies in the GAC. While I came across this in Zhang's blog entry on GAC Assembly Trace Reference and Zhang strongly recommends to specify a trace reference, the idea behind trace reference is really simple. When multiple applications install the same assembly, and one application is uninstalled (thus uninstall the assembly it carries), other applications won't be broken.
Also read the a related chat transcript in MSDN.