A few days back I talked about how the release of IronRuby would be great for SharePoint scripting. In my opinion, what makes Ruby such a powerful language is that it is great for creating domain specific languages (DSLs). I’m going to keep this post short so I won’t go into what DSLs are or examples of them. If you want to find out more info, look at some other ruby libraries such as rspec, rake, and datamapper.
I think that SharePoint is in dire need of better tools to facilitate solution development, deployment, and maintenance. It is simply too difficult to build a site in one environment and then deploy it in production. Sure you can do backup and restore, but what about when you want to make some upgrades?
Anyway, this weekend I started working on an IronRuby-based DSL for SharePoint scripting. I’m calling it RPoint for now (until I think of something sexier!). Now, this is very very very early in development and I am sure things aren’t set up today as nicely as they should be long term, but I’ve been really excited by the progress and the possibilities.
RPoint will allow you to write code like this to create SharePoint sites:
# create a new subweb beneath an existing site
at "http://localhost" do
create_web "New Web", TeamSite
end
# create a new site collection and website structure
at :webapp => "http://localhost" do
create_site "New Site Collection", BlankSite, "domain\\user" do
inside root_web do
# create our site structure
create_web "Child Web", TeamSite
create_web "Another Child", BlankSite do
create_web "Private Site", TeamSite, :inherit_permissions => false
end
# create a few lists
create_list "Documents", DocumentLibrary
create_list "Announcements", Announcements
end
end
end
I think that’s pretty cool. Beyond simply creating sites, RPoint will allow you to create lists, views and probably upload resources like images and documents.
My goals for RPoint are to be able to do the following:
- Easily write scripts to create site structures and lists
- Rails-like “Migrations” for applying changes to existing sites
- Custom site template and list definitions in ruby as opposed to XML
- Ability to run template/list definitions against a live site or generate schema.xml/onet.xml files for production deployment
- Support web-services automation as well as object model automation (this will be tough)
SharePoint is a huge product. The code-base is enormous and the aspirations for RPoint are lofty. I would greatly appreciate any assistance. The more hands there are to help, the sooner we will have a tool to make SharePoint development a little easier.
To get RPoint in its current form, you can download it from GitHub.
Clint Simon | 11-Aug-08 at 8:16 am | Permalink
Hey Glen, what’s up?
Nice work here, I think it’s a really important topic which had been neglected by MS.
I’ve created some tools that make source control, isolated developer environments and build automation possible on the SharePoint platform. Take a look at the SPDeploy and the provisioning framework at the links below.
SPDeploy allows you to build a SharePoint solution package from Visual Studio and remotely deploy that solution to a SharePoint farm (no more local dev). The provisioning framework is a provider based implementation that allows you to represent a set of test data in your visual studio solution. This definition (XML) can be committed to source control so that you can build your entire content database from source control. This allows you to stand up a new farm (for test, uat, etc) in no time at all.
More info here:
http://rapid-tools.googlecode.com
http://www.ascentium.com/blog/sp/Post71.aspx
glenc | 11-Aug-08 at 11:54 am | Permalink
Hey Clint - thanks for posting those links. They look like great tools. I think the more people beating this drum the better. SharePoint is a powerful tool, but without proper methodology it is simply too easy to paint yourself (or your client) into a corner.
I would greatly welcome any input, assistance, participation, or criticism you may have on this tool set as things progress.