Uncategorized


CMSes are an overhead for any organization and a Marketing Manager always wants them but Product Managers (PMs) hopefully understand that Developers dislike the drudgery of doing all that work. But then, that’s life.

Big CMSes add to a Product lifecycle and the overall infrastructure and might end up even governing which technology to use because you remember the last time you got burnt by it and so want to avoid using the CMS but one has to, so you opt-out if you can.

Nowadays, light-weight CMSes are preferred by PMs, because they are more localized and do not need a buy-in from the major players.

One resource I found helpful in evaluating these was http://www.cmsmatrix.org
It is an extensive look various CMSes and what all they support or provide.

I recently released a music album, in case any of you guys were interested:

It can be found on BandCamp at:
http://grooveyantra.bandcamp.com/album/sympathetic-vibrations?permalink

You can add a badge for support on your blog or website, by adding this HTML:
<div>I &hearts; <a href=”http://grooveyantra.bandcamp.com/album/sympathetic-vibrations?permalink” target=”_blank”><img src=”http://grooveyantra.azurewebsites.net/images/sv.jpg&#8221; title=”Groove Yantra – Sympathetic Vibrations” border=”0″ /></a> </div>

I ♥

in a Windows Phone application, sometimes you might have a long operation , and you do not want to freeze the User Interface (i.e. block the UI thread).

One way to avoid blocking the UI is to use a background worker thread to run the Operation asynchronously and tell it what method to call when it completes processing.

The pseudocode for it…

Start with declaring a background worker.
Tell it what do when finished.

Tell it what method to invoke (which is the long task).
Pass in the argument if any (as an object), so you can have a simple string or a custom object that holds a set of params.

Here is the code for it:

            BackgroundWorker bw = new BackgroundWorker();
            bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(DoneWork); 
            bw.DoWork += new DoWorkEventHandler(DoWork); 
            bw.RunWorkerAsync(arg1);

Note: This concept is applicable to Silverlight in general, and if you are using .NET 4.0 (and not only the Phone), you can use a generic Tuple object for the argument and then type-cast your argument to whatever you passed in.

The signatures for DoWork and DoneWork have to be of the required delegate type, for e.g.:

private void DoWork(object sender, DoWorkEventArgs e)

private void DoneWork(object sender, RunWorkerCompletedEventArgs e)

e.Argument will give you the argument arg1, which you had passed in.

You can store objects you want to send back to the caller as e.Result.

Use this technique to show a progress bar or a wait state in the UI.

Remember, UI operations like updating a list or it’s bindings while done from either delegate need a context switch and are not directly possible because the UI thread is different from the one we might be running on.

This is a pain to code but unavoidable, and to do this, wrap your calls with an anonymous method and call it like this:

            Deployment.Current.Dispatcher.BeginInvoke(
             () => {
                     ... 
                     this.listBox.ItemsSource = items;
                     this.PageTitle.Text = text;             
                   }

Hope that helps…

Virtual Earth 6.1 was released recently and I thought I’d give the whole mapping thing a try.
VE has the best iSDK I’ve ever seen, period. It has the demo, source, reference all in synchronized tabs. Real slick!

For those of you who don’t know, Virtual Earth (VE) is a mapping platform by Microsoft, that comes with a map control and its kitchen-sink infrastructure.
Live Maps built on top of it is a competitor to Google Earth and I, personally, find it richer and easier to use.

Anyway, back to a quick app to get started…
Let’s start with a .NET C# website project and use default.aspx.

Jump into your aspx source and add:

<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Path="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1" />
</Scripts>
</asp:ScriptManager>

This basically adds a reference to the VE service.

Add a container element for the map:

<div id='myMap' style="position: relative; width: 800px; height: 800px;"> </div>

To actually show the map, we need to execute a couple of javascript lines on the Body load.
Either add an onload event handler in the body tag or (I recommend) add a .js file
and add

function pageLoad()
{
map = new VEMap("myMap");
map.LoadMap();
}

and add a reference to the js file in your HEAD tag or via the ScriptManager tag:

That’s all it takes to have the map show up on your page. Pretty cool, huh?

In the next posts, I’ll show you how to make your project setup more efficient and do some more stuff like finding/adding locations, etc.

Meanwhile, go check it out: http://dev.live.com/virtualearth/ and play with the iSDK: http://dev.live.com/virtualearth/sdk

Our SEO team recently asked us to fix an issue with a client website that we built, whereby a 404 error was being returned as a 200 (ok) response.

As you may know, any decent website has custom error pages to give the user more information, support and to avoid a browser displaying the default ugly page for the error. In .NET, we define custom errors in web.config or at the IIS level. a custom page is a redirect and would return a 200 response since the page was loaded fine although the original response to the invalid URL was a 404.

We needed to fix this because a search engine would keep the missing URLs in its index and these invalid URLs would end up in search results which is a bad user experience from a search perspective (you might say who cares about the search engine) but also from a website perspective (I guess a user may tend to click other domain links if they get 404s on your domain).

Also, Google for example states: “Don’t create multiple pages, subdomains, or domains with substantially duplicate content.” If it finds many of these, it will remove them from the index (which is fine, they were error pages anyway) but could lower the site ranking (which is real bad) because crawl times increase.

So, how can this issue be fixed?
In the case of .NET, just add: <% Response.Status = “404 Not Found” %> in the page and you’re good to go.
Of course, this could be done in the code-behind too.

You could apply this to all your custom-error pages if you want to be diligent.

I came across an issue while trying to submit html content in aspx.net, whereby an error stating: A potentially dangerous Request.Form value was detected from the client…

This was a little perplexing and I realized it is a security validation check done by the asp.net engine and can be bypassed with the ValidateRequest attribute in the Page (add it in the <@ Page tag). You can alternatively add this is the web.config but that would make it site-wide with its potential consequences and I would make it page-specific as a best practice.

Now, in my scenario, all I was doing was displaying snippets of html in a text-box. I did not care about submitting back the html. So, now I am trying to figure out how to populate the text-box on the server (using runat=server) but not have it submit back…

Just wanted to make an amusing note that a few weeks ago I was involved in a client conference call that started roughly at 9:30 am and went on till around 6:30pm with around 15 people in 3 time-zones in the US. I was not in the call all along and re-joined it a number of times but that’s the longest conference call I have participated in. We were smoke-testing website and TeamSite content management integration with web services and back-end systems including Siebel and Oracle.
Makes me shudder to think what would have happened had there been international participants with their time-zone disparities.

Sorry for the hiatus in writing but it’s been hard to keep up with the developments going on in the Microsoft dev world let alone write about them.
Recently at Mix, Ray Ozzie unveiled the vision for the next generation of Microsoft products and Scott Guthrie talked about the newer dev tools. The keynote speech is here: http://visitmix.com/blogs/Joshua/Day-1-Keynote/
I really wonder how Scott can do all the work and exceptional blogging that he does.

What’s exciting from a developer’s standpoint is that Silverlight is becoming more and more ubiquitous (being installed on the new Nokia devices and also on the the www.NBCOlympics.com website and the Hard Rock cafe application) and also it’s development is nicely integrated into Visual Studio so it’s easier for developers to target multiple platforms with rich applications.
The ASP.NET 3.5 extensions bring a whole lot of interesting possibilities to the table with the MVC framework, REST support and LINQ and ORM tools.

Also, the IE8 beta is out. I installed it and see that the Activities seems to be quite a productivity enhancer. also, the increase in CSS support is a good thing. The whole AJAX “back” support is pretty fascinating too.

On a side note, I was in a presentation recently where a number of co-workers talked about a Ruby on Rails workshop they attended and it was clear that ROR might be good to rapidly develop an application that does simple CRUD operations but try to go beyond that and it’s quite limiting. The attendees said that they would not use ROR since they don’t see the value of learning it for such limited use. Also, the new ASP.NET extensions provides a lot of the Rails functionality so I don’t see any reason to not use .NET unless you dislike using Microsoft technology.

It is so annoying when an inline Flash advertisment hijacks the mouse scroll-wheel, while one is scrolling down a web page.

Deviating from geek-talk, I just wanted to share my thoughts and experience on the big transitions a company sometimes goes through…

So, the company I work for has gone through tremendous changes in the past 3 odd months. The executive team has changed, there has been some attrition and I see big changes in organizational structures.

In terms of positions, the CEO, CIO, CMO are new (whoa!). My manager, who joined as Director a few months ago, is now a VP and some other groups lost their Directors over the past 6 months. I have seen a lot of co-workers, I was close to, quit recently and the revenue forecast has been tuned down significantly.
I’m sure all these changes could be startling for people who have always been in a stable company environment, but fortunately (or unfortunately?) I have gone through this before and can see beyond the dust without panicking. At the end of the day, this is catharitic for a company and may be a good thing if managed well (that is the key!). After growing from a mom-and-pop shop into a corporation making 180 Million odd, a company like this tends to have people in high positions because of their seniority rather than their skills and experience, not to mention the fact that this is a Healthcare company. This bogs things down and leads to inefficient use of resources. There are many instances of us undertaking projects which managers had no clue about the technicality involved and so ended up hiring consultants and paying through the nose when it all could have been avoided. Even now, I cringe at some of the infrastructure projects in progress, but with my manager and the new CIO, I can see things changing for the better. Also, now I feel that I am in a position to really use my skill-set and experience and go beyond just designing apps to effecting processes and technical know-how to make a difference to the bottomline. I would like to be somewhat of a technical visionary and research and recommend how technology can be applied across the entire company to improve the business and worker efficiency. I can see that there could be a distant possibility for me to do so and that makes me happy. I am also now part of the newly-formed Exployee Experience Improvement Committee in the IT organization to help boost employee moral. Let’s see how that goes. It is nice to have a direct dialog with the CIO and make him see that I bring a lot to the table.

This is a turning point in my job in terms of opening up possibilities for the future. I’d like to see my role and responsibility change in 3 months and have a clear career path.

Next Page »

Follow

Get every new post delivered to your Inbox.