What API design flaws exist in SharePoint 2007 (MOSS/WSS 3.0) that could be improved?

I’ve been working with SharePoint 2007 and noticed several areas where the API design seems problematic. Here are some issues I’ve encountered:

  • Sealed classes and methods that prevent proper extension when you need custom functionality
  • Poor error handling with exceptions that don’t provide enough detail to troubleshoot issues effectively
  • Missing features like the Connected Content functionality that existed in MCMS 2002 but was removed
  • HTML content problems where markup gets automatically stripped from fields with no built-in way to preserve it
  • Performance issues especially when creating SPWeb objects which can be extremely slow
  • No upgrade path from MCMS 2002 making migration a nightmare

What other API limitations have you run into when developing with SharePoint 2007? Are there specific workarounds you’ve found for these problems?

I feel you! CAML’s frustrating as hell with all its weird quirks. You basically need a PhD just to read the syntax. And don’t get me started on the missing intellisense - I’m constantly juggling browser tabs just to look stuff up.

SharePoint 2007’s security model is particularly challenging for developers. The inability to programmatically verify user permissions without executing the operation first means many are forced to rely on try-catch blocks. While RunWithElevatedPrivileges is intended as a solution, it often fails, and the official documentation lacks clarity on its proper use. Content type inheritance adds to the complexity; once a content type is deployed to production, modifying it can lead to issues with changes not propagating to existing lists. I’ve resorted to custom PowerShell scripts to rectify broken content type associations. Additionally, the workflow API proves frustrating with a lack of debugging support, leading to instances that hang silently. Custom field types present another obstacle, as they’re bound by conflicting requirements from multiple base classes.

SharePoint 2007’s object disposal is a complete nightmare. SPSite and SPWeb objects implement IDisposable, but the docs are all over the place about when to dispose them yourself vs. letting SharePoint handle it. I’ve wasted so many hours tracking down memory leaks that came from badly disposed objects. The API’s batch operations are garbage too. Need to update hundreds of list items? You’re stuck doing them one at a time, which kills performance. Web services help a bit but then you’re dealing with auth headaches and messy error handling. Event handling is broken as well. Can’t cancel operations from event receivers half the time, and the before/after event model works differently depending on what object you’re using. Debugging custom event receivers is hell because exceptions just disappear without any logging.