Home > SLK > First thoughts on Course Manager code

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:

  1. Course Manager Pages : 2 links to pages with the other web parts on
  2. Plan & Assign : Where you create the courses and assign them to students
  3. Monitor & Assess : Where you grade the assignments

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

  1. Axelerate.DataAccessApplicationBlock.dll
  2. Axelerate.BusinessLayerFrameWork.dll
  3. Axelerate.BusinessLayerUITools.dll
  4. Axelerate.SharedBusinessLogic.dll
  5. Axelerate.SlkCourseManagerLogicalLayer.dll

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:

  1. Many, many warning on building the projects. There should be 0.
  2. There are many places where all exceptions are caught and ignored. This is fundamentally wrong.

Categories: SLK Tags:
  1. Harold Gray
    March 30th, 2009 at 16:50 | #1

    Richard,

    I’m another who has struggled with the Course Manager codebase at length. Thanks for your comments….

    I totally agree with your sentiments as I experienced exactly the same kind of issues that you detail in trying to implement and use the Course Manager myself. Indeed, my first take was one of exhasperation and thinking (like you) "no one but the authors could make any modifications to this" – for all the reasons you cited – no error checking, vb and C# for no apparent reason, complex structure for building the UI and communications with the underlying functionality, code that wasn’t used, the Azman reference. There are also large amounts of code simply commented out – some clearly since they couldn’t release third party applications (Infragistics) to Codeplex so they just downgraded and released the result.

    However, I’m a bit hard headed about these kind of things – and I judged that understanding and extending the existing environment would take less time than a complete CM rewrite / debug /qa cycle – since I had not worked with the SLK codebase either… So… I jumped (slipped) (fell) (disappeared) into the environment.

    The result is that I fixed a number of issues and extended the current CM functionality signifcantly. With some understanding / experience with the underlying framework under my belt I’m beginning to be able to make changes quickly and add needed functionality. (Of course the error handling repair and maintainbility issues are both conversations all by itself…)

    Examples of the extensions I’ve achieved include:
    1. cleaner / iconic UI (mostly NON CODE changes in the SQL Scripts when I finally figured out the underlying structure).
    2. better integration with the SLK (e.g. using SLK Actions and AssigmentProperties funtions)..
    3. addition of an interface via the SLK AssignmentProperties page so you can make the appropriate tweaks (that were clearly needed) – e.g. TIME, Specific Learners, Specific Teachers. (What were they thinking?).
    4. single click usability enhancements so the teacher can duplicate an assignment or group – in case they want to repeat particular activity groups / activities – and so they don’t have to type so much…
    5. ability to duplicate and assignment or group – into another CLASS – in case they want to use the same / similar material there.
    6. one of the big issues was the (incomplete / nonfunctional) implementation of the Document Picker… you could not navigate to another site / document library. I’ve added a document picker that will show all libraries in the site collection at once – so the teacher doesn’t have to navigate around to find resources….

    So the end result is beginning to have some very nice functionality…

  2. Jon Nowicki
    April 1st, 2009 at 10:59 | #2

    I think Hunterstone have done some work on Course Manager.

  3. Richard
    April 2nd, 2009 at 10:59 | #3

    Hi Harold,

    Thanks for the comments. I wasn’t in the best of moods when I wrote that after wasting all that time. The biggest problem is that if people can’t understand it quickly, how is it suitable to be produced for an Open Source project where the authors aren’t going to be involved.

    I can see the power in driving the UI from data stored in the database. I’m just not convinced of the usefulness in mixing that paradigm with the web part paradigm which in itself is a pluggable way of extending the UI.

    Also, I haven’t looked into this yet, but how does it handle internationalization? I think that the text string are stored in the database as well. In that case you need separate sql scripts for each language, and any translators will need to be proficient in SQL. Plus there is text in the resource files as well, so that makes 2 places to maintain languages. For an add-on to a project which has 39 different language translations that is just not maintainable. I guess it might be possible to create a tool which automatically generates the sql based on a language file, but that’s just making extra work again, which a good framework should reduce.

    Richard

  4. Richard
    April 2nd, 2009 at 11:03 | #4

    Hi Jon,

    Yes just had a demo of it. They have extended it with much needed functionality and it looks useful in their environment. It will be interesting to see how the work ITWorx has been commissioned to do compares.

    Their developers have taken the time to understand the code, and know more about it than I do. However, they will be supporting it as part of their product, I’m not convinced that it’s going to be maintainable as open source product installed by people with a wide spectrum of abilities.

    Richard

  1. No trackbacks yet.