So I have to toot my own horn for a bit.
First off, I haven’t really written a program since I was in college. And that really isn’t a decent real world coding experience anyway. In school, you’re working in a fairly closed environment in terms of what’s expected and what’s provided. ”Here’s what a data structure is…now go write one.”
I’ve played around with Java, did a little bit of coding around making IRC bots, but nothing terribly exciting. And, I really haven’t had to solve any problems with code, mostly. I’ve been working as a systems administrator. Sure, there’s some scripting, but I wouldn’t consider it the same thing.
Two things changed that for me: PowerShell and my new job as a SharePoint farm administrator. PowerShell came out during my last job, and I played with it a bit, but I really didn’t get the awesomeness of it until I started working in SharePoint. PowerShell is a scripting language, but it’s object oriented and tightly integrated with everything in the Microsoft stack. Writing scripts in PowerShell is nipping at the edges of .NET programming. You’re working with the same object models, but in an environment where you can load and unload objects in the structure at your whim.
Because of this, I came to greatly understand the SharePoint object model. I scripted large swaths of what I was doing in SharePoint. Farm configuration, web application configuration, site collection creation and permissions. It even got to the point where I was tinkering around with the portal navigation providers in PowerShell. (Adding links to the top site navigation and the quick launch, complete with security trimming! Something that you can’t do in the graphical interface.)
Well, it’s finally come full circle. Over the last two days I have written, compiled and deployed my first custom event receiver in SharePoint.
First off, why? Well, there’s a lot of functionality provided by SharePoint. But Microsoft is in this for the money, so they’ve restricted access to certain functionality based on the “tier” of the application you’re using. The free version, SharePoint Foundation, does a lot, but at the same time, it’s fairly restrictive. SharePoint Server Standard adds a lot of fun stuff, but there’s a hefty price to be paid to get there. Enterprise adds on even more functionality, but aimed at higher business functionality (think business intelligence.) So, as you might expect, you have to live with some caveats if you’re using SharePoint Foundation…
Unless you decide you can just do it yourself. Enter my new found (or old remembered) ability to write code.
The past 48 hours have been entertaining. My solution went from a farm solution to a sandboxed solution (I didn’t like the fact that the features it enabled could be activated in any site in the entire farm, it just made it messy.) I also had to solve the interesting problem of how to catch and handle errors (my farm solution just wrote to the ULS logs on the web front ends, but sandboxes are restricted from doing that, so I had to come up with a custom solution for that too! (That is rather ingenious, I might add. Hunting through logs is messy, so I create and write to a custom list.))
I’m actually pretty jazzed. Too bad I’ve got enough “administrative work” to sink a ship. I’d probably keep coding.