Fairly Positive

PET at T44U

I recently attended t44u, the global user conference for TERMINALFOUR’s Site Manager product. I gave a talk on how we have use Site Manager and the Site Manager API in the Prospectus Editing Tool (PET). You can see me talk here:

The slides are here:

A Quick Tour of PET

This is a quick tour of the Prospectus Editing Tool (PET) that I’ve been working on at the University of Bristol.

The application is designed to support the production of the 2015 (and future) online and print prospectus. It provides a tool for the Student Recruitment department to manage the process via a workflow and web-based forms for academics to add and update subject and programme information.

The application uses Sitemanager, our new web content management system, as a content store. It uses Activiti, a Business Process Management (BPM) platform, to support the workflow.

When a member of staff logs into the application they see a dashboard with any tasks that have been assigned to them. The screenshot below shows a single task that is available for me to action. I’m logged in as an adminstrator so there are a number of admin-based functions related to the system (Roles Management, Cache etc.), but an academic will see a much more focused page with just the list of available tasks and the ability to create a new programme.

PET Homepage

The programme details page is divided into a number of tabs including general programme details (name, award type, programme length), typical offer details (A-levels and other qualifications needed) and information that either appears online or in the print version of the prospectus.

Programme details

It is also possible to see the CMS version history for the content that represents a programme and subject, allowing you to see who made edits and what changes were made.

Content versioning

There is still plenty of development to be done, including support for postgraduate programmes. Also, we also duplicate data that is available (or will be available) in other systems. As the University undergoes a process of identifying ‘master data’ sources further development will remove duplicate data and will pull it from authoritive sources.

Mapping T4 SiteManager Content to Java Objects

In developing the Prospectus Editing Tool (PET) one of my goals was to try and abstract as much as possible from the underlying content store. If we decided to replace SiteManager (SM) as the University content management system in the very distant future, we’d only have a large amount of work to replace certain implementation classes rather than an unbelievably enormous amount of work. I also wanted the system to be easy to maintain, so that adding new fields to the CMS content types (templates) for the prospectus would be straight forward to support in PET.

I’m using pretty standard Java objects to model the domain, for example SubjectArea and UGProgramme, and these are abstracted away from how the content is structured in SM. Content in SM is made up of a number content elements (fields) and you access those by name:

1
ContentElement e1 = contentObj.get("UCAS Code")

I therefore developed a framework that would allow a developer to map a content element in SM to a field in a Java Object via a custom annotation:

1
2
@ContentField("UCAS Code")
private String ucasCode;

The framework happily creates new content and finding and updating existing content. Supporting a new SM content element means adding a new field in the Java object and annotating it with the name of the element (like the example above). You then need to update the JSP page from the view layer so that the form displays the content (with the help of some custom tag libraries). The abstraction mainly works, albeit does leak is some areas that need further attention. I’ll put flesh on the details in future posts.

Looking to the Past

In my spare time I’ve started doing some historical research again after a (very) long sabbatical. This is possibly a mid-life crisis activity, but it is an enjoyable and intellectually stimulating one :). This has involved reading monographs and papers (on the daily commute), becoming a member of the Royal Historical Society and discovering some wonderful online resources such as Anglo-American Legal Tradition (AALT). I also attended the one-day ‘Wales and the World’ conference sponsored by The British Scholar Society and a couple of seminars organised by UWE’s Regional History Centre.

I’ve also managed to spent some time in the archives (thanks to weekend and evening opening), including visiting the Bristol Record Office and The National Archives. While going through documents I have been re-familiarising myself with sixteenth century palaeography and re-learning Latin. I had a vague idea about looking at the merchant community of sixteenth century Bristol and, while doing this, have gravitated to the Thorne family, especially Robert and Nicholas Thorne who founded Bristol Grammar School in 1532. There has been some research published (and unpublished) on members of the Thorne family, but there is room for additional work.

I’m also interested to see how the day job (software development) can facilitate historical research and dissemination. The plan is to write some posts about my growing interests.

Prospective Editing Tool (PET) Is Live

The Prospective Editing Tool (PET) went live in mid-June (just before I took four weeks annual leave!), with support for managing the details of undergraduate programmes. The next step is to support the postgraduate programmes and fix any issues that have arisen since the software has gone live. It also provides an opportunity to re-factor the code.

I was hoping to have written some posts on using the T4 API, but haven’t manage it. I’ll rectify that very soon!

Using Maven Overlays With SiteManager

At work we use Apache Maven to manage the builds and dependencies of our Java-based projects. I’m looking at using Maven Overlays so we can hold some of our SiteManager CMS development (pieces of functionality to extend that CMS, such as custom navigation objects) and have it easily incorporated into the SiteManager WAR file that is deployed to our test and production servers. Basically, a Maven Overlay merges the contents of a project with a WAR file and then create a new WAR file of the merged content. Coupled with a suitable tagging and branching policy in Git and the use of Maven profiles, we should be able to manage development and deployments to different environments. Another benefit of this approach is that I can run an instance of SiteManager on my local development machine from the command line.

We have started using Sonatype Nexus OSS internally to mirror the central maven repositories and provide a place to hold third party JAR files that aren’t available via public servers. The default Nexus installation provides an anonymous user that can access all of the mirrored and local repositories. Our Nexus installation is IP restricted but that is still too public to store commercially licensed artefacts. I created a restricted repository and a new anonymous user that only had access to specified repositories, i.e. not the restricted repository which would need full authentication to access. With the restricted repository in place, I could upload the SiteManager artefacts needed for development.

To obtain the artefacts you need to get a copy of the SiteManager WAR file from the TerminalFour extranet. Make a copy of the WAR file and unpack it to find the SiteManager.jar and Acme.jar files in the WEB-INF/lib directory. You can then upload the WAR file and two jars with appropriate group, artefact and version numbers. If you don’t have a nexus installation you can install the files to the maven repository on your local machine:

1
2
3
4
5
6
7
8
mvn install:install-file -Dfile=SiteManager.war -DgroupId=com.terminalfour \
    -DartifactId=SiteManager -Dversion=7.2.0003 -Dpackaging=war

mvn install:install-file -Dfile=SiteManager.war -DgroupId=com.terminalfour \
  -DartifactId=SiteManager -Dversion=7.2.0003 -Dpackaging=jar

mvn install:install-file -Dfile=SiteManager.war -DgroupId=com.terminalfour \
  -DartifactId=Acme -Dversion=7.2.0003 -Dpackaging=jar

With the artefacts in place you can add the dependencies to your maven project pom.xml file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<dependencies>
    <dependency>
        <groupId>com.terminal4</groupId>
        <artifactId>SiteManager</artifactId>
        <version>7.2.0003</version>
        <type>war</type>
        <classifier>SiteManager</classifier>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>com.terminal4</groupId>
        <artifactId>SiteManager</artifactId>
        <version>7.2.0003</version>
        <type>jar</type>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.terminal4</groupId>
        <artifactId>Acme</artifactId>
        <version>7.2.0003</version>
        <type>jar</type>
        <scope>provided</scope>
    </dependency>
</dependencies>

The scope is naturally set to provided for the JAR files because we only want them available for local development, since they will be provided at runtime in the WAR file. If you are using a Nexus repository to store the SiteManager artefacts you need to tell maven where to find it:

1
2
3
4
5
6
7
<repositories>
    <repository>
        <id>restricted</id>
        <name>Restricted Nexus Repository</name>
        <url>https://example/content/repositories/restricted/</url>
    </repository>
</repositories>

If the repository needs authentication then you will need to configure your ~/.m2/settings-security.xml and ~/.m2/settings.xml files with the encrypted authentication details.

To manage the different deployment environments (local development, test, production etc.) we use profiles to manage resources that are needed for each of these environments. For example, I have a local instance of MySQL for development but we use another vendor on test and production systems.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<profiles>
    <profile>
        <id>local-dev</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <build>
            <resources>
                <resource>
                    <directory>src/main/resources</directory>
                    <excludes>
                        <exclude>local-dev/META-INF/*</exclude>
                    </excludes>
                </resource>
            </resources>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>tomcat-maven-plugin</artifactId>
                    <version>1.1</version>
                    <configuration>
                        <contextFile>
                            ${project.basedir}/src/main/resources/local-dev/META-INF/context.xml
                        </contextFile>
                        <path>/terminalfour</path>
                    </configuration>
                </plugin>
            </plugins>
        </build>
        <dependencies>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.21</version>
            </dependency>
        </dependencies>
    </profile>
</profiles>

The local-dev profile (which is active by default) adds a context.xml that refers to a local MySQL database and makes sure the WAR file has the MySQL JDBC driver. It also sets the deployed context to /terminalfour.

Finally, we need to add the war plugin to the build element of the pom.xml file for the Overlay to work:

1
2
3
4
5
6
7
8
9
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.2</version>
        </plugin>
    </plugins>
</build>

So, if we run the following command …

1
mvn tomcat:run-war

… the embedded tomcat server will startup and SiteManager will be available at http://localhost:8080/terminalfour :-D.

Working With TerminalFour SiteManager

The University of Bristol has recently bought a license for TerminalFour’s CMS product called SiteManager. SiteManager is used in a number of HE institutions and we will be using it to replace our current Plone implementation. I’m working on a project that is focussing on making sure our SiteManager implementation can support the production of the undergraduate and postgraduate prospectuses (online and print).

The SiteManager product is a Java web application that sits upon a relational database and a filesystem. Terminal four provide an API for extending the functionality of the product. Documentation for the API is just a JavaDoc, but I did attend some excellent training by Paul Kelly, Terminal Four’s Software Architect, a few months ago.

I’ve decided to blog about how we are using the API in case other people find it useful. Since it is a commercial project I was worried that TerminalFour might object to code snippets of their API appearing on a public blog, but I contacted them and they are happy for me to go ahead.

Exploring the Internet of Things: Creativity and Learning

Last Thursday (6th September, 2012) I was lucky enough to attend the first of three workshops on Exploring the Internet of Things: Creativity and Learning. The event was organised by Sarah Eagle and the first workshop was facilitated by Karen Abadie, Steve Bullock, Peter Bennett with support from from members of Bristol Hackspace.

The purpose of the workshops are “to explore the relationships between creativity, informality, and future forms and uses of hardware and software …” with a mix of practical and abstract/theoretical sessions. The first workshop was a hands-on session where we got to play and explore the Arduino. A number of exercises were provided to give a taste of what is possible with the Arduino. I teamed up with Emma Weitkamp from UWE and we eventually created the (rather silly) Cake O’Meter:

Our neighbours created the amazing DJ Shadow and other participants created equally interesting items.

The day ended with some discussion about the types of teaching and learning and issues around privacy and security when things are connected to the internet.

I’ve dusted of the Arduino I bought a couple of years ago and have started experimenting with it again. I’m also looking forward to the next workshop.

Bibliographic Management

Earlier in the week I attended the Mobile technologies in libraries: information sharing event in Birmingham. It was an interesting event and I spoke to a few librarians and information specialists. A Lanyrd page has a full list of details and materials.

I ran a breakout session on ‘Bibliographic management on mobile devices’ which covered the m-biblio project. It was a small group but they were interested in the project and the issues surrounding using mobile devices for managing bibliographic references.

I’ve put slides on Slideshare:

Dev8D, 2012

Last week (14 - 16 February, 2012) I attended the Dev8D developer conference with Damian Steer. The conference is primarily aimed at developers working in Higher Education, but also attracts developers from other sectors and some indies as well. Calling it a conference doesn’t really do it justice, since there is a mix of invited speakers, delegates offering talks, workshops and tutorials. The event is free for the attendee and is funded by JISC and other sponsors. The Professional Development Group of IT Services at the University of Bristol were kind enough to fund my travel, accommodation and subsistence.

This year the format changed slightly with less lightning talks and the ability for people to offer sessions on whiteboards. In the afternoon, those sessions that attracted the most interest went ahead - you put a mark next to a session you were interested in with a marker pen. As you would expect, the quality of the sessions varied but the net gain of learning new technologies and talking to other developers outweighed any minus points. In fact, Dev8D promotes voting with your feet - if a session isn’t what you expect or too easy, leave and find another session.

On the first day I attended Alex Bilbie’s (@alexbilbie) session on HTML5. I’ve already used some HTML5 with m.bristol.ac.uk but it was good to see an overview of the various changes to HTML5, the tags available and examples of where to use them.

I also attended the Pearson Education session on their Developer API, which includes access to FT Press, DK Eyewitness Travel Guides and Longman Dictionary. The API travel guide looks particularly interesting if you wanted data from one of the cities they cover. The dictionary also includes multimedia content for certain words, so could be used in Flash card type applications for kids. I think Pearson are still working on the pricing framework since the API call limit doesn’t seem high for some APIs like the dictionary and would become expensive quickly.

On the first day I also attended the Jorum session. I wanted to learn a little more about learning repositories. Mimas are working on proving a RESTful API over Jorum which uses DSpace. The Jorum team have a challenge to create “applications that demonstrate useful, innovative, original use the Jorum DSpace Read API for the benefit of HE and FE”. I was initially interested in this, but it looks like the team have a lot of work to make the API scalable since a call can return more information than you need. For example, I sent a query for information on a community - it returned ~65,000 lines of JSON. This was for too much data for my poor brain to parse and work out what would be relevant for further API requests.

The end of the first day was marred by breaking my glasses and I missed the morning of the second day due to being at an opticians getting a new pair.

Mike broke his glasses ... idiot

When I got back to the event I attended a session on The JLern Experiment and related programming challenge. This is around a JISC Learning Registry Node which is attempting to create a community of creators, publishers, curators and consumers. I need to read more information about The Learning Registry project and the idea of capturing ‘paradata’ around a learning resource. In this sense, ‘paradata’ refers to activity data around an item, such as feedback, rankings and usage data.

I was interested in the Introductory and Advanced session on CoffeeScript by Jack Franklin. The few slides and then a programming challenge certainly made me concentrate :-). I never enjoy writing JavaScript and I thought CoffeeScript might be a useful approach. CoffeeScript is a language that compiles to JavaScript and has removed braces and semicolons and indentations are important. So, the following JavaScript …

1
2
3
square = function(x) {
  return x * x;
};

… can be written like this in CoffeeScript:

1
square = (x) -> x * x

It seems fairly clean although verbosity in languages doesn’t usually bother me - I like Java and Objective C :-). I’m going to spend sometime learning CoffeeScript over the next few weeks and have bought Trevor Burnham’s CoffeeScript: Accelerated JavaScript Development. If I become confident in using the language I’ll offer to talk about it for one of our internal tech talks.

On the second day I also went to a really informative session by Owen Stephens and Thomas Meehan on library data. I’ve started accessing library data for the m-biblio and they provided a really useful session on MARC and why library catalogues provide the information in a certain format. The session was a rich mine of information on systems, tools and formats.

The third day was busy attending sessions, looking in the project zone and catching up with some developers who hadn’t been able to attend the earlier days of the event. I attended a session on ePub but the exercises including creating a basic epub book by hand but that involved copying XML off a number of powerpoint slides. It was interesting to see what constitutes the epub format but you’d definitely create one with tools such as KindleGen 2 or iBooks Author. Damian and I also managed to have a whirlwind visit to the British Library to see a number of exhibits, including ‘Manga: Professor Munakata’s British Museum adventure’.

One exciting development of the three days was finding out that Wilbert Kraan (@wilm) of Cetis uses Glint, the SPARQL client application that I wrote for OS X. I really need to find some time to fix some bugs and develop the application further!

I would highly recommend Dev8D to other developers in the HEI community. There are many interesting talks and sessions and, with several parallel tracks, the hardest thing is deciding what to attend.

Exhibit at the British Museum, with pointless photoshop filter added