Tuesday, January 30, 2007

Dan Cohen from My Yahoo joins Pageflakes!

Monday was a great day for Pageflakes, when Dan joined the team.

Before joining Pageflakes, Dan led MyYahoo!, the personalized startpage of Yahoo!. Before that, he worked at Google for Google’s personalized startpage. Prior to joining Google, Dan founded and successfully sold a mobile technology startup. His experience at Google and Yahoo arguably makes Dan the #1 expert on personalized startpages in the world. And we are really happy to have Dan among us.

Thursday, January 18, 2007

Call Stack and Locals can save a lof of time

Few days back , when i was debugging with Visual Studio, i got an "Execute Reader" exception, which happened from a function that calls up a stored procedure that i have modified, the stored procedure has some if-then-else and i need to know the value for which the call failed. So, i clicked on the "Call Stack" tab, went to the function where the actual db operation is held.I clicked on the Locals tab, noted down the possible values that i need to re-check.I went to the stored procedure and revised out the code for each value. Finally, ran the code with fix.

Although,it is simple, but the impact is real big. If there was no Call Stack / Locals then i would have performed a manual debugging, which is no time saver in terms of a huge solution.

What a bless that we don't realize! :-)

Tuesday, January 16, 2007

Accessing Master page variables from user control

Recently , i had a task to generate meta tags depending on the list of items that are shown on each page (Pageflakes Community Gallery). The list is generated using a repeater and it is under a user control. The header tag is in the Master page, inside which i need to generate the meta tags. Within the header tag , i have <%= MetaTag %>, which dumps whatever assigned to it. MetaTag holds the string of meta tags, which is generate from a predefined schema , after doing some content processing.

Now,calling a public method in master page from user control is bit tricky.To call a public variable from a user control , the following line must be copied to the top of user control with appropiate master page location.

<%@ Reference VirtualPath="~/YourPath/youMasterPage.master" %>

This enables to take the reference of the master page codebehind class and access its public variables.

ASP.MysNameSpace_MasterPageClass myMaster = (ASP.MysNameSpace_MasterPageClass)this.Page.Master;

myMaster.MetaTag = GetMetaTag(.....);


This process of accessing public variable though simple, yet very effective way of dynamic inclusion of meta tags, scripts, style tags and even custom title on to the header tag which is under a common master page.

Ping me if you have anything to share with me.

Configuring multiple sites under a common root

When there are several sites under a common root site, For ex, mysite - >mysite/forum - > mysite/blog , where all three are different solutions and each has a separate config file with some common settings. Due to inheritance nature of web.config, the child config gets the attributes of the parent config.

Therefore, if you have the following, both in mysite and mysite/forum without the location tag, then it will surely cause a runtime error ,"Same session cannot be removed twice"

<httpModules>
<remove name="Session"/>
</httpModules>



To solve this, we can use location tag, which is declared right before the system.web tag.

<location path="mysite">
<system.web>
<!-- do things here ->
<system.web>
</location>



By using the location tag, we can ensure that a particular setting will be applied only to mysite, not to mysite/blogs or myiste/forum.

Similarly , we can avoid such scenarios by removing the common blocks in child config, if we dont want to use location tag.

A Reader's Toolbox

Since the advent of affiliate marketing program many companies use to configure multiple sites under common root. It is quite easy for web companies because it provides lot of web space. This option is not available with all hosting providers but you can know this through webhosting reviews. Most of companies are using wireless security for their servers to avoid risks for servers. You should make plans when buying a web name so that you can implement it easily. You can get all information about hosting using phone service. There are many companies that are providing online support for webhosting net.

Tuesday, January 2, 2007

A year of accomplishments in Pageflakes

In Pageflakes we almost work day and night to make great a startup that will work for all type of users, it was kinda busy year for all of us here. Throughout the year Pageflakes has gone through massive development.Plenty of good flakes, community, new look , better and improved RSS reader, are few features that kept us awake.Finally, it has been a great experience for being a part of such a wonderful yet talented team that is called Pageflakes.:-)