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.