Brief introduction to PRISM

Before I go into the technical details of this article. I want to provide some context for this discussion. So we are using PRISM to develop a user-interface (UI) platform in the context of a Silverlight (but they apply to WPF also). The idea behind the UI platform is we will provide the basic functional look and feel and various plumbing (such as security, service encapsulation, messaging and exception handling, among others) and allow others to develop modules/components on top....

<span title='2011-03-08 14:55:10 +0000 UTC'>March 8, 2011</span>&nbsp;·&nbsp;4 min

How to check if Integrated Windows Authentication is available?

If you’ve ever worked on an intranet site, you often want to know, programmatically, if a client that’s accessing your website has the ability to automatically login to your site (Integrated Windows Authentication). With Integration Windows Authentication, Windows can basically send (as a HTTP header) the currently “logged on” username. So your application can access this LOGON_USER HTTP header and go from there. I won’t get into the details of how to setup integrated windows authentication, but basically the idea is you go into IIS and for a given resource (a folder or a file) on your site you change the directory security to Integrated Windows Authentication....

<span title='2011-03-07 13:13:32 +0000 UTC'>March 7, 2011</span>&nbsp;·&nbsp;2 min

Better Presentations

You can drastically improve your PowerPoint presentations by simply leveraging pptPlex! It’s a add-on for PowerPoint to build dynamic, contextual presentations. Contextual presentations allows your viewers to see the global context of your discussion, which in turn helps them to follow your line of thought. Watch some of the videos on the pptPlex website to see what’s possible.

<span title='2011-03-04 13:19:16 +0000 UTC'>March 4, 2011</span>&nbsp;·&nbsp;1 min

Rendering Step 1 of … (ASP.NET)

The MultiView control, Wizard control or even a custom panel-based control is very useful to collect large sets of data in wizard form; and it’s often useful to give visual ques to the user as to which step he/she is in. Something similar to: The following ASP.NET code/C# allows us to build a dynamic step control which grows or shrinks automatically given the number of views you have in a MultiView control, or the number of steps in a wizard control....

<span title='2007-09-27 01:01:29 +0000 UTC'>September 27, 2007</span>&nbsp;·&nbsp;1 min

Presentation on jQuery

I presented a topic on jQuery at our campus web publishers meeting. Here are the sample pages and the PowerPoint presentation. I will talk more discussions on jQuery and how it has helped us to build a powerful web-application next week.

<span title='2007-06-19 02:32:23 +0000 UTC'>June 19, 2007</span>&nbsp;·&nbsp;1 min

Automatic Documentation

Generally all programmers are lazy–and specially when it comes to documentation because it takes so much time and doesn’t necessarily produce any material benefit. GhostDoc1, designed by Roland Weigelt, is a plugin for Visual Studio 2005 that automates the generation of XML comments. For example if you have the following C#1 function: public User GetByUserName(string userName); GhostDoc will automatically generate: /// <summary> /// Gets the name of the by user. /// </summary> /// <param name="userName">Name of the user....

<span title='2007-05-31 19:16:21 +0000 UTC'>May 31, 2007</span>&nbsp;·&nbsp;1 min

Using SSIS to Access Network Resources

SSIS (SQL Server Integration Services) is the replacement for DTS in SQL 2005. One of the more deceitful concepts in SSIS is it’s security context. When you run a SSIS package form your Visual Studio Environment, it obviously runs under a different security context (most possibly as you–the developer) than it would run if it was run as a scheduled service on the SQL server itself. So let’s say you’ve developed a SSIS package that uses resources within your domain, such as accessing a network drive....

<span title='2007-05-26 01:38:29 +0000 UTC'>May 26, 2007</span>&nbsp;·&nbsp;3 min

Script Task reading/returning data

When you are using the Script Task in SSIS it’s often useful to have the script task return data, and also at times useful to have access to external data. Once you drop a Script Task onto the designer and go to it’s editor, under the script tab you’ll find two attributes: ReadOnlyVariables, ReadWriteVariables. The first allows the script to access external user variables for reading, while the latter allows write access....

<span title='2007-05-25 23:58:45 +0000 UTC'>May 25, 2007</span>&nbsp;·&nbsp;2 min

Reverse a linked list recursively

A question came up the other day while I was helping a friend of mine about recursively reversing a singly linked list. The moment I heard about it I came up with a solution, but turns out the solution requires the function to accept the following signature: List* reverseList(List *l); This actually poses a problem because there’s no way to keep track of the head, or maintain any back pointers which could’ve been done if the function accepted a second parameter....

<span title='2007-05-23 23:26:12 +0000 UTC'>May 23, 2007</span>&nbsp;·&nbsp;2 min

Legacy code

I manage a good portion of legacy code, written by so called consultants, and I can’t believe how many places I have seen code like this: bool flag; if(x==y) { flag=true; } else { flag=false; } Or a variation of this bool flag=false; if(x==y) { flag=true; } Although the latter is better, you can write an equivalent statement as follows: bool flag = (x==y); How much easier is that to read?...

<span title='2007-05-17 00:52:11 +0000 UTC'>May 17, 2007</span>&nbsp;·&nbsp;2 min