Showing posts with label Cocoon. Show all posts
Showing posts with label Cocoon. Show all posts

09 August 2008

The Hippo Site Toolkit (HST)

Blogging has not been one of my priorities these past couple of months as you might have noticed. I've been so busy at the Hippo office and at customers, that I was unable to find some decent time to start a new blog post.

I realize I should have written this post 6 months ago, since the project I'm going to write about has been around even longer than that, but as far as I can remember, nobody has ever written a post about it. I think that's a shame and you guys should be made aware of this piece of software.

A new set of development component were created to develop web application with JSP or JSF in combination with Hippo CMS. We called it the Hippo Site Toolkit and it has been available for quite some time.

The HST will allow us to provide default component that aid developers in their work while building web applications with JSP or for instance Apache MyFaces.

There are some example projects available from the Hippo SVN, so be sure to check it out if you're thinking about using JSP or JSF.

12 March 2008

ApacheCon Europe 2008

I've been too busy lately to actually keep track off the things going on around me. I almost even forgot that the ApacheCon Europe 2008 is only a couple of weeks away. This year I will not be doing any talks, since I thought there was nothing interesting for me to talk about. I enjoyed giving the Cocoon talk together with Jasha last year, so perhaps you'll see me/us speaking again at one of the other ApacheCons.






I have a couple of ideas now for new presentations, but I'm not sure yet if I can put my ideas into actual concepts, before actually sending in a proposal. We'll see!
For those of you coming to the ApacheCon in Amsterdam (I really suggest you to come), I hope to see you there. If you have any question about Cocoon or Hippo CMS, be sure too stop me if I'm walking past you. I'm looking forward to some talks.. See you there!





04 January 2008

Hippo Site Sample with Cocoon 2.2

It has been there for a while now, but I was not able to find some decent time to write a blog entry about it. A while ago I made a Cocoon 2.2 block out of the Hippo Site Sample. This can become very interesting for developers starting with Hippo in 2008, since Cocoon 2.2 will be coming out very soon.

You can get the site sample block out of the Hippo svn repository.

I've tested it with the following settings:


  • Maven 2.0.8

  • Sun JDK 1.5

  • Cocoon 2.2 trunk

  • Ubuntu Linux 7.10



Please note that this is very experimental and I still recommend using Cocoon 2.1 for projects that will go in production in the next 6 months.

I've put a page up on the Hippo Wiki that describes all steps.

Have fun!

23 October 2007

Cocoon GT 2007 Day 2+3

Wow the past weeks have flown by. I made a start with this post on the plane back from Rome to Amsterdam, but I could not find the time to finish it. So here goes:

The last two days happened so fast, I was unable to continue my daily blog writing. Day two of the Hackathon was a day of trying out and playing around more with Cococon 2.2. I continued my quest together with Jasha, while he was working on his presentation in the mean-time, with the webdav block. During the day I also attended a couple of talks on 'What to deprecate in 2.2', 'The future of Cocoon Forms and Dojo' and 'Cocoon Marketing'. These talks were held in small groups of about 12 people and were very interesting. Jeremy initially started the talk about Cocoon Forms, which attracted quite some audience. He proposed to migrate Cocoon Forms to the 1.0 release of Dojo, once it's final release is there.
At the end of the day we all went out for some nice real italian pizza and after that a good strawl around town. We got to see the Trevi fountain and the Pantheon. They are both amazing to see.

On the conference day there were a lot of good talks. Some of them I had heard before and others were completely new. Jasha did his talk about the cocoon project wizard, which received some good response from the audience. At the end of the day it was time to clean up and head home. It were 3 amazing days with lots of italian culture, good Cocoon talks andnew friends. I hope to see everybody at the next GT again. Till next year!



04 October 2007

Cocoon GT 2007 Day 1

The first day of the Cocoon GetTogether 2007 Hackathon has just ended and I have to say the it's great to be in Rome. We've been really lucky with the beautiful weather here. It's about 26 degrees Celsius,lots of sunshine and a perfect blue sky and it appears to stay that way for the next couple of days. The past 1,5 day have been great. Italy is such a wonderful country.

Our journey started on tuesday when Arthur, Jasha and I left the Hippo office around 4pm and took a cab to Schiphol airport, where we met Arje. The check-in went pretty smooth and after a while we boarded the plane. During the flight to Rome we had a great view of the Italian Alps, because of the great weather, which ended in some beautiful images.


Peaks In the evening we arrived at the Leonardo da Vinci airport near Rome. I was a bit surprised by the distance between the airport and the city itself. Traffic was hectic and I can't believe the driving skills of the people in Rome. It seems they drive like crazy, but apparently it's normal here. It seems like an organized chaos, so I guess you just have to get used to it. After dropping our bags at the hotel we went out for some late dinner. Apparently all the restaurants are open until 1.00 am, so we had plenty of time for some real Italian pizza and some beers. We ended the evening with a nice grappa. Although I have been to Italy before, I never heard of this drink, but we all took a glass and this is a drink I will never forget! It's a bit strong and the smell was awful, but the alcohol had a nice effect. After a short walk we went back to the hotel, because we had to get up pretty early in the morning for the first day of the Cocoon GT Hackathon.
In the morning we started off with a good breakfast and went off to go to the Villa Borgese. Villa Borgese is a beautiful big parc in the middle of Rome and after a 15 minute walk we arrived the the Bio Parco, which was the location of the Apache Cocoon GetTogether 2007. The Bio Parco was actually some sort of zoo, which was of course an astonishing location for the GT. The Hackathon took place in the Elephant room, that got it's name by being located next to the place where the elephants lived. It was actually really funny to hear them make loud noises while everybody was working very hard and exploring Cocoon 2.2. During the lunch or the short breaks I went out and walked around the zoo a bit. I love animals and took some great photos.
Today I also met Marco, who has made the Italian translation for Hippo CMS. It was great to finally meet him in person, since we had been having conversations by email over the past weeks. One of the great things of the GetTogether is the social gathering. Meeting (new) people in person is so much more fun then talking to people on the mailinglist. In the afternoon Jasha and I started trying out Cocoon 2.2 for which we now finally had some time. Things have been really busy at the office, so having a bit of a breather didn't hurt. We got the default block archetype working and tried out adding the WebDAV block, but did not succeed in continuing our quest. We wanted to get a working sample with Cocoon 2.2 in combination with Hippo Repository, but it seems the commons-http client is giving us some troubles.
In the evening Gianugo was taking the group to dinner at a typical Italian restaurant, which was about 40 minutes drive by bus. Because of the heavy traffic, the bus did a touristic tour first instead of doing it after dinner. Rome is really amazing in the evening. I really have to return to Rome for a holiday or something, because there is so much to see and to do, but during the GT there is too little time. The restaurant he took us to was great! There was so much great Italian food and wine that was probably enough food for 20 more people.
After dinner some of us went into town for some more beers
Well this story is getting quite long now, so I'm off to bed. Last night was a bit of a short night. Arthur warned me that he could snore a bit, but he was louder then I had expected ;-) You've lived up to your reputation duder! For an impression of the Cocoon GT you can have a look at my Set on Flickr or look at all the Cocoon GT 2007 photos. More to follow soon...

19 September 2007

Cocoon GT 2007 update

It seems the Cocoon GetTogether 2007 program is available at the Cocoon GT website. I knew Jasha was going to submit a proposal and it seems it has been accepted. "Create your website in 5 minutes with the Cocoon Project Wizard". I've seen Jasha doing his magic a couple of times and this is something really worth seeing. It gives you a head start when starting out an Apache Cocoon project. I would say: Show us what you got Jasha!

It was a complete surprise to see another familiar name in the program list. One of my other colleagues, Martijn Vos, apparently had submitted a proposal and it seems his talk has also been accepted! I've not been able to meet up with Martijn yet, since I've been more out, then inside the Hippo office, but I'm very curious about "Use more Java!".

But those are not the only talks. There are more interesting talks like: "Break my site: Practical Stress Testing and Tuning of Cocoon Applications" by Jeremy Quinn and "Hands on Cocoon" by Francesco Chicchiriccò and so many more. Just go and check out the full program at the Cocoon GT website!

17 September 2007

Cocoon GT 2007

Well the Cocoon GetTogether 2007 is coming up. It's only a bit more then two weeks from now. Have you registered? I know I just did! Be sure to register on time, because the space is limited. I think Rome will be a great place for a GT. I've never been to Rome myself, so I think it's going to be a great experience and I'm definitely going to bring my camera.


I can't wait to meet up with all my fellow Cocooners, have some laughs, drink some beers, eat some great food and see what's hot in the world of Cocoon. For the hackathon there are some plans to do some Cocoon 2.2 integration with Apache Wicket. I've noticed there are a lot of people spending time on Wicket, so it's a framework to take into account.


Of course there will be a Hippo team present. You can probably spot us by the blue t-shirt with the big red Hippo's on the back. Have you used the CMS before or you're perhaps thinking about it, just walk bye and come and have a chat!


See you in Rome!



16 August 2007

Conferences coming up

The vacation period is almost over and the conference season is starting up again. First up is the Cocoon GetTogether 2007. Gianugo recently announced the Cocoon GT 2007
which will be held in Rome this year. The dates are now final, so mark the 3th,4th and 5th of October into your schedule. This year there will be two days of Hackathon and one sessions day.
Jasha and I are thinking of doing a session at the GT this year. We're not 100% sure what it's going to be about, but perhaps a session on Cocoon 2.2 from a beginners perspective. It all depends on how much time we can spend on digging a bit deeper into 2.2.



A week later at the 11th of October there will be a dutch conference called J-Fall, organized by the NLJUG (Dutch Java User Group). I've submitted a proposal last night, which is a slightly modified version of our ApacheCon EU talk. Let's just wait and see if it gets selected. Speaking at a dutch conference will be a completely new experience for us.



In the beginning of November there is also the ApacheCon US in Atlanta. Unfortunately Jasha and I were too late with sending in our proposal, but Arjé and Ate will be speaking at the US edition this year. Let's see if we can use our talk, which we'll be preparing for the GT, at the ApacheCon US next year.



05 July 2007

Hippo CMS on Ohloh.net

Hippo CMS is getting a lot of attention in the Netherlands and around Europe these days, but of course our goal is to make it a world-wide well known product. The only way to achieve that is by promoting it a bit more then letting the product promote itself.


Recently I came across Ohloh. Ohloh is a source directory that helps you find the software product you need. With some help of tags, stacks and the Ohloh community you can find some great pieces of software.


To help developers find Hippo CMS, it has recently been added as a project to Ohloh.


Even though Ohloh is still under development it's fun to see what the Ohloh team does with your source code. It can give you a good view on how active the committers of a project really are, how many committers are involved in a software product and there is so much more interesting information that Ohloh retrieves from your source code repository. I was actually surprised by the source code statistics which stated that the amount of Javascript/Flowscript used in the CMS was about 65% and only 6% Java code has been written until now. Since the CMS is based on Apache Cocoon there is a lot more Java involved, but that's inserted with some help of Maven.


Ohloh is still updating, but I've just also added Hippo Portal and Hippo Repository.



13 June 2007

Hippo website revamped

The old Hippo website was created a while ago and it badly needed a redesign. Now it's finally there! If you've not been to the Hippo website over the past week, you will probably not have noticed that the entire website has been redesigned.


I think the old website was really outdated and I'm very happy with my employers new website! Of course it's powered by two products I really care about: Hippo CMS and Apache Cocoon.



01 June 2007

Combining Cocoon and Solr

It's been quiet here this month. I've been extremely busy (what else is new) with finishing up old and starting up new projects. One of the exciting new things is that I've been asked to help out with a new project that embraces the power of Cocoon (hurrah!).


It's a very nice project with a lot of interesting features. The team is very skilled and they are very enthusiastic about the project. My job for now is to support them in their daily Cocoon development and help them out with solutions for parts of their system.


I'm currently looking at how we can implement faceted navigation and fast searching. The first thing that came to mind was Lucene and Solr. I've heard Bertrand talking about Solr so many time that I had to take a look at it. Solr seems to be very powerful,flexible and easy to use. Even for people new to Solr it's easy to setup and play with.


So yesterday I gave Solr a try, to see what we could use it for and it seems to be almost exactly what we need. Cocoon and Solr are in my opinion made for each other since you can do all sorts of XML operations with Cocoon and send and receive these to/from Solr.


While playing around with Solr, I wanted to give it a try from a Cocoon application to see how they would interact. Since you can get results back from Solr by doing an http request it's very easy to integrate this in your Cocoon sitemap. Digging a bit deeper, I stumbled upon a Solr SearchGenerator for Cocoon. Of course that sounded very interesting and I tried it at once. The SearchGenerator is actually very simple and is just a wrapper around an http PostMethod that sends a query to Solr and generates the XML response into the pipeline. Now I had all I needed.


I've even written a small faceted webapp based on the sample content provided in the default Solr checkout. It was fun to write and did not even take me that long. I'll write some more documentation about this and put it online, so other people could also try this out.


So far I really like Solr. Can't wait to spend more time on using it!


Some good links on Solr:




20 April 2007

Time is always the issue

I've been too busy lately, to do all the things that I want to do for a while. Since my Cocoon comittership I wanted to give Cocoon 2.2 a go and see all the shiny new things and help out, but somehow I'm unable to find some descent time.



With the ApacheCon coming up Jasha and I also still need to finish our demo application, but first we have to get started.


I'm also doing some work for Hippo Repository during my evening time.I'm afraid I need more hours in a week. :-(




21 March 2007

Busy times

The past couple of weeks have been crazy. I've been all over the place and today I can finally find some time to start with our ApacheCon presentation. Last week I've been visiting some Hippo friends in the UK. I always love to visit London, because it's such a great place. Especially the soho district, where their office is located, is full of these small foodshops and restaurants. It's really nice and I should really take some vacation and go there for a couple of days and see all the nice things around town.


On monday I had some spare time in the evening to go for beers and dinner with Andrew and Jeremy. Great to see you guys again! We talked about the upcoming ApacheCon in Amsterdam and we're all a bit concerned about the fast upcoming deadline for our presentations, which ends March 23th. That's more then a month in advance! Jasha and I will really have to put some more effort in it to reach that deadline. I also noticed that the Early Bird registration ends this Friday, so you better make sure you have registered, because it saves you quite some money!



More good news on the Apache front: Andews vote was a success and the result was: 22 positive votes. I hope that in a couple of days all the paperwork is done and I can be proud to say that I'm part of the Apache family :-)



07 March 2007

A pleasant surprise

Coming back from a vacation always means you'll have to catch up on all your e-mail. Thank god for spam-filters, otherwise I would have gone nuts on all the e-mails. While reading up on my mail, I was pleasantly surprised by this e-mail on the Cocoon developers list. Thanks Andrew! I was totally not expecting this and even Arjé was astonished how speechless I was about it for the rest of the day.

Last year I worked closely with Andrew on several large Cocoon projects. Now that I'm thinking about it I've already been using Apache Cocoon for almost 4 years now and still enjoy working with it every day. Time flies I must say.

I'm also very happy to see that Felix is getting the same trust from the Cocoon community as I'm getting. I know Felix through Cocoon and Hippo CMS and we met last year for a couple of minutes in one of the restaurants at the Cocoon GT. Felix has been putting a lot of effort into Cocoon 2.2 lately, so I think he really deserves it! Keep up the good work Felix!

29 September 2006

Only two days left!!!

Only two days left till the first day of the Apache Cocoon Hackathon! Have you registered for the conference day?
If not, please do! See the CocoonGT website for more information.

07 September 2006

Cocoon GT edition 5 is coming up

Year in year out people travel around the world to spread the word about this great product called Apache Cocoon. From ApacheCon's to OSCON's you will find people doing talks about Cocoon. The best place for talking about Cocoon is the annual Cocoon GetTogether where people from around the world meet and share knowledge about Cocoon.

This october will be edition number five of the Cocoon GetTogether and it will be held in Amsterdam, just like last year. The only difference with last year will be, that all events will take place at one location: The Felix Meritis.
Last years hackathon was succesfull, so this year there will be two days of hackathon again. The third day will be the conference day, where there will be a lot of people talking about new features, Cocoon's roadmap, existing projects and so on.

This years GT will be held from 2-4 October. Currently the counter is at 40 people from 7 different countries and it's still a month to go! It looks like this will be another succesfull year for the CocoonGT.

I will be there. Will you?

06 July 2006

Configurable cocoon.createObject()

Today I was working on a new feature in the CMS. I had to do some flowscript coding in order to implement this feature. By default you can create an instance of a Java class in flowscript by using the following syntax:


cocoon.createObject(Packages.nl.hippo.cms.Class);


Since I did not want to hardcode my class file, but wanted to create a configurable object, I had to find a solution.
So first I set the value of the variable in the DefaultsModule. (this can also be a XMLFileInputModule so you can really make this configurable from outside of you Cocoon application.



<component-instance class="org.apache.cocoon.components.modules.input.DefaultsModule" logger="core.modules.input" name="myconstants">

   <values>

     <cms-object>nl.hippo.test.XMLDemo</cms-object>

   </values>

</component-instance>



So now from my flowscript I can fetch the value of the cms-object constant.



var myConstants = cocoon.getComponent(InputModule.ROLE + "Selector").select("myconstants");



var myObject = myConstants.getAttribute("cms-object",null,null);



// Add the "" to the myObject variable, otherwise the interpreter will think that it's a scriptable object instead of a String or Class object.



var myXMLObject = cocoon.createObject(myObject+"");


You will have to declare the import for the Cocoon input package at the top of your flowscript before this will work.



importPackage(Packages.org.apache.cocoon.components.modules.input);

Well that's it! I could not find any documentation about how to do this. I hope this small chunk of code will help others out in the future.



Usefull links:




01 June 2006

Attending ApacheCon Europe 2006

ac2006eu_250x92trans.gif
It looks like some fellow Hippo developers and myself will be attending the ApacheCon Europe 2006 in Dublin next month. This will be my first big Apache Conference with developers from different projects within the Apache Software Foundation. I'm really exited about it and while looking at the sessions, my interest is going out to the Ajax and Apache MyFaces sessions (next to the Cocoon sessions of course).



I noticed more Cocooners are joining me in Dublin and it looks like Cocoon is well represented at the ApacheCon with people like Gianugo Rabellino (SourceSense), Bertrand Delacrétaz (Codeconsult) , Carsten Ziegeler(S&N) and Doug Tidwell (IBM) doing session about Cocoon.




I also see that there are some sessions on other CMS's. Maybe it's an idea to do a session on Hippo CMS next year? Sounds like a great idea to me! ;-)



24 April 2006

Performance boosting your Cocoon web application

As you might know, the user experience of a web application is very important. Fast request and response times are a must! You can do so much with Cocoon that sometimes you don't even know the functionality is there. There is already a lot written about Cocoon performance on the website as well as on the wiki, but over the past couple of years I came across a couple of things that could speed up the performance of you Cocoon web application. Here are a few tips:


  • Be carefull with non-caching components inside your caching pipelines (like the request generator).

  • Be carefull with using the resource-exists selector on non-filesystem sources.

  • Make good use of http headers within your sitemap( like the expires header ) for images, css and javascript. Cocoon is good in processing, but is not fast with sending resources back to the client. Make sure you keep the amount of requests to Cocoon as minimal as possible.

  • Pick the best XSLT processor in case you need to do a lot of transformations: Saxon or Xalan.

  • Try to keep the number of pipelines for a request as small as possible. All pipelines will have to be checked for their validity when a request comes in.



I hope you'll find these tips usefull. Always try to get as much out of you web application as possible!

11 April 2006

XHTML versus your browser

Using XHTML with Cocoon is sometimes a little frustrating. It seems that by using the default XHTML serializer configuration located on the Cocoon Wiki your rendered page is not valid XHTML.
While taking a closer look at the configuration (see below) you will notice that it uses the XMLSerializer as its source.


<map:serializer name="xhtml"
src="org.apache.cocoon.serialization.XMLSerializer"
mime-type="text/html" logger="sitemap.serializer.xhtml"
pool-max="64">
<doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
<doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
<encoding>UTF-8</encoding>
</map:serializer>


While the output is XML valid, the browser does not completely seem to understand the requested XHTML.
For example: If you would use a div element that doesn't contain content it would make the browser choke and all the XHTML after that element, would be included in the div element. If you would view the page source, everything seems fine, but the browser does not parse the XHTML correctly because of the closed tag. The page source will show you the closed div tag.

<div />

The above looks valid in an XML point of view. But the only way the browser likes it, is if you open it and close it again.

<div></div>

At first I thought it was the browser to blaim, but after quick look at the W3C specs it seems that according to the official DTD you are not allowed to create 'empty' div elements or empty textarea elements. With 'empty' they mean <div />. A quick workaround is to put a space inside the empty element. This is not a clean way of fixing things and it could also break the design.

After digging through the Cocoon blocks I found a XHTMLSerializer in the serializers block that did fix this problem. The XHTMLSerializer has an closeElement implementation that leaves certain elements 'open', so the browser will render the page correctly.
This serializer has one disadvantage though: if you use inline Javascript, it will convert all quote characters to &quote;. A quick workaround is to put all your Javascript in to script tags and include them from a remote file.

That leaves me with a choise between two options that are not 100% what I need. For now it seems that I can continue to work with the XHTMLSerializer from the serializers block since I do not have inline Javascript function calls.

UPDATE
After reading Arthur's comment ( thanks !! ), I found out that I missed a part of the W3C specs. According to the W3C specs you will also have to provide the correct mime-type for the browser to render it as XHTML. When using XHTML you must send application/xhtml+xml as the mime-type to the browser and not text/html. After a quick test it seems that FireFox can handle this, but IE 6 can't. I've not been able to test it on IE 7 yet, but let's hope they fixed it.

In the end it still leaves me with the problem that I can't render my XHTML the way I want, without doing any work-arounds for some browsers.