November 21, 2008

A tale of three guids

A tale of three guids:

Sharepoint

Features require a guid of the form “this-is-a-guid”

For a content type you need a guid of the form “0x100thisisaguid”

For a field definition you need a guid of the form “{this-is-a-guid}”

 

One team, three distinct guid formats WTF

Posted by chriseyre2000 at 20:20:12 | Permanent Link | Comments (0) |

Debugging Feature Receivers

A great technique when developing a sharepoint feature receiver:

Create yourself an announcements list and have the feature log the install (or failure to do so) to this location.

 This is much less messy than debugging on a production box.

 This announcement list can be locked down so only developers and admin’s can read it.

 I have found that you can create and populate a custom list and a view in 20 lines of code (genericly).

 This contrasts to 4000 lines of xml per list/view.

Posted by chriseyre2000 at 20:19:05 | Permanent Link | Comments (0) |

Safecontrols and Sharepoint

This is an article on using safecontrols with sharepoint.
Posted by chriseyre2000 at 20:13:10 | Permanent Link | Comments (0) |

Interacting web parts

This is an article on interacting web parts.
Posted by chriseyre2000 at 20:09:15 | Permanent Link | Comments (0) |

Enterprise Search and the BDC

This is an article on configuring the BDC to work with Enterprise Search.

The BDC is a database/web service abstraction layer that provides a unified api.
It claims to be of general use in Sharepoint.

I can see little benefit to it if you don't want google like searches of your application.
The big problem is that you need to be very careful or the search mechanism will invalidate any access controls that you have.

The BDC is excessively complex for what it provides.  The price in it's complexity (as is generally the problem with sharepoint) exceeds the effort required to roll it yourself...
Posted by chriseyre2000 at 20:06:21 | Permanent Link | Comments (0) |

August 09, 2008

Sharepoint Best Practice

The recommended practice for adding items to a sharepoint site is to use features.
One useful technique is to create a feature with an activation receiver.
When you install and activate this you can do whatever you like to the site in code.

The problem is keeping track of what you have done (and did it work).
I would recommend creating a private announcement list that the installer feature writes to.
This makes it easy to check that the install has worked (especially in a SOX environment where you won't be the one running the script).
Posted by chriseyre2000 at 07:28:58 | Permanent Link | Comments (0) |

August 01, 2008

Sharepoint Scheduler

Sharepoint contains it's own schededuler (similar to Cron).

Here is an article detailing some of the parameters.
Posted by chriseyre2000 at 22:10:42 | Permanent Link | Comments (0) |

July 31, 2008

Sharepoint Warning

I have been investigating creating custom content types in Sharepoint and basing lists off of them.
I have been working with the feature xml documents.

There is an insideous bug that you need to be aware of: the name and the guid for a custom field must both be unique.
If you reuse the name of a field when creating a custom type then when the type is activated the duplicate field will be silently dropped - no warnings or errors.  This took me a day to track down - I was wondering why the view that I built on a list was missing some columns. When I checked these were thecolumns that I had used in an earlier prototype.

There is another catch - you may need to recycle the app pool between un-registering and re-registering features.  Sharepoint seems to prefer to use the cached values rather than the newly supplied ones.

The above was exasperated by the substandard documentation supplied with the product.  While there is lots to read, it is incomplete and contains errors.

It appears that Sharepoint 2007 was realeased too soon - the internal design is not consistent (three styles of guid are required to register a content type!), the error handling is patchy - varies from excellent (exactly which field is incorrect) to vague (a field is wrong somewhere).
Posted by chriseyre2000 at 19:12:12 | Permanent Link | Comments (1) |

July 23, 2008

Performance Limits on Sharepoint

Here is an article on the theoretical limits of a sharepoint site.

Here is an article on working with large lists.
Posted by chriseyre2000 at 21:36:41 | Permanent Link | Comments (0) |

Sharepoint Thoughts

Sharepoint looks to be a very useful platform to develop on.

It has a large amount of internal consistency problems:

The object model uses different names for the webs of the application to the user.
Documentation is patchy - terminology that you are told to avoid is part of the object model.
Negatively named attributes.

The object model can be inconsistent: why does adding a list return a guid whilst adding a site returns the new site?

The built in web services are kind of functional but I would always recommend defining your own:
  • They will not break on upgrade (or at least the interface won't change)
  • They have a defined interface rather than requiring large blocks of CAML
Posted by chriseyre2000 at 21:20:17 | Permanent Link | Comments (0) |
1 2