.. of ones and zeros ..
a discussion of technology and software development by bryan napier

The SharePoint Development Tax

November 4th, 2008 . by bryan

Typically when you are talking about SharePoint the conversation revolves around all of the great "out of the box" functionality you receive with the product.  In no way do I intend to argue against that, SharePoint is a fantastic product that does many things very well.

SharePoint as a development platform… well, that’s a whole different story!  Jeffrey Palermo talks about it here, although his primary gripe seems to be that SharePoint has to run on a server OS, which would require using a development VM.  I do all development in VMs regardless, so that isn’t really a deal-breaker for me at all.  Speaking of which, Andrew Connell has a great blog posting on using differencing disks with Microsoft Virtual PC.

Charles Chen argues the opposite in his blog posting, defending SharePoint as a development environment and taking Palermo to task on a point-by-point basis.

One thing I don’t see mentioned by either is what I am going to refer to as the SharePoint Development Tax(tm).  What is this tax?  Is a break given to 95% of working families?  Well, no.  This tax comes in the form of time spent waiting for solutions to deploy, 12 hives to be copied, and app pools to be recycled.  When working with SharePoint as a development environment, several times a day you will need to deploy solutions, which cause app pools to recycle, you may need to copy new assemblies to the GAC, again, requiring app pool recycles.  So what’s so bad about that?  That happens all the time in ASP.NET development, why is it bad for SharePoint?  Well.  The issue is HOW LONG SharePoint takes to recycle.  Sure, you could complain about my development environment, but I am running on a quad-core 2.2 GHz machine with 8 GB RAM, and I give my development VPC 3 GB RAM.  How long does it take?  On average, a solution deployment takes 45-60 seconds.  An app pool recycle takes almost 2 minutes.  I probably go through about 10-20 app pool recycles a day, eating up 20-40 minutes of time, not to mention lost productivity due to falling "out of the zone".  In Joel Spolsky’s famed blog posting 12 Steps to Better Code there are several mentions of how a 15 second break in concentration causes a 15 minute lapse in productivity. 

Perhaps I should quit complaining though… The SharePoint Development Tax has given me lots of extra time to play guitar while watching spinning circle animations!


Value does not fall within the expected range

October 9th, 2008 . by bryan

I’ve been battling this error several times over the past few weeks in varying contexts.  Today’s occurrence was in accessing "Page Settings" of a MOSS Page.  Thanks to YongYS for the following fix:

http://www.bronios.com/index.php/2008/01/18/moss-page-setting-error-value-does-not-fall-within-the-expected-range/

A few weeks ago I was running into this issue after backing up a content database and moving it to another farm.   Thanks to Stefan Gossner to pointing out the error in my ways:

http://blogs.technet.com/stefan_gossner/archive/2008/03/12/common-error-situation-with-when-using-backup-restore-to-transfer-a-database-to-a-new-farm-on-moss-2007.aspx


IIS and Windows 2003 Mismatched Service Packs

September 11th, 2008 . by

I have this nagging feeling that I have been down this road before, so I need to blog it so maybe, just maybe, I won’t waste another hour troubleshooting something I’ve done before.

Scenario:

You browse to Central Admin, or any Site Collection really, and you are prompted incessantly for  your user credentials.  After about 5-8 times, the page comes up.  You are NOT presented with a Forbidden message.

You check your IIS log files, and you see several 401 errors for WebResource.axd.

You remember something about installing SP2 when IIS wasn’t on the box, then installing IIS from a source that did not have the Service Pack slipstreamed.  Hmmm.  Might be relevant.

Solution:

Explained thoroughly by Paul Culmsee on his blog www.cleverworkarounds.com, http://www.cleverworkarounds.com/2007/11/15/darn-iis-and-service-packs/.  If it wasn’t foreshadowed by the last sentence of the Scenario, reinstalling Windows Server 2003 SP2 was the solution.


Custom Workflows with Collect Data

June 25th, 2008 . by bryan

In the past week I have implemented several custom workflows for a client using SharePoint Designer.  The workflows were pretty simple:  A Forms Services form would be completed, in the form would be a the Manager’s name and e-mail address.  The workflow would use the "Collect Data" action to perform an approval workflow, assigning an item to the manager specified in the form.  Trouble was, the manager would receive the task notification, click the link in the e-mail to edit the task item, and receive an access denied error.

For the purposes of troubleshooting I opened the permissions on the task list as much as possible, granting nt authority\all authenticated users the Full Control permission.  Still the users received "Access denied".  Then, I found the following forum thread:

http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1838253&SiteID=17

The solution wound up being a combination of two posts, this was by "Vansen":

I opened up the Site using the Sharepoint Designer. Then i right-clicked the workflows folder and chose properties. In the Security Tab i clicked the link "Manage Permissions using the browser". Then a new Browser window opened and i was able to adjust the rights for the Workflow Folder. In my case the rights inheritance was broken. I restored it and it worked.

And this one by "Andre Rentes":

I found a solution but not is the better…

-> Open Sharepoint Designer,

-> right click on Workflow 1 (My workflow)

-> select Publish Selected Files…

-> choose  File System and write a location ( c:\ ) for example

-> Click OK

 

Combining these two solutions fixed all three of the problematic workflows!  Thanks guys!


Maintaining Other People’s Code

April 1st, 2008 . by bryan

I have taken over maintenance of other people’s code in the past, and its generally a mixed-bag. Sometimes you inherit a plate of spaghetti, sometimes you luck-out and actually get a well architected and implemented codebase. The real payoff when inheriting maintenance though, is to read the fantastic comments left behind, such as this gem I unearthed today:

// if it’s a number we should sort it descending because it is probably a date
// bad? no, this is AWESOME!!!! Regular expressions are for assholes.
int.Parse(f.SubFolders[0].Name);
dv2 = this.GetFolderViewSorted(f, “DESC”);

« Previous Entries     Next Entries »