19 February 2013

Hippo Fridays @ Hippo

At Hippo we have a concept we call 'Hippo Fridays'. Hippo Fridays are monthly Fridays on which all Hippo developers can share knowledge, try out new things, work on improvements or hack on their own pet project. We've been having Hippo Fridays for more then a year and even if it's only one day a month, they are always great fun!

The other day while leaving the office I overheard one of my colleagues ask what the actual outcome is of these Hippo Fridays. Does something end up in the product? Well let me share what has come out of the more recent Hippo Fridays and will end up in the upcoming Hippo CMS 7.8 release.


HTML5 History API in the CMS and Console

With the upcoming Hippo CMS 7.8 release both CMS and Console will make use of the HTML5 history API. This might sounds a bit vague and technical, but it means that the CMS and Console will store the URLs to the documents that you visited in your browsers history. By doing that it will allow you to reach them by using your browsers history or by using a direct URL in the browsers address bar. See the address bar in the picture below.

Multiple Console improvements

The more experienced Hippo users will probably notice some new options in the Console menu bar.
The Console UI was improved with some new features to benefit the user experience:
  • deletion of multiple nodes
  • keyboard shortcuts
  • open a node by path or UUID
  • use the arrow keys to navigate the tree  
The next image shows you all the keyboard-shortcuts that are available in the Console.


Scripting support

With the upcoming 7.8 release we will also have scripting support straight from the CMS UI. This feature will be for 'admin' users only. Scripting support is focused on supporting JCR runner / visitors from the CMS UI and helps you do bulk updates of document or just plain JCR nodes. The scripting support in CMS 7.8 was inspired by the introduction of the Hippo CMS Groovy add-on, which started out as a prototype on a Hippo Friday.

 

SNEAK PREVIEW: Settings management

This next feature is one of my own pet projects. Those of you who are experienced with Hippo CMS know that Hippo CMS is very flexible and you can configure all most everything. However most of the configuration options are done through the CMS Console.

With the settings management add-on there will be a new user friendly interface and you might even discover some options you never knew existed. Since this is still under heavy development it will not end up in the CMS 7.8 release, but I will keep you posted when a first release is made, so you can try it out.



As you can see: What happens on Hippo Fridays does not stay on Hippo Fridays!

22 January 2013

Get involved with the Hippo CMS Community!

Hippo CMS has a rapid growing community, so we want to see our community well organized and connected. With this post I would like to remind you about the available channels to communicate with each other (and the Hippo team) to get information, resolve problems and share experiences.

Twitter

I guess the most popular channel is Twitter. You can read up on all the latest news regarding Hippo CMS while following the @onehippo account. We use this for official announcements, news about Hippo as a company and many other things. For feedback, plugin announcements and other interesting Hippo news please make use of the  #hippocms hash tag or mention @onehippo in your tweet and we will retweet your post to the rest of the community.

Facebook

The Hippo CMS Facebook page contains a lot of community driven content. It's main use is for building up the Hippo timeline and fun (like all the submissions for the Hippo's in the wild competition). Even though the competition ended at the end of 2012 don't hesitate to send us your photos of the lovely orange Hippo giveaways.

Google Plus

Since last month there is also a Hippo CMS Community on Google Plus. This is mainly a communication channel for spreading news, information about Hippo and for bringing together all the Hippo users that use Google Plus as their 'social network'.

LinkedIn

The Hippo CMS user group on LinkedIn with over 241 members is probably the most concentrated group of Hippo minded people out there. The group on LinkedIn is used for different purposes like, discussions, jobs, etc. If you're not yet connected to the user group please do!

Hippo Community Forum

Currently the best resource for getting (technical) feedback or asking questions is probably the Hippo Community Forum. You can register to this forum in two ways:
  1. Register via Nabble to the forum 
  2. Register to the Hippo CMS 7 user mailinglist
Both of the above are synchronized with each other, so if you post a message on the mailing list it will also end up on the forum and vice versa.

Stack Overflow

Stack Overflow is becoming the site to find all your development answers these days. If you want to ask questions on Stack Overflow about Hippo CMS, be sure to ask the question with the tag 'hippocms'. By doing so you can get answers by other Stack Overflow users and members of the Hippo team. 

IRC

A community initiative recently started (thanks to Yassine Elassad) to also have a self-help IRC channel available on freenode. The channel can be found at:

irc://chat.freenode.net#hippo-cms

You can find community members and some Hippo developers being present in this channel.

The Hippo blog

Our official Hippo CMS blog is the main place where we post about Hippo CMS and Content management in general. You will be able to get a heads up on insights, upcoming releases and tips & tricks.

If you reached all the way the the end of this post you will see that Hippo is present on different channels. We hope to see and meet you in any or all of them. Let's stay connected! 

03 December 2012

dotJS: a 'not' so JS conference?

Last Friday I traveled to the wonderful city of Paris together with some Hippo colleagues for the dotJS conference. It was going to be my first tech conference in France and I was really excited. dotJS is a new conference and promoted itself as: "The largest JavaScript conference in France", which raised my expectations. The list of speakers looked promising with for instance Jeremy Ashkenas (creator of Backbone.js) and Jacob Thornton (one of the creators of Twitters Bootstrap). It was a two day conference of which I only attended the first day (second day were workshops). The rest of this post will be about how I experienced the conference.

The venue

dotJS was held in the beautiful Théâtre des Variétés in the hart of Paris. The venue really looked amazing and the conference covered all floors and rooms of the building. With a sharp looking screen it was really easy to read any code that presented itself on-screen. The seats however were quite small for people like me (or people above 1.70m in general). For those of you that ever flew with EasyJet it was sort of a similar experience. The conference attracted about 500-600 people and the room was packed.

Conference view from above
Photo taken by @mauriz http://svay.com/photos/2012-11-30_dotjs/


The lunch in the middle of the day was good and there was some real tasty quality food, but making fresh food with about 250-300 people waiting can become quite a logistical problem. Even though the total amount of attendees were divided in groups the lines were long and everybody had to be in the same room to be able to get some food. I liked the freshly cooked food, but I guess this could be a bit improved with prepackaged lunch boxes or serving food in multiple rooms.

Talks and speakers

These days Javascript is not only used on the client/browser, but also on the server side with for instance Node.js. Therefor the list of speakers was a mix of both and in my opinion contained a lot of knowledgeable individuals. To name a few:
In total there were about eleven talks, so the day was packed. All speakers had about 20 minutes to talk about their topic which was a nice pace. It helped to stay focused on the talks at hand.
There were even some lightning talks at the end of the day, which added a nice change to the conference. The overall quality of the talks and speakers was good and I really enjoyed some of them. However for a Javascript conference there were only just 3 or 4 talks that actually went into technical details and unfortunately most topics were more pointed towards general topics like open source and communities. I thought that was a shame, since there was so much knowledge on stage. The highlights for me were: Jeremy Ashkenas ("Symbiotic languages") , Brian Leroux ("How the Javascript language can lead to unexpected results") and Jacob Thornton ("The history of Open Source").

Summary


The conference was nice and had attracted quality speakers. Sylvain Zimmer and Thomas Bassetto did a really good job in making dotJS happen. Unfortunately the conference had just a couple of in-depth Javascript talks and therefor did not really meet my expectations. Even though there was no real schedule up front my advice to the organizers would be to make a good balance between general talks and in-depth talks next year. I personally would have expected a lot more in depth Javascript talk at at Javascript conference.

13 November 2012

Hippo CMS, Servlet 3 and WebJars

Besides my work at Hippo I'm quite a fan of Play framework. My first introduction to Play framework was back in 2011 just around the time I was about to attend Devoxx. Because of this I attended a talk at Devoxx by James Ward about Deploying Java & Play Framework Apps to the Cloud. I've been following James on Twitter since that day because he was playing around with quite some interesting technologies. Recently I noticed James introduced an interesting project called WebJars.

What are WebJars?

In most Java projects a dependency management system is used like Maven, Ivy or Gradle. Having  dependency management setup for server-side dependencies is quite natural, but what about client-side dependencies? This is where WebJars can help out.

WebJars are client-side web libraries packaged into JAR files. This is very useful for maintaining a web application. By using dependency management also for client-side libraries helps you find out easily which version of a dependency is being used in a project. This can be really helpful since not all web libraries have versions in their file names.

Another advantage of using dependency management is that you will get transitive dependencies for free. For instance if you want to use Twitter Bootstrap 2.2.1 as a WebJar you will also get jQuery 1.8.2. That's really helpful!

So let's see what we need to do if we want to use WebJars in for instance a Hippo CMS project.

Getting started with  Hippo CMS and WebJars.

Let's first generate a new Hippo project. The following maven command will generate a Hippo CMS 7.7.6 project from the Hippo Archetype.

mvn archetype:generate \
-DarchetypeRepository=http://maven.onehippo.com/maven2 \
-DarchetypeGroupId=org.onehippo.cms7 \
-DarchetypeArtifactId=hippo-archetype-website \
-DarchetypeVersion=1.05.08


Once this is finished you should have a project that looks similar to this:

drwxr-xr-x 11 jreijn staff 374 9 nov 13:47 .
drwxr-xr-x 46 jreijn staff 1564 9 nov 11:30 ..
drwxr-xr-x 16 jreijn staff 544 9 nov 13:42 .idea
-rw-r--r-- 1 jreijn staff 1677 9 nov 11:30 README.txt
drwxr-xr-x 6 jreijn staff 204 9 nov 13:47 cms
drwxr-xr-x 6 jreijn staff 204 9 nov 11:30 conf
drwxr-xr-x 5 jreijn staff 170 9 nov 13:47 content
-rw-r--r-- 1 jreijn staff 9006 9 nov 11:57 pom.xml
drwxr-xr-x 5 jreijn staff 170 9 nov 13:47 site
drwxr-xr-x 3 jreijn staff 102 9 nov 11:30 src
-rw-r--r-- 1 jreijn staff 2819 9 nov 11:35 webjars.iml


Before we proceed there is one little catch. To be able to use WebJars within a Hippo project we need to run on a Servlet 3 container. By default the Hippo archetype packages Apache Tomcat 6, but Tomcat 6 supports Servlet 2.5 and not Servlet 3. Tomcat 7 however  does support Servlet 3, so with some minimal changes we can run our Hippo project with Tomcat 7 for our local development environment.

The reason why we need a Servlet 3 container is that with any Servlet 3 compatible container anything in a META-INF/resources directory in a JAR file located in the WEB-INF/lib directory is automatically exposed as a static resource.

The Hippo archetype runs with the maven cargo plugin. By default the cargo configuration is handled by the parent pom, which is out of the projects code, but it's easy to change this by just adding some additional properties in the <properties> section of our projects pom.xml file.

<properties>
  <cargo.tomcat.major.version>7</cargo.tomcat.major.version> 
  <cargo.tomcat.full.version>7.0.32</cargo.tomcat.full.version>
</properties>

Now to be able to use for instance the Twitter Bootstrap WebJar all we need to do is add the following dependency to our site/pom.xml file within the dependencies section. 

<dependency>
  <groupId>org.webjars</groupId>
  <artifactId>bootstrap</artifactId>
  <version>2.2.1</version>
</dependency>

As I've mentioned before jQuery will also be fetched since it's a transitive dependency of Bootstrap.
Now if we want to use it all we need to do is change for instance the webpage.jsp that gets bundled with the default archetype. So all we need to do is insert the following snippet:

<hst:link var="bootstrapCssLink" path="/webjars/bootstrap/2.2.1/css/bootstrap.min.css"/>
<link rel="stylesheet" href="${bootstrapCssLink}" type="text/css"/>

And that's it. Now let's package our project and start the Hippo CMS instance:

$ mvn clean package && mvn -Pcargo.run


Now all we need to do is open up a browser and point it to the website: http://localhost:8080/site/ and you should see the Bootstrap CSS theme kicking in.

Of course Bootstrap and jQuery are not the only available frameworks. The WebJars website already counts about 40 different WebJars. For more information and documentation make sure to check out the official WebJars website.

07 May 2012

Introducing the Hippo CMS Groovy add-on

A while back I was playing around on some pet project with Groovy. For those of you that are not familiar with Groovy: Groovy is a dynamic language for the Java Virtual Machine. In other words you can write Groovy (scripts) and keep writing without having to recompile / deploy.  Groovy can integrate with any framework or library out there, so I tried it on Hippo CMS as well.

A little background


One of the reasons I tried Groovy for Hippo CMS was that I was looking for a different way of executing code against the Hippo repository. There are different options for executing code against the repository. As you might know you have the option to use UpdaterModules. I've written about these modules a while back in an older blog post. In short an UpdaterModule allows you to run a piece of Java code at start-up time (when the repository starts) and can execute any command on the low-level JCR API. This is quite a nice concept, but when you run these updaters the CMS is not usable for users and if you have a large updater it can be down for quite a while. There is a good reason why this is so and it's very useful for a couple of use-cases.
Next to the UpdaterModules Hippo CMS also has the concept of JCR runners. These runners connect through RMI and can be run from the same server to perform large batch operations against a running CMS/Repository. They are really handy, but the downside is that you need to have physical access or SSH access to the machine itself, which you sometimes/mostly do not have.

The reason for creating the Hippo Groovy plugin


First of all I like Groovy as a language. It's simple, intuitive for Java developers, reduces scaffolding code and you can easily integrate it with your current framework.
My primary objective with creating the Hippo Groovy add-on was creating a CMS plugin that allowed you as a Hippo 'admin' user to for instance:
  • run a dynamic script against the Hippo repository that might get some information
  • update a set of documents
  • query for data and call for instance a the publication workflow for all documents that match this criteria.
  • what ever comes to mind...
And I wanted to be able to do it all from within the CMS interface.

Note: Of course giving scripting access to users that have 'admin' permissions within the Hippo system can also be quite dangerous, because for instance they can throw away all data if they are not careful with their scripts. I do however believe that the type of users that run these scripts take extra care before executing these scripts.


Current status


The Hippo CMS Groovy add-on is now a project on Github and is almost ready for it's first release. The first release will contain a CMS add-on that is only shown to users that have the 'admin' role within the CMS. The features implemented right now are:
  • Script execution from the CMS UI
  • Uploading a script before execution
  • Feedback of the script by providing a CMS Wicket model as the 'output' for the script
  • Exposing the entire JCR api to scripts based on the current user session
  • Syntax highlighting for the Groovy scripts with the CodeMirror javascript library

 Future plans

 

 For the next couple of releases I have a few plans like:
  • Groovy script storing inside the repository  (done)
  • Scheduled execution of stored scripts
  • Perhaps support Groovy syntax in HST (GSP) templates (like for instance Play framework does with Play version 1.2.x)

Contribute

 

If you like the concept then please fork the project on Github and send in pull requests.