30 March, 2009 · 3 minutes to read
First thoughts on Course Manager code
Now I've updated Course Manager to reference SLK 1.3.1, had a dig around the code and fixed some issues reported by the community it's time to discuss my first thoughts on it.
Firstly this is about the Course Manger source code and not its functionality. Andrew Woodward has done a great review of that on his blog.
First thing to realize is that Course Manager is basically 3 web parts:
To implement these Course Manager consists of 5 dlls. Yes that's right, 5 dlls for 3 web parts, 1 of which is just 2 html links with no business logic in it. Looking closer the 5 dlls are
Looking at the code only the last one, SlkCourseManagerLogicalLayer actually contains any SLK/Course Manager functionality, the rest are all plumbing. In fact the first 2 projects are written in VB.net while the rest are in C#. It's fairly obvious that the first 4 components are are supposed to be a generic framework, which has been used to build the course manager and contains a lot of code which isn't used by Course Manager - more on this later. Digging deeper on the framework and googling Axelerate leads to aXelerate Solutions, who Microsoft must have commissioned to create the Course Manager. My guess is, and it is a guess as the Course Manager code is way before my time as project co-ordinator, is that aXelerate created Course Manager the way they create all their applications, using their custom framework. Whether or not they realized that they were going to have to release the framework code as open source is another matter. I suspect not as that sort of thing tends to be considered a commercial advantage and secret. Fact is Course Manager is unusable without it, and couldn't be considered open source without it. Trawling around I have found out that the framework has itself been released as open source at http://www.codeplex.com/AxelerateLibraries with a press release (dated 15 Oct 2007 but released 30 Oct 2008) and an overview.
Now the point of a good framework is that it should enable you to add more functionality easily and maintain it. I'm actually finding that it's getting in the way and causing more work. For example I've spent several hours figuring out why Course Manager just wasn't working and giving the informative error "No data found". I eventually tracked it down to mismatched versions of AzMan. The first problem with that is that the error handling was atrocious, it threw away the original error and just displayed a generic error, which it displays if any of the data access had failed. There was no way of finding out what the problem was without modifying the code to not catch the error, this is not maintainable is anything but a development environment. Secondly, as far as I can make out AzMan is not even used in the Course Manager web parts. AzMan is a role-based access control framework from Microsoft which uses an MMC snap-in to manage security. Course Manager just relies on the SharePoint security model, so the AzMan access checking, which is embedded all through the code is superfluous. However, the fact that Course Manager breaks without the correct version is really annoyying. The worst part is that the installation routine checks for the correct version of SLK and .Net, before letting you install, and those checks were broken so no one could install. Please, either check for all requirements, or none, not just a couple that you feel like checking for, It's either a fully robust installation, or a requirement for the installer to manually check for everything first.
I'm not convinced that anyone apart from the authors of the framework is going to be able to add easily any functionality to Course Manager using the framework, or maintain what is there. Why couldn't they have used a mature, robust, full featured framework like NHibernate is beyond me. Granted NHibernate doesn't handle the UI stuff, but thousands of successful projects use it rather than just one.
Finally the two biggest problems of the framework are:
Managing Director / Founder
Richard started SalamanderSoft in 2007 after a successful career as a software developer. Wanting to start his own company and with experience in integrating school systems he set out to build the best integration system for schools and to exceed customer expectations. He starting out on his own, doing all the coding, support and sales until finally the growing number of customers meant he needed to start growing the team. He is still heavily involved in coding the core Integration Suite product in addition to running the company and being the first point of contact for prospective customers.