forge

XML Namespaces and Bad Exception Propigation

Two quick things …

1) If you’re trying to use XPath on XML you get back from SharePoint… don’t forget you’re going to need the XmlNamespaceManager object to use with SelectSingleNode or SelectNodes to get back what you’re looking for.  I repeatedly forget that SharePoint uses XML Namespaces extensively… and that using SelectSingleNode and SelectNodes does require namespaces in the XPath.  (Today was lesson #3.)

2) Bad error handling.  You may find it interesting to note that the WebPartPages web services’ GetWebPartProperties method doesn’t seem to throw soap exceptions.  I ran into my favorite “Cannot complete…” error again.  However, it didn’t show up immediately because rather than throwing a soap exception this particular method returns the error as a comment node — rather than throwing an error.  So you’ll have to look for comments one level down from the root.  (Sidebar: It doesn’t look like this web service even works against SharePoint Portal Server areas.  At least – I keep getting an error about XML namespaces — back as a comment.)

forge

SharePoint: An update on IRuntimeFilter

A few weeks ago I posted on the IRuntimeFilter interface in SharePoint. Here are a few updates…

1) I’ve validated that IRuntimeFilter’s CheckRuntimeRender() method is only called when the IsIncludedFilter property of a web part is non-null.

2) By default, Windows SharePoint Services will put administrators and web designers into a shared page view rather than in a my page view.  The net effect is that the shared page isn’t a personalized view and therefore IRuntimeFilter’s CheckRuntimeRender() method isn’t called.  To fix this create a new site definition and add the following tag into the <HEAD> tag.  <META name=”WebPartPageDefaultViewPersonal”>  Then make sure you do an IISReset so it can take effect.  (You’ll have to create a new site to see this.)

3) ValidateRuntimeFilter() is called everytime the web part is serialized — which is often.  So keep the code that you write in this method very simple.

4) If you decide to do post backs in the chooser form that you create, you’ll need to add a tag to the <HEAD> tag.  That tag is <base target=”_self”>  If you don’t do this then the form will cause a new window to open.

My next step is to fix some impersonation issues with roles (the ones that Michael Donovan mentioned to in his post.  From there, I’ll be writing a IRuntimeFilter chain to allow the Portal audiences IRuntimeFilter to run side-by-site with our own IRuntimeFilter.

forge

How to Gather Windows SharePoint Services Requirements

Getting good requirements for a SharePoint project is in some ways more critical than for a project that’s based on more widely understood technologies. The fact that SharePoint isn’t widely understood by clients — whether internal or external — means the potential for misunderstandings is much greater. For this reason, it’s more critical to discuss each feature of SharePoint to understand of how the feature works out-of-the-box and to understand how the organization envisions those features. Whether you choose to design and architect your SharePoint technologies solution yourself or decide to work with an outside partner to perform the architecture and design steps, you’ll find that having a foundation in solid requirements makes the development process run smoother and results in a better solution for your business needs.

http://my.advisor.com/doc/16797 [Article removed from the website]

forge

Harnessing Properties in SharePoint Search

Most users of SharePoint Portal Server rapidly become enamored with the ability to add new fields (containing meta data) to documents in the document library. All of the sudden it becomes possible to associate information to a file beyond the file name that we’ve been limited to since the beginning of the computing era.

Few users, however, have the opportunity to understand how this meta data is used by SharePoint for searching. This leads to problems when users decide that it’s necessary to use SharePoint Portal Server Search to search on information contained in a field that they have added. In this article you’ll learn how SharePoint uses document library fields to create properties that are searchable and how to enable searching on those properties.

Article reposted here: Retro: Harness Properties in SharePoint Search

forge

Debugging in the GAC

There are sometimes when your assembly almost has to be in the GAC and when you need to debug it.  This was difficult since if you registered a .NET assembly into the GAC the debugger wouldn’t break on it.  This is because the .PDB file information didn’t get loaded since it’s not in the same directory as the DLL.  Here’s how to work around that.

1) Install the Assembly in the GAC
2) Start-Run, %SYSTEMROOT%\Assembly\GAC
3) Navigate into the folder with name of the DLL that you want to debug
4) Navigate into the folder with the version number and public key that you want
5) Copy the .PDB file into this directory

Now you’ll be able to run a debugger against code running in the GAC.

forge

Creating Artifacts — what you don’t know

[Authors Note: There’s a very interesting discussion brewing about what artifacts are good and what artifacts are bad. Check it out.]

Just as artifacts from ancient times give us information about early man, the documents and presentations you create in IT can give insight into your technology initiatives.

We know relatively little about the humans that were roaming the earth thousands of years ago. But because we have the artifacts they left behind–pots, arrowheads, and so forth–we have a glimpse give us a glimpse into their daily lives and who they were.

Artifacts (documents, Powerpoint presentations, spreadsheets, etc.) also allow a glimpse into the processes that are happening in your IT organization. Learning how to encourage the creation of artifacts is an essential part of managing an IT department.

The power of the artifact

An artifact is anything crafted by human hand that is left behind. This can be a product, a training manual, help documentation, project management documentation, or anything else which is tangible. Most of the time artifacts are documentation or diagrams of some sort but they can also be the finished product or some piece of the finished product.

http://www.techrepublic.com/article/creating-artifacts-what-you-dont-know/

forge

Developing a data communications strategy

Any data communications proposal can look good on paper until you dissect it by evaluating its reliability, expandability, and complexity.

Whether your organization has two sites or two hundred sites, figuring out how to manage the data communications between those sites can be a real challenge. With a vast array of options, it’s often hard to determine what’s best for your organization. Here are three key evaluation criteria you can use to make the right decisions for your connectivity.

Reliability

In most cases the reliability of the network is a critical component to how useful it is. Even in organizations where the ability to communicate between sites isn’t core to the business because there are no central databases to be accessed and no real-time need to share information, loss of connectivity is still very disruptive.

Reliability is measured by the frequency, the duration, and the completeness of outages.

http://www.techrepublic.com/article/developing-a-data-communications-strategy/

forge

Requirement: Collaboration

The next time I see a requirements document which says they want “collaboration” my response is going to be to ask…

“Why do you want to cooperate treasonably with a foreign power?”

Maybe that will jar people into asking what they mean by collaboration.  (Asking what they mean by collaboration doesn’t seem to work in most cases.)

forge

Anatomy of a Software Development Role: Development Manager

It is possible to believe that there is nothing left to be done. That all of the roles outlined thus far is all that is needed to make the process work. However, the role of the development manager is critical to the long-term success of the software development team. The role that the development manager plays – particularly when interacting with the project manager – is essential to a continuously improving process. (If you’ve not been following the series, you might want to read Cracking the Code: Breaking Down the Software Development Roles.)

What’s the Development Manager role?

The development manager’s role can be described as “everything else”. Although accurate this description is not very illuminating.

The development management role is the role whose purpose it is to keep the vision on track. This is much like a CEO, who sets the vision for an organization. This of course differs from the COO, who-like a project manager-ensures the day-to-day operations. While it’s the project manager’s goal to get the project to the finish line, it is the Development Manager ‘s responsibility to look ahead to make sure that the finish line is the right finish line to be reaching. While the project management position is a management position, the development manager role is a leadership position. Click here to see how the the Deployment role fits within the full organizational chart.

Read more of the article at http://www.developer.com/java/ent/article.php/3529081

[Author’s Note: I really enjoyed the mental exercise that writing this series brought.  It was a good way for me to clarify my thinking around the various roles in the software development process.  I hope that it can provide a framework for understanding how people fit into the process in your organization. The next series is on Coding standards and starts in just a few weeks.  I’m always happy to get input on what you think should or shouldn’t be in coding standards.]

forge

SharePoint: Cannot complete this action. Please try again.

Another one of those lovely SharePoint error messages … This one leaves me wondering what I do when it doesn’t work the second time I try it.  (Or the hundredth since I’m getting it back from code running against the API.)

… I’ve got to get my library of least favorite SharePoint error messages up.

If anyone’s interested this one came up when trying to get SPWeb from SPSite.OpenWeb with a GUID … that is valid.

Rob