Tuesday, November 24, 2009

Final, Finally, Finalize or Sealed?

Final access modifier
  • Final can be used for classes, methods, and variables
  • Final variables can't change from the initialized values
  • Final classes can't be subclassed
  • Final methods can't be overriden
  • C# uses the keyword "sealed" instead of "final" for classes and methods
  • A class or method can be "sealed"
  • A "const" may be used for equivalent of a "final" variable

Finally block
  • Finally is used in exception handling
  • Finally is a part of the try-catch-finally
  • Finally is executed even if no exception is thrown
  • Read more on finally in this post

Finalize() method
  • Finalize() is a non-explicit way to clean up resources
  • Memory resourses for the object are cleaned up using Finalize()
  • Finalize() is called during garbage collection to allow objects to clean up unmanaged resources
  • Finalize() should always be protected
  • Finalize() should release unmanaged resources only

Wednesday, November 18, 2009

How many ways to backup your SharePoint web site?

Quick notes on various methods available for SharePoint 2007 backup.

  • Through Central Admin GUI
    (Central Administration > Operations > Perform a Backup)
  • Command line backup using STSADM
    (stsadm -o backup -directory/site)
  • Using SharePoint Designer
    (Site > Administration > Backup Web Site)
  • Database Backup using MS SQL Server - Click here for more details
  • Microsoft System Center Data Protection Manager (DPM) - Click here for more details
  • Recycle Bin and versioning - Click here for more details
  • Third-party tools

Sunday, November 15, 2009

Why My Blog Doesn't Show in Google?

If you are worried about your blog not being listed in search results on Alexa, Bing, Clusty, Google, Yahoo or any other one, you're not alone. The answer - follow these simple tips, keep working and it'll show up soon.

1. Content is the king
We humans see a site while the search engines read the sites. The best you can do is to improve your contents.

2. Networking is important
Links are as important for your blog as references are for you. Get your blog linked from your own other blogs and sites. Ask your friends and family to link to your blog. Read other blogs and leave comments often. One referral from popular sites is more valuable than three from some vague one-page site.

3. Keep it clean
Don't even try to fool the search engines. The days of long and unrelated "keyword" meta-tags are over. Unrelated white keywords on white background just to fool the search engines can do you more harm than benefit.

4. Plain text before cool animation
Pretty images and an impressive Flash piece may make your blog look great but as far as search is concerned, the contents are immensely valuable. Don't forget to use tags such as "ALT" and TITLE" with your images.

5. Update often
More often you update, more visits you'll have from the visitors and more updates from the search engines. An average search engines is not interested in a blog that was last updated three three years ago.

6. Listen to the experts
There is good advice on the Internet to help you. Listen to the experts and get benefited.

7. Title matters
The title of your blog is very important and so are the headings. Use these judiciously.

8. Submit to search engines and site directories
Manually submit your site to search engines such as Yahoo, Google etc.

9. Have patience
You don't jump to the top overnight. Search engines may take long to completely index your blog. Remember, perseverance pays.

Following these simple tips will help you get a higher rank fast. Good luck!