Samstag, 20. November 2010

Slides and sample code for Solr talk

I just uploaded the slides and sample code for my talk about Apache Solr at the Java User Group Karlsruhe.

The sample consists of an example solr configuration and some scripts that can be used to index files in Solr. A simple Spring MVC app can be used to search the content. Go to Github and grab the application as well as the slides if you're interested.

Sonntag, 7. November 2010

Don't try to do it all

For several years I have been running a web site for my father which contains some information about his work. It started out from html that was served statically, in the beginning of 2007 I migrated the content to OpenCms. During this time I was very eager to learn everything that was related to building a web site from scratch, from the internal workings of OpenCms to Apache configuration and CSS and its peculiarities.

Not that any of these are areas that are not important to know as somebody who is doing web development professionally. But for spare-time projects you have to be careful that you do not run out of time, which is exactly what happened to me. Especially for the styling of the page I did not invest as much time as I would have needed. I started from plain html and did all of styling my myself. I read a lot about the box model and how to apply CSS correctly. Unfortunately only the basic structure was finished before I ran out of time so I published the page with nearly no styling for the content. And that's how it stayed for 3 1/2 years ...

Recently I invested some time in it again. I ported the layout to use the YAML framework with its standard design and reorganized the structure of the content. Also, while at it, I updated from OpenCms 7.0.2 to OpenCms 7.5.2. In nearly no time the site was in a much better state than before without having to fight several browsers.

The main things I should have done from the beginning:

  • Use a CSS framework or a ready made template unless you're willing to invest a lot of time

  • Take extra care when structuring the content in OpenCms. Do not nest too deep if it's not necessary.

  • Use a source code versioning system even if you're not planning to have a huge project



Things that worked well during the relaunch:


There's still a lot of work to do: Some pages still use tables for layouting which especially doesn't work well anymore when using yaml as it highlights cells when hovering. Also, I'm planning to add a contact form using Ruby on Rails. Of course this could be easily done using Alkacon Webform but that's a good opportunity to learn a new technology.

At least SEO-wise the site seems to be OK: We are beating the famous singer as well as the bavarian wheat beer company with the same name :)