Archive for 'Blog'


What Software Mockup Tool Do You Use?

May 15, 2009 2 comments

It’s not often that we come across a tool that makes us go ‘WOW’. Balsamiq’s Mockups for Desktop flagship product did just that when I gave a demo of it yesterday to the internal team here at Black Ninja. I vaguely remember DHH tweeting about this tool and I made a mental note to take a look at it in more depth a bit later. Well, yesterday was that day for me and I have to say I am thoroughly impressed.

I was able to mockup a UI of a custom page I’m about to build in SharePoint and it took me a little over 1 hour to produce the png that I eventually sent to the client. As a pleasant side-effect, the client was quite impressed by my mockup. If you’re interested and want to learn more, check out their 3-minute demo video or their online examples, it’ll give you a good idea of how easy this tool is to use.

Here is my summary of this tool:

  • Very easy to install, I was able to get it downloaded, installed and ready to use in about 2 minutes.
  • Very easy to use, when you first install the app, the default page that loads is a UI mockup that gives you some guidance on how to use the tool. I thought that was very clever.
  • I did not need to read a help file, access a kb or talk to a support person to start making mockups.
  • I can save all mockups I create, and when I’m ready to present to my clients, I can save as png and email to them.
  • My email inquiry was responded to in about 2 hours.
I encourage you to try their online demo! I think these guys are doing a great job and I look forward to seeing what comes next.


Why Should Indexing a SharePoint Field Break Your CAML Query?

May 12, 2009 2 comments

We ran into an issue today – one of our calculations that rely heavily on CAML queries stopped working. The CAML query we use – which we haven’t changed in forever and which used to work – now returns 0 results when run.

This is what our original query looked like:

1
2
3
4
5
<Where>
<Eq>
<FieldRef Name='Project' LookupId='TRUE'/>
<Value Type='Lookup'>100</Value></Eq>
</Where>

It’s not a complicated query, and this used to work. Used to. But for some reason, it doesn’t anymore.

And for some reason, if we change the Value from Type=’Lookup’ to Type=’Integer’ it magically works again:

1
2
3
4
5
<Where>
<Eq>
<FieldRef Name='Project' LookupId='TRUE'/>
<Value Type='Integer'>100</Value></Eq>
</Where>

Why will using Type=’Lookup’ suddenly fail, and using Type=’Integer’ work? Does this mean we need to change all of our CAML queries that use Lookup?

What changed? No new service packs. No recent patches.

We tried to retrace our steps, in the hope that we don’t have to rewrite all of our CAML queries and retest all our application pages:
1. No change
2. No change
3. Ah, one minor change, but all we did was create an index in the Project field because we have over 2000 items in this list.

Indexing the column should help optimize retrieving records from this list. But could indexing the Project field be the culprit? This seems to be about the only change we did on this list.

But I think to myself, it should not be the culprit. Right?

I am a database person, and I create indexes here, there and everywhere whenever I need performance gains on some of my reports (ok, let me qualify that, I index where it makes sense. Of course if it is a purely reporting read only database, then I will index the heck out of it. OLTP databases are a different story). So for me, I don’t think it should affect the way we retrieve our records using our CAML query.

We needed to test if this was the case, so we did a quick experiment:
1. Created a custom list with a field that uses a regular lookup to another list
2. Used CAML with Type=Lookup ——-> Works
3. Indexed the column
4. Re-tried the CAML with Type=Lookup ——-> Does not work
5. Tried CAML with Type=Integer ——-> Works
6. Removed index from column
7. Re-tried the CAML with Type=Lookup ——-> Magically works again

So, why would (or should) the implementation of our CAML query change when we decide to index, or drop an index, from one of our SharePoint lists?

We tried to look for an explanation, but we haven’t found any official documentation, or any definitive rationale.

Again, maybe I just don’t understand, but in my database world, creating indexes, or dropping indexes from my tables does not break my SQL queries.

So why should indexing break a query in the SharePoint world?

Anyone from Microsoft SharePoint team care to explain? I’m sure we’re not the only ones interested to know the answer.



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.



Black Ninja Software is Now a Microsoft Certified Partner

March 19, 2009 Comments Off

Microsoft Certified Partner, Information Worker Solutions

As part of our commitment to developing outstanding solutions for our customers, Black Ninja Software has become a Microsoft Certified Partner.



Friday Morning Inspiration

March 13, 2009 2 comments

A great speech from Apple’s Steve Jobs. Here at Black Ninja we take great pride in what we do because we love what we are doing. This message is at the heart of this speech.



Black Ninja Software Attending DevTeach!

February 26, 2009 Comments Off

We put up an announcement yesterday to let everyone know that we’ll not only be speaking at DevTeach but we’ve also been selected as a Gold sponsor! We’re very happy about this opportunity and we’re really excited to present some of the sessions we’ve put together.

Powershell’d – How to Powershell Your Way with SQL Server 2008

If you have used any kind of shell scripting before, you know how it can help automate tasks quicker and more efficiently. Powershell, a scripting language that leverages Microsoft .NET Framework, is finally supported in SQL Server. This session will dive deep into how you can use Powershell to create, maintain, manage and troubleshoot your SQL Server databases. This session will also cover differences between using Powershell in SQL Server 2005 and 2008.

Leveraging Telerik WebControls in Your SharePoint Projects

Telerik currently offers a full suite of powerful UI controls which seamlessly integrate into SharePoint and help developers build feature rich and highly responsive user interfaces for MOSS and WSS. In addition to their standard suite, Telerik offers a free version of the built in rich text editor that is cross browser compatible and offers support for the macintosh platform. This session will walk you through the steps for building SharePoint Web Parts and Custom Application Pages with specific code examples that leverage Telerik to provide a richer end user experience. We’ll cover a specific subset of the Telerik Web Controls including: RadGrid, RadComboBox, RadAjax and RadCalendar and I’ll also demonstrate briefly how to setup the Telerik RadEditor for SharePoint.

This event is a great chance for local developers and MVP’s to mingle and meet. There are lots of great sessions to attend with some really good content. If you’re interested in learning more please check out the DevTeach site or contact us for more information.

We are offering a special discount for Black Ninja Software visitors, so be sure to check that out!

The Ninjas @ Black Ninja Software



What Do Ninjas Use For Development?

October 7, 2008 Comments Off

We’re a team of developers that care about the tools that we use. People often ask us what our development environments look like. You asked, we answered:

When we’re ready to get paid, we use freshbooks.

We use Google Apps for business for email, information sharing and security.

Blogging is important to us, so we use wordpress.

We update often. Twitter helps us in that department.

Google Analytics helps us check up on how we’re doing.

Our business would never get out there without a domain.

To help us keep in touch with one another, we yammer what we’re currently working on.

We use telerik web controls for all our ASP.NET development to make our pages look pretty.

Git version control keeps our code safe.
header

We’re so busy working on everyone else’s infrastructure, we don’t have time to manage our own, so Rackspace takes care of that for us.

Redgate makes it possible to tune our code so we produce the best performing pages possible.

For all our UI mockup and design, we absolutely love using Balsamiq Mockups For Desktop!

Pivotal Tracker helps us keep organized and manages our morning scrums!
pivotal_tracker

And last but not least, we’d be lost without our MacBook’s, iMac’s, iPhones and Apple TV!




Upcoming Training Events


We also have courses on Ruby on Rails and iOS Development!

Check our training page for schedule, content and rates!

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.