I have been deciding for a while to build my new home to get rid of the http://weblogs.asp.net/TanzimSaqib blog that I had. The major motivations for moving away from weblogs.asp.net was the annoying advertisements and the inflexibility of the blogging platform as far as the permissions given to a normal user. With my new blog, I have full control over as to what appears and what not as well as a lot more space to utilize: http://TanzimSaqib.com/blog.

UPDATE: for Oct 25, 2010 changes. Full source code is available.

News Framework is a tiny library (DLL) that you can use to build your own Windows Phone 7 application in just minutes especially if you have a news portal and your site exposes RSS data. If you are not sure about News Framework yet, see introductory video here. I have built a fully functioning unofficial Mashable app using this framework which you will find in News Framework codeplex site. You can use that as a template while you build your own.

Step 1: Get the tools

One of the good reasons why everyone can now have his/her own WP7 is that the tools it requires are all free. Download and install the tools from there and News Framework from here: http://newsfx.codeplex.com/ and follow the steps. You will find the simplest form of template application built for you in src\TanzimSaqib.NewsFramework.Demo using News Framework. You can change the namespace, backgrounds and what not to tailor to your needs.

Step 2: Tailor to your needs

Take a look at the app.config file now:

<?xml version="1.0" encoding="utf-8" ?>
<add name="AppTitle" value="Mashable! Social Media News and Web Tips – The Social Media Guide" />
<add name="AppHomepage" value="http://www.mashable.com" />
<add name="ShareArticleSubjectTemplate" value="Check it out" />
<add name="ShareArticleBodyTemplate" value="Hi, check out this cool article: &quot;{article-title}&quot;. URL: {article-url}" />
<add name="DarkThemeBackground" value="/DarkThemeBackground.png" />
<add name="LightThemeBackground" value="/LightThemeBackground.png" />
<add name="PageOrientation" value="Both" /> <!-- Portrait OR Landscape -->
<add name="FeedsPath" value="/Feeds.xml" />
<add name="RssItemCount" value="10" />
<add name="ClearCacheOnStartUp" value="false" />
<add name="Article-View-CSS" value="body { font-size: 14px; }" />
<add name="Article-View-DarkBackground-CSS" value="body { background-color: black; color: white; } a { background-color: white; color: black; }" />
<add name="Article-View-LightBackground-CSS" value="body { background-color: transparent; color: black; }" />

As you can see, these are the options that you can control from outside of the framework (i.e. your application). The properties are quite self-explanatory and I believe they don’t require to be described in great detail. Many more new settings yet to be added. Now let’s take a look at a piece of code that is mandatory according to the XML format of the RSS that your site exposes. In the constructor of the App (App.xaml.cs) class of your WP7 application, you need to specify how it will find the thumbnail and content tags from the Feed XML.
Fx.Initialize(this, new RssExtendedParser()
ThumbnailParser = (item) =>

return item.Element(item.GetNamespaceOfPrefix("mash") + "thumbnail")

ContentParser = (item) =>

return item.Element(item.GetNamespaceOfPrefix("content") + "encoded")

You will have to create an instance of RssExtendedParser which has two properties. Pass two delegates to them to direct how a single RSS item (node) will be handled with respect to the thumbnail and content extraction. We need this because almost all popular news sites expose thumbnails and content with their own namespace. For Mashable it was mash:thumbnail and mash:content. For example:

<img src="http://cdn.mashable.com/wp-content/uploads/2010/11/foodwine_ipad_thumb.jpg"
alt="Food &amp; Wine Magazine Serves Up Holiday Treats for the iPad"
class="post_image item" />

target="_blank" href="...">


Now that the application is ready. It is time to feed the RSS. Open up Data\Feeds.xml and enter URLs to the feeds like the following:

<?xml version="1.0" encoding="utf-8" ?>
<feeds main="http://feeds.mashable.com/Mashable">
<feed title="Social Media Channel"
subtitle="The latest happenings in social media, plus tips on using Twitter, Facebook, YouTube, Foursquare and more." />

<feed title="Tech Channel"
subtitle="Gadgets, software, web design, web development, video games and geek culture."/>

<feed title="Business Channel"
subtitle="Small business, advertising and marketing, money and finance, plus careers and business apps."/>




main attribute of the feeds tag is the feed URL that is being used to render feed items in the main screen as latest, and the feed tags inside feeds are the ones for rendering categories and their respective feed items. Hope this helps you get started with writing your own Windows Phone 7 app using News Framework.

News Framework is an open source (to be released in a while) offline news reading framework on which any RSS based news website can have its own Windows Phone 7 application in just minutes. The configuration, content and styles can be managed from outside of the framework itself to fit the needs.

Features currently supported:

  • Offline news reading experience
  • Text size adjustment
  • Save for later
  • Share with friends via SMS/Email
  • News by category
  • Rotation support
  • Search within the news
  • Theme support
  • Open Source: to be released very soon. Only a demo app is currently available.
  • Full functioning demo included: An unofficial Mashable app.

Video demonstration on CodeTV: http://codetv.net/36/introducing-news-framework-for-windows-phone-7/

Project homepage: http://newsfx.codeplex.com



Every day we come across millions of blogs and social networking websites. Whenever we’d like to make a conversation, we comment or reply to the thread. If we do that as an anonymous user, we probably have to be happy with the default avatars like the one you can see on the screen right now. I am sure not all of us are the biggest fans of these avatars. Even if we register, our avatars might be one of these, until we upload one. We visit so many social networking websites that uploading your own avatar again and again is sometimes very annoying. Slide1


If you are a web developer or blogger, and would love to drastically change the situation, and improve user experience of your visitors, this post is just for you. I am going to talk about a neat service called Incarnate that can help your visitors reuse the avatars they might have used in some other popular social networking websites.

Incarnate is a free service that can find social avatars for your users from MySpace, Facebook, Xbox Live, Twitter, YouTube, and Gravatar. It’s an open source project from MIX Online Labs. It includes fairly easy JavaScript sample to integrate in your website. It also has Wordpress and BlogEngine.NET plugins. We are using Incarnate in our CodeTV website. To give you an example, a user can type his social networking handle and click Find to get a list of avatars he has used in other websites, and choose one of them.


Incarnate is a WCF REST Service and hosted on Windows Azure. It supports JSON-P. That makes it possible to make cross-domain invocation of the service. It also uses ASP.NET Cache. So, every time it is invoked there’s no guaranty that the result is up-to-date. It has three endpoints as of now, which you can use to get avatar URL for a given provider and username, Gravatar URL for an email address and to get a list of providers Incarnate currently supports:

To make it a little bit easier for you to use from .NET code, we have built a very tiny wrapper for Incarnate. We have four methods you can use. All of them are synchronous, but if you want you can write asynchronous version of them as well, because it’s open source. It also includes a Test class powered by xUnit, which you can use to verify whether Incarnate is functioning as expected. It is particularly useful when you’re in doubt with your code whether the bug lies on your code or theirs.

Wrapper methods:

  • string[] GetProviders()
  • string[] Incarnate(string username)
  • string Incarnate(string provider, string username)
  • string IncarnateEmail(string email)

Incarnate Wrapper: http://code.msdn.microsoft.com/CodeTVIncarnate 

The complete episode is on CodeTV: http://CodeTV.net/34/incarnate-social-avatars/

There are lots of buzz going on around Windows Azure and Cloud Computing that beginners have started to ask me whether it’s another version of Windows or Microsoft has invented Cloud Computing or not.

Cloud computing is here with Windows Azure! Well, that’s not true. Microsoft may have the largest community of developers, and Windows Azure is a major blow in cloud space. That doesn’t necessarily mean they are the inventor of it. The main concept of Cloud computing dates back to 60s. Even we have been using Cloud computing daily probably even noticing it.

Gmail, is a perfect example of cloud computing. It was launched in 2004 offering 1GB storage for free. To take email to the new level from its competitors that used to offer 2-4MB back then, they had to employ a very clever technology. And that is cloud. It currently offers over 7GB of free storage and hosted email solution for organizations. Offering 7GB does not mean it allocates full 7GB space for each email account, rather it scales its storage as required. That level of optimization was possible by the cloud.

So, we’re not talking about cloud that causes rain, rather it’s the cloud on the internet where mighty web-based applications live. You can consider cloud like a matrix of servers virtually connected to each other, waiting for your command to fulfill your request. It is also known as utility computing.
Now, let’s talk about Windows Azure which is Microsoft’s cloud offering. How many times have you seen Microsoft’s sites go down? I have seen only once or twice in my entire life. Their datacenters are extremely reliable. Who wouldn’t love to host her website in Microsoft’s datacenters? Windows Azure allows us to do just that. And yes, Microsoft is in hosting business!

With Azure,
•    You can write your apps in scalable fashion
•    Your apps get necessary infrastructure support that you can very easily configure anytime
•    There’s no maintenance nightmares
•    No worries about distributing database across the datacenters
•    And Leaving all those hassles unto Windows Azure, you can focus on your application

What does it mean to a developer who doesn’t use Microsoft tools? Well, Windows Azure is for all. It is available to not only .NET developers, but also non-Microsoft languages and tools users like Python, PHP, Java, Eclipse, and so on. It also provides an interoperable environment with support for common internet standards such as HTTP, REST, RSS, SOAP and AtomPub to consume, integrate and expose services to the applications. I hope this gives you an introduction to cloud computing and Windows Azure. We will dig deeper into Windows Azure in future episodes.

Transcript of the video: http://CodeTV.net/19/what-is-windows-azure/

CodeTV is a video podcast for the developers who work with Microsoft tools and technology. Most podcasts are focused on advanced usage of Microsoft tools and technology, therefore a large community who are in beginner/intermediate levels do not find anything for themselves. Unlike those, in CodeTV there will be something for everyone. No matter if you are beginner, intermediate or advanced level developer, you will always find something interesting in our tiny clips. The clips are very short, quick and precise. You may want to rewind a few times if something seems difficult to grasp for the first time. The clips are are short because they are meant make you feel more interested about the topic which is being delivered. Starting with a very brief introduction to Windows Azure, many videos are being produced and will be added shortly.

Subscribe to iTunes

Subscribe to RSS

Our Facebook page

Cassini is now an open source, portable and redistributable web server. This light-weight Microsoft’s source available web server is used to be shipped with Visual Studio as integrated development server. I have revived Cassini in version 4.0 with:


This is going to stay free forever with a Microsoft Public License (Ms-PL) license. There are many usage of this tiny 160KB only web server which makes it enterprise-ready, coming up very soon. Stay tuned.

Feel free to join the team: http://cassini.googlecode.com/

I spoke at Microsoft Visual Studio 2010 Community Launch in Dhaka on May 8, 2010. I presented core C# concepts that many developers tend to avoid like delegates, Action, Lambda Expressions. I discussed about improvements in C# 4.0 and also talked about Task Parallel Library at length. There is a companion article for this. I had fun answering the Q&A session.


Here are a few photos from the ceremony.

28122_115554581817967_100000902781594_85410_4166692_n 28122_115602365146522_100000902781594_85571_1584711_n

28122_115600791813346_100000902781594_85564_4336143_n 28122_115604125146346_100000902781594_85574_3321982_n


Here is the slide that I showed.



The slide can be seen full screen and downloaded from here.

Task Parallel Library gives you the convenience to turn existing sequential code into parallel branches, which may result into significant performance boost since all the available processors are being utilized. Although ThreadPool.QueueUserWorkItem is still there and can serve you the same as before, TPL is a more organized library which has richer APIs that support waiting, continuations, better exception handling, and so on. It is available at System.Threading.Tasks namespace. I have just written this article which tells you how you can start doing it: "Parallelizing Windows Applications in .NET 4.0".

This post was long overdue. I always wanted to thank the guys who put extraordinary effort and passion for making our lives easier everyday, without requiring anything at all in return. Here’s a list of 10 Firefox addons I cannot live without. I would like to thank the developers, testers and whoever is behind these free tools. You have done a really good job and literally managed to change our lives.


1. Screengrab

Capture full webpage even though you cannot see it. You can also select from visible portion before you save as image. That way, image editors are optional to do just that.


2. GreaseMonkey

Execute your JavaScript on external site. You can customize sites as per your need by manipulating the DOM elements, redirecting to other sites, refreshing page to keep alive the session. You can find wealth of such scripts at: http://userscripts.org/


3. View Source Chart

This addon lets you view source exceptionally better than Firefox’s default viewer. See the difference below. Right click on a page and View Source Chart.



4. Measure It

Ruler for your produced HTML to help you make it pixel-perfect.



5. ColorZilla

Get that color code. You do not have to capture, save, open with Photoshop and pick colors. You can do it all using this addon.



6. Web Developer

Amazing *powerful* addon for Web Development. Just install it now if you haven’t already!!



7. ScrapBook

Anontate webpages, save and share using ScrapBook. You can use sticky notes, highlight text and add comment. Handy tool for QA, and often good for change requests.



8. Firebug

Finally the legend. No words can appreciate as much as they deserve. This is the world’s most powerful web development tool. This stunning tool you can use for looking into the web transactions, headers, responses, cookies. You can also profile them. Using its amazing powerful HTML selector, you can manipulate DOM elements, styles, and see them reflected on the fly. Set breakpoints, and debug JavaScript.





9. FireCookie

An extension of Firebug, allows you to see the cookies. You can also export them.



10. YSlow

This is an excellent extension of Firebug from Yahoo. It points out the rooms for improvement in your webpage by verifying and suggesting the best practices. Excellent reporting and elaborate guidelines, help you to score “A”s from many obvious “F” grades you are going to see your webpage is scoring.


Happy Web Development!

More Posts Next page »