Presentation given at the T44U 2013 conference. The presentation covers the work at the University of Bristol on the Prospectus Editing Tool (PET) and the experiences of using the T4 API.
1. Prospectus Editing Tool (PET)
Mike Jones (mike.a.jones@bristol.ac.uk)
IT Services R&D / ILRT
Using emerging learning and research technologies to enable excellence
2. Overview
• The drivers and opportunities of the Prospectus project
• The rationale for developing PET
• How we use the TERMINALFOUR Site Manager API in
PET
• The pros and cons of our approach
• Experiences of using the TERMINALFOUR Site Manager
API
IT Services R&D / ILRT
3. What is PET?
A workflow-driven web application for collating, editing and
approving content for the undergraduate and postgraduate
prospectuses.
IT Services R&D / ILRT
6. … all stored in Site Manager
IT Services R&D / ILRT
7. We needed to replace old software
http://www.flickr.com/photos/bogdansuditu/2377842887
IT Services R&D / ILRT
8. Opportunity to review processes
http://www.flickr.com/photos/videolux/2389320345/
IT Services R&D / ILRT
9. Why develop PET?
• Reluctance to train ~100 academics and faculty staff in
using Site Manager for just prospectus content
• Needed to control access to content via roles
(Editor, Faculty Reviewer, Print Reviewer and Prospectus
Administrator) that didn‟t fit with Site Manager roles
• Wanted a robust standards-based workflow engine
• A request for „simplified editing screens‟
IT Services R&D / ILRT
11. Core Technology for PET
• Spring Framework (http://spring.io)
• Spring MVC
• Spring Security
• Activiti BPM Platform (http://www.activiti.org)
• MyBatis (http://github.com/mybatis)
• Ehcache (http://ehcache.org)
• TERMINALFOUR Site Manager API
IT Services R&D / ILRT
12. Content is abstracted to Domain Objects
• Web application passes around domain model
objects that represent people, programmes,
faculties, subjects etc
• For Site Manager content an object is made of a
Section + Metadata + Content
• Implemented mappings from variables in the Java
objects to Site Manager content via custom
annotations
• Support a subset of types – plain text, numbers, list
(not sub-lists), content links …
IT Services R&D / ILRT
14. Support for the web view
• Validators check with
the CMS for mandatory
fields
• Get list values
• Show field names and
descriptions (can be
overridden)
IT Services R&D / ILRT
15. Workflow
• Activiti BPM Platform
• Support BMN 2.0
• Design the workflow
with an Eclipse plugin
• Java and a REST API
• Supports different tasks –
Email, Script, Business
Rule etc
IT Services R&D / ILRT
16. Progress
• Still a work in progress
• Currently being used by Undergraduate Recruitment
• Soon to be released to Postgraduate Recruitment
• Undergraduate prospectus will be published in February
2014 (I still need to write some Custom Brokers)
• Positive feedback from academics. Student Recruitment
positive but have lots of suggestions for improvement.
IT Services R&D / ILRT
17. Pros and cons of our approach
• Flexible system that can adapt to the needs of Student
Recruitment
• Benefit from the advantages of Site Manager while
providing an easy-to-use interface for the academics
• Powerful workflow that can be adapted to changing
business processes
• BUT … the heavy use of the Site Manager API means we
cannot update our CMS until PET is fully tested against
new versions of Site Manager
IT Services R&D / ILRT
18. Experiences of using the Site Manager
API
• We have used the API for:
• The development of PET
• The migration of Plone content to Site Manager
• Populating users and groups in Site Manager from
LDAP
It is very powerful!
IT Services R&D / ILRT
20. Should you avoid parts of the API?
http://www.flickr.com/photos/robwatling/5059689668/
IT Services R&D / ILRT
21. Pass a Connection or a Statement?
• Initially surprised that you deal with JDBC objects directly
but we embraced it
• Decided to pass in a Statement rather than a Connection
so we can ensure the Statement was closed
• You can‟t always pass in a Statement; some API calls
query the database but don‟t even require a Connection
...
• … which ties you to the SM Connection pool
implementation
IT Services R&D / ILRT
22. Bits and bobs
• More examples needed
• No notes on API changes in the release notes
• Not trivial to setup a development environment – I use
maven overlays to make my life easier
• Support for transactions?
• Cache – not able to notify the Site Manager cache that a
remote application has added or modified content.
• No support for repository standards – JSR-170 / JSR-283
or CMIS
IT Services R&D / ILRT
Give an overview of the PET application. Academics just see content released to them by Student Recruitment at appropriate times in the edit approval phases. An automatic workflow helps to manage the process to publication.
University bought T4 to replace its heavily customized Plone 2 installation.Also, slowly replacing our Zope applications – Online Prospectus is a Zope application.Data is stored in an old Oracle database that uses an Access front-end; this has evolved and is difficult to maintain. Purchase of the TERMINALFOUR CMS for the institutional website provided an opportunity to review our approach.
Provided an opportunity for business analysts to review the business process around the publication of prospectus information.Current process includes circulating Word documents to schools and faculties. Content is copied to InDesign. PDFs circulated for proof reading. Updates to the website from looking a track changes in Word, emails, scribbled notes on paper and phone calls.The workflow is managed manually in a spreadsheet.We can do better!
Describe the architecture:Use the CMS to store versions of content and publish the website,An automatic workflow to help manage the process – automatic emails that release content for editing or approval.Data warehouse with data on KIS, accredited bodiesIn the future more data will be pulled from systems rather than stored in the CMS.
Spring – dependency injection framework, web application API and security (authentication and authorization)Activiti – workflow engineMyBatis – mapping for relational databases (not the SITEMANAGER database)Ehcache – cache objectsSITEMANAGER API – access to user account, content etc
Wanted to abstract from the underlying implementation – insurance if we needed/wanted to use a different content store in the future. We use custom annotations to map java objects and variables to content in the CMS. Abstraction is a little leaky!
Examples of the annotations. Capture key pieces of SITEMANAGER content that we need to hold in the model. Handle creation and modification of content
Need to query the CMS to help with things like populating lists and validating input.
We used the Activiti workflow. An eclipse plugin allows you to design the workflow. We use the Java API but another project in Bristol is using the REST API. Allows the full automation of the workflow with support for different task types.
Myself and Damian Steer have used the API
Developer training was good, but documentation on how to use the API is thin. Until recently there was just the JavaDoc. The JavaDoc is usually behind the latest release. Current JavaDoc is 7.3.0001 but the product is on 7.4. Basic examples would be nice. Often using grep on JavaDoc. You can’t find categories in the JavaDoc – turns out they are a type of section.
Not clearly defined which parts of the API are available. What is stable? I would expect stability and the same behaviour even if the underlying implementation is altered.
Which of the many flags should you set. Some API calls seem to do nothing!