Archive

Archive for March, 2009

First thoughts on Course Manager code

March 30th, 2009 RichardWillis 4 comments

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:

European Best Practices SharePoint Conference

March 25th, 2009 RichardWillis No comments

I’ve finally got round to booking this. It’s on 6-8 April in London and looks like it will be a great conference. Don’t miss Andrew and Alex’s lunchtime session on Wednesday about SharePoint in Education. Find out more on their web site.

If anyone else is going it would be great to meet up. If anyone is interested we could try to find some space for an SLK discussion group. Let me know if you are interested in either of those and I’ll see what we can arrange.

Categories: SharePoint Tags:

Running IIS application pool as a domain user

March 25th, 2009 RichardWillis 1 comment

Just finished setting up an IIS application pool to run as a domain user. There’s a number of hurdles you have to jump over before it will work.

  1. In local policies, set the account to “Act as part of the operating system”. Administrative Tools | Local Security Settings | Local Policies | User Rights Assignments | Act as part of the operating system
  2. In local policies, set the account to log on as a service.
  3. Give the account Modify permissions on the folders asp.net uses to create it’s temporary files.
Categories: Development Tags:

Twitter

March 21st, 2009 RichardWillis No comments

Finally signed up to Twitter to see what it’s all about. User name is RPWillis.

Categories: Uncategorized Tags:

Linked In

March 13th, 2009 RichardWillis No comments

I’ve finally got around to completing my Linked In profile apart from finding a decent photo to add. In anyone is interested you can view it at http://www.linkedin.com/in/salamandersoft.

I’m not sure how much use Linked In is, but it seems to be a useful networking tool.

Categories: Uncategorized Tags:

My Shared Documents Web Part

March 6th, 2009 RichardWillis No comments

I’ve finally released the long-awaited My Shared Documents Web Part. This is a companion product to My Documents, but instead of allowing access to the user’s home folder, it allows access to file shares on the network through SharePoint. It is styled just like a normal document library and respects the NTLM permissions that are set on the files.

For more details see http://www.salamandersoft.co.uk/myDocuments.html or contact me at mydocuments@salamandersoft.co.uk for a trial version.

Categories: My Documents, Web Parts Tags:

Salamander Redirect Web Part

March 6th, 2009 RichardWillis No comments

I’ve just finished writing another web part. This one is a web part
which simply redirects the user to another page. There’s quite a few of these around, but none of them suited the school who had the requirement. Their problem was that there were multiple domains the users could belong to – a domain per school, and the existing web parts couldn’t handle this, they were only able to look in one default domain, for example to find the active directory groups they redirected based on.

Salamander Redirect Web Part redirects based on the OU the user is contained in. The list of OUs and the redirect urls are kept in a SharePoint custom list on the same site and the most specific one is used to redirect the user. For example if the following data is in the list

ou=students,ou=users,dc=school1,dc=local    http://sharepoint/school1/students
ou=staff,ou=users,dc=school1,dc=local          http://sharepoint/school1/staff
ou=users,dc=school1,dc=local                       http://sharepoint/school1

Then if the user is in ou=students,ou=users,dc=school1,dc=local they will be redirected to http://sharepoint/school1/students, but if they are in ou=support,ou=users,dc=school1,dc=local they will be redirected to http://sharepoint/school1/.

If you are interested then please send an email to redirector@salamandersoft.co.uk.

Categories: Web Parts Tags:

SharePoint Manager 2007

March 3rd, 2009 RichardWillis No comments

I’ve just come across a great free tool for SharePoint 2007. It’s SharePoint Manager 2007 and is hosted over at CodePlex. It’s quite simply an object model explorer for SharePoint, allowing you to drill down into any detail of SharePoint, from server properties, to web users even down to individual list items. It will even let you modify the properties if you’re feeling brave.

I’ve lost count of all the little console utilities I’ve written to dump things like list fields, view CAML etc, all of which you can browse to with the tool. I think that it’s going to save me a lot of time and increase my knowledge of SharePoint.

Categories: Development, SharePoint Tags: