Blog

A simple, multi-user blog system featuring comments, BB code, image upload, search tags, customizable CSS and RSS feeds. It was for a school project and I have implemented all the features laid out in the specification. The specification also dictated that we use Wicket for the frontend, Hibernate for database connection, Spring for transaction handling and JAXB for the RSS feeds. It was primarily a backend project so I didn't put much time into making the page look pretty, the frontend is just there to show that everything works.

GPL v3

Java Wicket Hibernate Spring JavaScript HTML CSS

I made it in such a way that registering only gives the user the ability to leave comments on blog posts. The user is then free to create a blog which allows them to make blog posts, users can have more than one blog. Users also have an image gallery which they can use in comments and posts. Blogs have a custom CSS file that the user can edit with a simple form. The custom CSS is used on the blog pages and the blog post pages. Both comments and posts can contain BB code tags that can also be affected by the custom CSS. In testing I was able to re-create some famous blogs simply by adding a few lines of custom CSS code and using the BB code tags. See the screenshots.

It was a fun project as I was interested in getting into dependency injection with Spring already. I ended up using Spring for all configuration of JDBC and Hibernate. My generic DAO system was also assembled by Spring. I managed to avoid a lot of boiler plate code since Spring took care of singletons and dependency injection.

I also took the oportunity to get better aquainted with MVC. The view consisted of Wicket panels and pages that implemented view interfaces. The controller consisted of Wicket pages. The model was devided in two parts, the DAO system including beans and the model objects which defined all the business logic and made use of the former. My implementation of the MVC pattern did result in a rather large amount of files but the separation of concerns was very helpful when I had to change things I had already implemented.

Wicket was a pleasure to use although I did struggle a bit at times when the documentation didn't cover specifics of what I was trying to do. But apart from documentation issues I found it to provide a nice way of making web applications in OOP. If I had more time I would have enjoyed getting into the Ajax classes that Wicket provides.

I used Maven for the project setup and dependency handling which allowed me to get started with coding quicker than a manual setup would have. I got most of my Maven skills during my work experience period with Seamless AB. This proved to be useful and I'm happy to have been introduced to Maven in a work environment.

Even if this project isn't fully completed I feel that it showcases my code style and abilities in this field. The code is well documented and contains very little code duplication. It will also be a great reference for me when I need to use these technologies next time as I have managed to solve a lot of tricky problems already. I am releasing the code as open source under the GPL v3 license with the hope that it can help someone struggling with the things I have learnt here.

Developer notes

The project in the repository is a Maven projekt but it also contains an Eclipse project file. The easiest way to get started is using Eclipse in combination with m2eclipse. To be able to run the application you must at least run "mvn generate-sources" to generate the JAXB classes. You can also do "mvn package" which creates the JAXB classes and the .war file. Also remember to setup the database, simply run initdb.sql if you are using MySQL. Make sure that "application.properties" contains the correct information. It is currently setup for PostgreSQL but I have also provided "mysql_application.properties", rename it to "application.properties" if you are using MySQL.