I received a copy of the new OpenCms book a few weeks ago and since I have not looked very thoroughly into the main features of version 7, I decided to use the book to bring me up to date.
In my opinion a review is much more useful if you know at least a little bit about the person who has written it.
I'm a Java web developer and have worked with the OpenCms content management system for about 4 years, since version 5. I've written several modules and extensions. I already had working experience with almost all of the features/ topics covered in this book before reading it. I'm also a bit biased because I met Dan (the author) at the OpenCms Days 2008 in Cologne and found him an extremely nice person. But of course I am trying to be fair and impartial in this review.
The book is targeted at Java developers who already have operational experience with OpenCms. You should also have some experience with Java web development and have written some Servlets/JSP files.
The book takes you on a tour through the development of a small OpenCms blog site. It uses this example to give you an overview of the most important OpenCms features and APIs from a developer’s point of view. The book is structured in 10 chapters which, although they can be read out of order, are really designed to support sequential reading.
The first chapter starts with a broad overview of the OpenCms architecture and lists some common development tasks when creating OpenCms websites/applications in conjunction with the required skill sets.
In chapter two the author presents a recommended development environment (based on Eclipse) and explains how common goals (building the core, debugging classes and JSPs, synchronizing local files into the CMS) can be achieved.
Chapter three starts with the real development. The author explains how to extend OpenCms, what modules are, how to create them and provides some tips on how to structure them by types. Then topics like creating custom content types, managing content relations, listening to OpenCms events and creating structured content based on XML schema (XSD) are explained.
The fourth chapter focuses on how to create templates and deliver content to the surfer. It explains advanced topics like resource loaders, creating custom Java classes to support the template and using the most important tags from the OpenCms Taglibrary. Also tasks like using WebDAV, JSTL and providing the direct editing feature (using a custom direct editing provider) are explained. After working through this chapter you've finished half of the book and should already have a good overview of the most common OpenCms development tasks.
Chapter five introduces the OpenCms search functionality based on Lucene. Some common terms are defined and the architecture of Lucene is explained to the reader in broad strokes. The chapter explains as much of Lucene as is needed to understand the following sections (for a good book on Lucene I recommend „Lucene in Action“). After presenting the basics, the chapter goes on to explain the search administration and how to use the OpenCms API to query the search index and display the results. It also shows how to use a custom search class to encapsulate individual search requirements (like the searched document fields, i.e. title, content, etc.).
In chapter seven user registration and commenting functionality are added to the site. Here the OpenCms security model is explained and methods on how to manage and login users programmatically are provided. Besides, the topic of editing content and publishing it via Java are discussed.
The last three chapters contain information on how to extend OpenCms.
The eighth chapter focuses on creation and integration of custom widgets for the structured content editor and the administration view. It explains how widgets work and then goes on to present a design for a drop down widget featuring pluggable data sources.
Chapter nine explains how to create an extension which allows OpenCms to display RSS feeds of various formats (utilizing the ROME library). It proceeds from the design phase up to the integration of the extension in the blog site. It also gives some hints on how to build such an extension and illustrates the creation of a custom Java class which eases programmatic access to structured content XML files.
The last chapter explores the creation of an OpenCms administration point. It explains the use of the administration dialog framework and programmatic usage of the widgets. The administration point developed can be used to manage the RSS feeds created by the extension of chapter nine.
To make a long story short: I think the book is really good and achieves its goal to teach the reader the basics and the most generally useful advanced features of OpenCms. If you have to work with OpenCms professionally (and are not a guru) you should get a copy of this book.
I didn't expect to learn very much by reading the book (see „About me“) but since I haven't worked so much with the Version 7 of OpenCms and the author provides some interesting titbits and good ideas I nevertheless found it useful (although I skipped some paragraphs).
An OpenCms beginner will certainly get kick started into OpenCms development and learn many things that would otherwise be very painful to find out (I'm speaking out of experience with this point ;)). A seasoned developer will most likely learn something new and get some ideas which can be useful in his daily work. The book can also serve as a reference point for some hard to remember things (especially regarding the administration points).