A summary of recent times…
Magnolia CMS development
I’ve been working on migrating news content from a PostgreSQL database into Magnolia CMS, which on a technological level involves reading records from the database and programmatically creating the pages in Magnolia. In reality it’s far more involved than this. The nodes created in the JCR store have to match the structure expected by Magnolia, particularly as the project is using the STK – this provides a set of page types and components that should be used. Thankfully Magnolia makes it easy to do this with it’s ‘export as XML’ feature.
The hard part of this project has been identifying which online samples and examples are for version 4.4 or earliest, and which are for version 4.5. The differences are quite significant, but my past experiences with JCR have shown the way. As a broad generalisation if you can do it with JCR, you should. The current version is a stepping stone to version 5, so using the JCR2 API should be future-proof; using the now deprecated 4.4 code style is a bad idea.
It’s been a lot of fun working out the Maven dependencies to make the project work exactly how I thing it should, and only include the modules that are relevant to the end result. In just six weeks, there’s now a comprehensive platform to build on, with a custom theme, customisations to the STK, new dialog designs, and lots of additions to the data modules that are installable as modules. It’s impressive, and it really highlights how good Magnolia is from a developers point-of-view.
Hippo CMS work
I’ve been busy working on a side-project using Hippo CMS 7.7. I wanted to build a document-centric site, based on articles and news for my own use. Hippo is perfect for this. I can define a document type by defining fields in a web interface, add a whole bunch of items, and write and edit to my hearts content. It’s an authors dream for publishing on the web. Unlike most CMS, this really is managed content. These are not pages, but true content with a structured type. The page navigation and URL schema are defined according to the channel they are presented in – be it desktop, mobile, or something else entirely.
From a developers point of view, this is a great system too. Models are in Java classes, and the default in the current version when created from the Maven archetype is to synchronise the changes in the JCR with the code on the file system. Thus, changes made in the CMS are automatically reflected in the XML files in the project. The documentation is pretty clear on the subject, and discusses the DTAP model well. In particular it explains what a developer should change, and what they should apply delta changes to – this is important to avoid obliterating settings made in the live environment. Overall, Hippo is a great product, let down only by some odd author UI choices and a lack of workflow on media items (they seem to automatically publish unlike the documents).
Exploration of Git
I’ve been looking for alternatives to SVN. Subversion has some serious deficiencies when it comes to branching and merging, not to mention working on the same code branch with it’s poor conflict resolution.
I’ve found that the command line version makes sense and provides lots of help. GitHub for Windows and GitHub for Mac clients are very good. Commendations go to SourceTree on the Mac, Git-Cola on Linux, and not much else on Windows as yet – there has to be a highly polished client with a great UI for the worlds most popular desktop operating system but I’ve yet to find it. Tower Git on the Mac looks amazing. It looks like I’ll have to make do with GitExtensions on Windows for the time being.
The big advantage of Git is that it’s possible to have a local repository as a working copy, and multiple remotes, and multiple branches. As a freelancer, this means I can have a working copy on my laptop, another on my desktop machine, my primary master on a server at home, and I can take the laptop to the client and push the changes into their repository. It all works so well.
Creating a .net project to MIGRATE CQ4 ContentBus into a database
This is basically file hacking, but not for the feint of heart. It’s a great chance to use the knowledge I gained five years ago about the internal structure of the Day Communiqué CQ3 and CQ4 ContentBus storage. I chose to do it in .net for a few reasons – the main reason was that the client has .net developers. C# is very good at the tasks that this project needed, namely access to the file system, string manipulation and database access.
Porting the .net application to Java
Finding out that the content to import will not extract onto an NTFS file system was a blow, so now the application is being ported to Java. I’ve chosen to enable this by creating a very small emulation layer that allows most of the code to stay the same. The only place I really need to make big changes was to the associative arrays used by the SQL client libraries – Java has no associative array concept.
Learning some basic blues chops on the guitar
We went to see Hugh Laurie at the Hammersmith Apollo, and we’re great fans of his album. I’m partial to a bit of blues, and in a recent exercise in tidying up I found a copy of ‘Beginning Fingerstyle Blues Guitar’ by Arnie Berle and Mark Galbo. I’d long forgotten about it, and having worked through the first 30 or so page I have to say that it is really rather excellent.