Microsoft launched their new search engine named Bing (Kumo) on 28th May in Europe which went fully online on 3rd June. This search engine was designed to help people not only to quickly find anything over the internet but also to plan a trip or make a purchase decision. Using "Bing" the end user can find any information they need on their daily basis to accomplish their tasks. Bing categories results in different category, based on which the user can find relevant results more accurately.

imageimage

image image

You can find some Tips & Tricks on Bing.com at: http://www.labnol.org/internet/bing-tips/8931/

Published by on under News |

Google Wave is a project announced by Google on 28th May 2009 at the Google I/O conference is expected to release later in 2009. This will be a next generation email subsystem designed to merge email, instant messaging, social networking & wiki featuring strong spelling/grammar checking & automated translation between nearly about 40 different languages.

The term "Waves" described by Google as "equal parts conversation and document", means any authorized participant can reply anywhere in the conversation, they can edit or can add more participants during the conversation process. All the participants will be notified of changes or replies in all the waves they are actively participating & all the modifications will be seen at real time, letter by letter. Not only this, multiple participants may edit a single wave simultaneously in the same context.

imageThis ability of Google Wave will let user to create collaborative documents modified in different location with full modification history, which can be searched by an user to view/modify any changes just like wikis.

More information about this is available in Google Wave Site.

Published by on under News |

Microsoft has recently launched Visual Studio 2010 and .Net 4.0 Beta 1 with more expressive features. Some of them are mentioned below:

[New Language Support]
Visual F# is a new programming language which actually combines functional & object oriented programming to provide scalable language for .Net.

[Test Driven Development]
Visual Studio 2010 now offers greater support for test driven development where tests can be written before the actual code as an approach to the software design.

[Multi Targeting]
By using the multi targeting feature you can also create application of earlier version in new IDE of visual studio.

[Parallel Processing]
Using the new parallel extension of .Net 4.0 developers can create application which will scale efficiently as the number of cores & processors increase.

[Security]
The new framework improvements & expanded capabilities in the security model by simplifying the security policy. Now runtime support has been removed for enforcing the Deny, RequestMinimum, RequestOptional, and RequestRefuse permission requests.

[Performance]
.Net framework 4.0 beta 1 now provides improvement in the startup time and faster performance for multi threaded applications.

[Lazy Initialization]
By using this feature, the memory for an object is not allocated until it is needed. This improves the performance by spreading the object allocation across the lifetime of the application.

[In-Process Execution]
This enables an application to load & activate multiple version of the CLR inside the same process. Now you can run applications those are based on the .Net 2.0 & .Net 4.0 inside the same process.

[Profiler]
In the new framework you can now attach, run and detach profiling tasks at any point of time.

[Garbage Collection]
.Net Framework 4.0 now supports background garbage collection. In earlier frameworks it was a concurrent garbage collection.

[Collection & Data Structure]
- The new framework now includes BigInteger which supports all the standard numeric operation including the bit operation.
- It now supports self balancing SortedSet tree which sorts automatically after insert/delete operation.
- A new data structure named Tuple has been introduced in this framework which can hold an ordered set of heterogeneous items.

[Exception Handling]
The new CLR can now handle any exception regarding the corrupted state of the underlying operating system.

and more…

Published by on under .Net |

Recently, I was facing performance issue while working with huge data. I need to bind those data inside a panel as Custom User Control & want to change the properties multiple times in a second. When I used less no's of data it was working fine, but, when I tried with more no of data, my application starts crying. It was a real pain to the application to start while loading those records & unfortunately I didn’t get any solution to that.

After doing a lot of analysis with VirtualizingStackPanel concept that I shared in my previous post “What is Virtualizing StackPanel?” didn’t solve my problem which I was facing due to huge no of data.

Later, I found a very good post (“WPF: Adventures in Virtualization by Mike Taulty”) shared by Dr. WPF on implementing custom Virtual Panel, which actually resolved my problem.

Here you will find some very good articles on step-by-step implementation of Virtual Panel:

Those are very nice articles to implement the custom virtual panel step-by-step & after implementation of this panel, I noticed a huge performance improvement in my application. This really helped me while working with a huge records.

Now, come to the basic concept of this virtual panel. What it actually does. It loads all the records in a different thread & populate them in the UI as much as records that can be viewable in the screen. While scrolling, it actually creates new object of the elements by virtualizing the existing elements. So, only those objects will be in the memory which are available in the screen. The rest will go for a cleanup process. Hence, improving the performance more & more…. depending on the visible UI elements.

See a nice example in this location: http://blogs.msdn.com/jgoldb/attachment/8116217.ashx

Published by on under .Net | Tips

Virtualizing StackPanel generates container items when needed & throws them from memory when they are no longer in the view. When the panel has huge number of items, at that time there is no need to keep the extra items in memory which are not in view. This solves the memory problem.

If you are populating a huge number of items in any panel, then it is a better idea to use the Virtualization. But, due to throwing away of the extra items & recreating them when in view, costs some extra processing power when the Virtualizing StackPanel uses the default Standard Mode. To solve this issue, just change the virtualization mode to "Recycling". This is called as Container Recycling, which introduced in .Net 3.5 SP1 as a new feature.

By default, this recycling mode is turned off. To enable the container recycling, first turn on the Virtualizing StackPanel with “VirtualizationModeProperty” as “Recycling”.

<WrapPanel x:Name="wrpPanel" VirtualizingStackPanel.IsVirtualizing="true" VirtualizingStackPanel.VirtualizationMode="Recycling" />

You can also use GetVirtualizationMode() & SetVirtualizationMode() to get or set the current mode.

Published by on under .Net | SilverlightTips

DependencyProperty is set to enable declarative code to alter the properties of an object which reduces the data requirements by providing a more powerful notification system regarding the change of data in a very specific way. In .NET, there are two types of properties. One is the normal property & another is the DependencyProperty which has added functionality over the normal property.

Now, let us discuss on how to implement such DependencyProperty to give a powerful notification on data change:

First of all, implement the UserControl class from INotifyPropertyChanged interface:

public partial class MyUserControl : UserControl, INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;
    protected void OnPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}

Create your own normal Property, lets say the name of the property is “Caption”.

public string Caption

    get { return GetValue(CaptionProperty).ToString(); } 
    set { SetValue(CaptionProperty, value); }
}

Now, register the DependencyProperty to the CLR by calling the Register method by passing the property field that you used to store the data in earlier step:

public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register("Caption", typeof(string), typeof(MyUserControl), new PropertyMetadata(string.Empty, OnCaptionPropertyChanged));

The name of the identifier field of the DependencyProperty will be same as you used in the property after appending “Property” at the end. In this example, our Property name is “Caption”, hence our identifier field name is “CaptionProperty”. Add the PropertyMetaData with default value & callback event handler within the Register method as mentioned in the above code. Mark the identifier as static & readonly so that this will be unique to the CLR.

Now, implement the OnCaptionPropertyChanged event handler:

private static void OnCaptionPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)

    MyUserControl myUserControl = dependencyObject as MyUserControl; 
    myUserControl.OnPropertyChanged("Caption"); 
    myUserControl.OnCaptionPropertyChanged(e);
}

private void OnCaptionPropertyChanged(DependencyPropertyChangedEventArgs e)
{
    txbCaption.Text = Caption;
}

The implementation of the DependencyProperty is complete. You can either call it from XAML:

<local:MyUserControl Caption="My First Dependency Property Example" />

or from Code behind:

MyUserControl myUserControl = new MyUserControl();
myUserControl.SetValue(MyUserControl.CaptionProperty, "My First Dependency Property Example");

Published by on under .Net | Silverlight

Splash Screens are always helpful while starting the application. At the time of loading application code & data from backend, it is always good to show a splash screen to the end user. It actually gives a look & feel of loading something and that time the user will see the first UI on his desktop. In .Net 3.5 SP1, this is really simple. Just do the following to add a simple basic splash screen to your application.

1. Create a PNG image & add it to your project. PNG images are better choice rather than BMP images because, they are lighter in size and you can also create a transparent PNG image.

2. Now right click on that image & click properties from the solution explorer of Visual Studio 2008 SP1.

3. Here you will find an option named “Build Action”. Select “SplashScreen” from the dropdown.

4. Save the project, build it & run the application.

Now you will see the image (Splash Screen) before rendering the actual application. After completion of rendering of the main window, the Splash Screen will automatically close. This way, it improves the startup experience of the WPF application.

Published by on under Tips | WPF

Microsoft provides a tool named “MakeCert.exe” which helps us to create a temporary SSL Certificate for development environment. This tool comes with Visual Studio & also with Windows SDK. If you installed Visual Studio, you can find it in this location: “C:\Program Files\Microsoft Visual Studio <VERSION>\SmartDevices\SDK\SDKTools”. If you installed Windows SDK, you will get it here: “C:\Program Files\Microsoft SDKs\Windows\<VERSION>\Bin”.

Now open Command Console (“cmd.exe”) & change your current directory to one of the location specified above. Type the following in Command Prompt & hit enter:

makecert -b 01/01/2009 -e 01/01/2020 -n "CN=Developers" -pe -r -sk "Microsoft Cryptographic Provider" -ss "Microsoft Cryptographic Store" c:\developerCertificate.cer

This will create a test certificate (valid from 01/01/2009 to 01/01/2020) named “developerCertificate.cer” in your ‘C’ drive, which you can use for development environment. You can change the validity period by changing the begindate (-b) & expirydate (-e). You can also change all the parameters specified above.

Here is the list of the parameters mentioned above:

Parameter Description
-b Begin Date
-e Expiry Date
-n Certificate Subject Name
-pe Mark Generated Private Key as Exportable
-r Configures MakeCert to create a self-signed root certificate
-sk Subject’s Key Container Name
-ss Subject’s Certificate Store Name
Published by on under Web |

Silverlight 3, though it is in beta stage, but it came up with lots of new features. Some of them are mentioned below:

  • Silverlight 3 now supports H.264 video formats & AAC audio formats. Now it also supports RAW audio/video pipeline
  • It now supports GPU Acceleration by adding a parameter (EnableGPUAcceleration = "true") in the Silverlight object
  • It now supports 3D functionalities. You can now add Perspective view to the element level
  • Various Effects has been introduced in Silverlight 3 using Pixel Shader API (e.g. Blur, DropShadow etc)
  • Various Animations (like: bouncing, transition) are now part of the Silverlight 3
  • A user can start a Silverlight out-of-browser "application" either by right-clicking on the Silverlight element or by clicking on a button within the application itself
  • Silverlight now supports custom dialogs. By using the SaveFileDialog you can now write contents outside the sandbox
  • It now supports local messaging across multiple silverlight plugins
  • XAP compression has been improved
  • Lots of new controls (like: DockPanel, WrapPanel, Label, ViewBox, TreeView, ExpanderControl, AutoCompleteBox) were added in this version. New controls in the Silverlight Toolkit are also available
  • DataPagination has been added in Silverlight 3
  • Using NavigationFramework you can now navigate to different view of the application. You can now integrate the browser back/forward functionalities with this framework
  • Binding of elements are now available by which you can update the UI without any code. Data validation in binding is also available in this release
  • AssemblyCaching is now available by which you can download the external assemblies only once & later you can use them from the cache. This will improve the application load time during next load
  • In Silverlight 3 Network monitoring API has been introduced, by which you can check whether the application is connected to the network or not
  • Now binary XML format is also supported in addition to the text XML which will improve the performance in the messaging area

Cheers :)

Published by on under Silverlight | Web