Archive for April, 2009


How to Programmatically Impersonate Users in SharePoint

April 9, 2009 Comments Off

Sometimes when creating SharePoint web or console applications, you may need to execute specific code blocks in another user’s context.

Impersonating users in SharePoint will require a couple of things:

  • the account that the web or console app uses has privileges to impersonate other users (typically this would be the system account)
  • specific users’ user tokens



How to Invoke Javascript Snippets Without Using RegisterClientScriptBlock

April 7, 2009 Comments Off

Sometimes you may need to integrate simple Javascript code blocks in your SharePoint custom application pages (or any ASP.NET page). In some cases, you may need to invoke this code block only when a specific condition is met. This can pose a challenge because the validation code will probably sit in your code behind (C#), but the client side script is in Javascript.

The first thing you may try is using the RegisterClientScriptBlock. For example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<script runat="server"> 
protected void Page_Load(object sender, EventArgs e) 
{ 
   if (!Page.IsPostBack) 
   { 
      try 
      { 
          SPWeb web = SPContext.Current.Web; 
          ClientScript.RegisterClientScriptBlock(this.GetType(),  
               "script", 
               "</script><script language='javascript'> alert('hello'); </script>"); 
      } 
      catch (Exception ex) 
      { 
          Response.Write(ex.StackTrace.ToString()); 
      } 
   } 
}



Looking For Another Ninja – What Makes a Good Programmer?

April 1, 2009 8 comments

What Makes a Good Programmer?

This is a very important question for any new company looking for potential new recruits in today’s competitive job market. I’ve been quite vocal in the past about what I consider to be a good programmer and my core checklist hasn’t changed much since joining this l33t group of ninjas.

How to recognize a good programmer, posted by Daniel on inter-sections.net offers some interesting positive and negative indicators for recognizing a good programmer. While we don’t agree with everything on this list (some of us didn’t discover programming until later in our careers as an example), we do believe in the spirit of this article: good developers are passionate people who are engaged, love what they do, have a desire to learn and are dedicated to this field.

I find that it’s often the non technical questions that reveal more about a potential recruit than anything else. That’s not to say that expertise is not important, but it’s ONE of the many things to consider.

Daniel summarizes it really well:

Positive indicators:

  • Passionate about technology
  • Will talk your ear off on a technical subject if encouraged
  • Learns new technologies on his/her own
  • Opinionated about which technologies are better for various usages
  • Very uncomfortable about the idea of working with a technology he doesn’t believe to be right
  • Knowledge of a large variety of unrelated technologies (may not be on CV)

Negative indicators:

  • Programming is a day job
  • Happy to work with whatever technology you’ve picked, all technologies are good
  • All programming experience is on the CV

If you’re a developer yourself, or are someone trying to find the right balance between technical questions and business related questions, this is where I would start. We are a very close knit group of people and are actively looking for someone to join our team, if you’re interested in talking to one of us, we’d love to hear from you.

Feedback is always welcome, whether you agree with this list or not.



SharePoint Readiness Checklist – Reposted

April 1, 2009 Comments Off

The SharePoint Readiness Checklist used to be posted on the MS site. This checklist is a handy Excel file that contained a wealth of resources, references, and tutorials, especially when SharePoint 2007 was first launched.

It contains 340+ links to tutorials/references/online courses such as:

  • Customizing and Branding SharePoint Portal Server and Windows SharePoint Services
  • Creating Content for the SharePoint Server End-User Training Kit
  • Collaborating with SharePoint Server 2007 Overview
  • Best Practices for Managing Content with SharePoint 
  • SharePoint Server 2007 Web Parts
  • Developing SharePoint Workflows Using Visual Studio 2005
  • Office SharePoint Server 2007 Training
  • Planning for and Deploying Office SharePoint Server 2007 (Part 1 of 2)
  • Planning for and Deploying Office SharePoint Server 2007 (Part 2 of 2)
  • Installing and Configuring Search in MOSS 2007
  • Installing and Configuring Basic Search with MOSS for Search 2007
  • Enterprise Search in MOSS 2007

The list may be a little bit outdated, but still is very useful. We can’t seem to find the link, so we’re reposting it here. Enjoy.




We Use WooThemes

Do you like the look and feel of this blog? You'll definitely want to checkout WooThemes and their awesome lineup of designs available for WordPress. Contact us for more information or to get started using WordPress for your company site, we'd love to help.

WooThemes - Premium WordPress Themes Club

We are experts

Black Ninja Software was created with the idea that great software comes from great people. We are passionate about the technologies we use and continually refine our skills to better master what we do. This is what makes us Ninjas. We architect, design, and implement solutions using Microsoft Office SharePoint Server, SQL Server, and ASP.NET

We create software

If you have a business process that needs refining or automation, or you have a current project in distress that needs rescuing, we can help. Our wealth of experience will create your great idea from scratch if that's what you need ninjas to do for you. In addition to the work we do for our clients, we also have several of our own projects that are currently being developed. We use the same tools and the same skills on our projects as we do on yours.

We train

We can train you to become ninjas like us. SharePoint is ginormous. We can break down training into areas that cover your business needs either on-site or over the web. We understand that adopting new technology can often be a challenge and we can help ease the process through our professional SharePoint training services.