Why proper blog engines increases traffic

I've had a blog for about seven years now. It started out as a bunch of static HTML pages that I would edit by hand, then later evolved into a dynamic PHP site that I wrote while in college. For many years I was happy to see 5-10 visits a day, if that. I suspect most of those vists were from my mom and co-workers :)

In May 2007 I decided to join the present and use an open source blog engine because my blog was very dated and lacking features; such as RSS. It seemed wrong to spend time writing my own blog engine again when there are full featured blog engines freely available. I chose Roller because it is written in Java. While setting up Roller I learned about "pings", which is a feature where my blog can tell blog aggregaters about my new posts. Pings, RSS/Atom feeds, and blog aggregaters have brought me more visits in four months than the sum of visitors in last seven years!!

Comments (3)

ryandelaplante.com 2.0

As you can see, the new and improved version of this blog has gone live! Getting to this point has been a long journey for me. I'll lightly touch on the history then will talk about the installation of the Roller weblog engine.

Once I had decided that it was time to build a more powerful blog engine (from scratch of course, since I'm a programmer) I knew that it would be done in Java. The problem was I didn't know Java. As I started to learn Java I quickly realized how many things I needed to learn just to do one project. By the time I had learned Java well enough to be capable of writing a blog engine, I had realized that there is a lot more to a blog than a pretty GUI, entries and comments. I had also noticed that nobody else seems to be writing their own blog engines, including other programmers. So, I chose to use a well established blog engine written in Java.

The engine I chose is the Roller Weblogger from Apache. I decided to run it in the Tomcat servlet container because in the near future I'll also be using Zimbra or Scalix which require a hacked version of Tomcat. If I host all my web apps in one servlet container then I only need one IP address. I'm using Tomcat 6.0, Sun Java 6, and MySQL 5.

The installation was pretty simple -- just read the instructions. For me the challenging part was setting up virtual hosts in Tomcat to work the way I want. If a user navigates to http://www.ryandelaplante.com, I want my blog to come up. Roller was designed for hosting multiple blogs and has a master front page that shows the latest posts. From the Server Admin screen, I was able to specify my blog as the "front page" instead of the default. If it weren't for that, my users would have had to go to http://www.ryandelaplante.com/rdelaplante/ to access my blog. Since I no longer need to force people into the /rdelaplante/ folder, setting up a Tomcat virtual host was pretty simple. One thing to note is that some pages require access to /roller-ui/ which is at the same level as /your-blog-name/, so you can't simply make the /your-blog-name/ the root of your domain.

To set up a virtual host for my domain name, I first created a new webapps2 directory for the virtual host instead of using Tomcat's default webapps directory. Now that I think about it, this was probably unnecessary. I could have deleted all the default webapps, and made Roller the ROOT webapp. Anyway, inside of this new directory I created a folder called ROOT and extracted Roller into it. Roller's installation guide had me add various external dependencies such as JavaMail and Hibernate. It also talked about configuring a context.xml file. I don't have much experience with Tomcat so it took me a while to figure out that you have to create a folder called META-INF in the same directory Roller lives in (ROOT), then create a new context.xml file in it. The context.xml file creates resources such as a database connection and SMTP session, then makes them available to the application. Below is my context.xml file:

<Context path="/" docBase="C:\\Program Files\\Tomcat 6.0\\roller\\ROOT" debug="0"> <Resource name="jdbc/rollerdb" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/roller?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8" username="dbusername" password="secret" maxActive="20" maxIdle="3" removeAbandoned="true" maxWait="3000" /> <!-- If you want e-mail features, un-comment the section below --> <Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="smtp.for.my.isp.com" mail.smtp.port="25" mail.smtp.auth="true" mail.smtp.user="username-blog@isp.com" password="secret" /> </Context>

You might have noticed the docBase path indicates I'm running on Windows. Until I get myself fully organized with my Solaris servers (one of which has a dead network card) I decided to host the blog off my BBS computer.

The second configuration file I did some work in is Tomcat's conf/server.xml file. I searched for 8080 (the default TCP port) and changed them to 80. I also added the following lines near the end of the file, just before the </Engine> tag:

<Host name="www.ryandelaplante.com" appBase="webapps2"> <Alias>ryandelaplante.com</Alias> </Host>

The "webapps2" appBase is the virtual domain's private folder for web apps. Since it lives at the same level as the default "webapps" folder, I did not need to specify the full path.

Once I had roller up and running I created a few posts and played with the web based administative tools. I'm quite pleased with Roller. I noticed that there was only one or two themes that came with it. Each blog owner can choose a theme which defines the look & feel of their blog. After searching google for some themes I found the OptionalThemesForRoller wiki page. I downloaded these themes and extracted them to my webapps2/ROOT/themes/ directory. I found that when you switch themes for your blog, none of the graphics seem to display. It turns out in Roller 3.0 or 3.1, themes work a bit differently. A theme's resources (such as graphics and CSS) are supposed to be copied into a private folder specific to your blog for you to customize. Inside the HTML template, there are macros that resolve the full path to the actual resource. My problem was caused by the theme resources not being copied into my blog's private folder. I had to manually copy these files. I think this must be a bug?

After playing with the few themes I could find for Roller, I wasn't happy with any of them. I wanted to create a new theme that took the best parts from each of the sample themes, and that looked better. I ended up going to sites such as Open Source Web Design, Open Web Design, and styleshoot to browse free templates. Once I found a template I liked I spent 3-4 evenings turning the raw HTML and CSS into a Roller theme. Roller uses the Velocity Engine for templating. It enables you to write basic flow control and logic scripts, expose data to templates, write macros, etc... I was able to copy bits of Velocity scripts from the various sample themes into my new theme, and get it working fairly easily. The hardest part was getting all the CSS to work right. Some of Roller's macros inject raw HTML that has some CSS classes and IDs, which were very different from the template's HTML. I had to rework a lot of the CSS to work with Roller's output. I'm quite pleased with the final result. I plan on donating my new theme to the Roller project once I'm satisfied that it works in every scenario.

New blog partially completed

This weekend I got started on migrating this website to the Roller blogging engine. After getting Roller up and running I spent some time exploring the administrative side. Having a blog in 2007 is much more than basic database CRUD like my current blog (I don't even support comments or RSS!). Modern blogs have so much more under the hood. Here is Roller's high level feature list:

  • Multi-user blogging: can support tens of thousands of users and blogs such as those hosted on http://blogs.sun.com
  • Group blogging with three permisson levels (editor, author and limited)
  • Support for comment moderation and comment spam prevention measures
  • Bloggers have complete control over blog layout/style via templates
  • Built-in search engine indexes weblog entry content
  • Pluggable cache and rendering system
  • Support for blog clients that support MetaWeblog API
  • All blogs have entry and comment feeds in both RSS 2.0 and Atom 1.0 formats

Writing your own blogging engine seems like a waste of time when there are many mature ones out there. Especially when they are completely customizable with templates, and let you add as many new pages you want. Other than my current blog, I can't think of many/any blogs that don't use a blog engine such as Roller, WordPress or Movable Type. I chose Roller because it is written in Java and is used by Sun and IBM.

Yesterday I wrote a program that transforms the data from my old blog and imports it into the roller database. It's on the net now, but at a secret location until I finish the template customizations. I've contacted the web designer of the best Roller template and asked if I can pay her to create a custom template for my blog. She does really nice work. I'm hoping that she'll get back to me soon and we can come to an agreement. The template is really the only thing holding me back from going live.

I'm also going to set my blog up with some of these "ping services" that updates a bunch of blog aggregaters when I post new content, and drives traffic. The theme of my new blog is Java, Solaris, Linux and Open Source. I'm going to try to come up with more useful things to write about instead of the usual moaning about how I failed to set up my server again last weekend because of reason X, or feeling lonely because I don't use Eclipse, Spring and Hibernate in my Java development. Hopefully people who read my blog will be able to learn something useful and will want to come back frequently. We'll see how that goes :)

Blog engines

I have been talking about a website rewrite for YEARS now and have never done it. I'm starting to consider using an existing blog engine.

I did not do the rewrite for a few reasons. Primarily, I did not have the full set of Java skills to do it until this past year. Eventually I sat down and decided to give the rewrite some serious thought. I wrote down a detailed list of features. Unfortunately there are tons and tons of blog engines, content management systems and portal containers already written out there. I can't get over the fact that writing my own would be a waste of time. It would take a very long time to match the functionality and quality of the existing systems, nobody else would really care about using it but me, and my time could be better spent on the scads of other programming projects I'd like to do at home.

Using an existing blog engine would let me get switched over right away, would offer better functionality, a nicer look & feel, and allow me to get past this road block.

I'm currently looking at JRoller which is used by Sun, IBM, and a bunch of other companies for their corporate blogs. It supports multiple users with their own blogs, and is written in Java. Now -- if I could only get effing OpenLDAP + PAM + Samba working together, maybe I'd have a server to set things up on. Argg...

One more thing. I'm also planning on downloading something called Collab.Net and installing it on one of my servers. It is similar to sourceforge, but Java, and used by Sun to host their java.net community, netbeans, open office, and a bunch of other companies use it too. I really like the idea of every project having it's own community website with everything in one spot for any developer to access. Security is fully customizable with roles so that users must log in to access sensitive data. Collab.Net even has templates to help enforce Agile processes if you want, and a neat new bug tracker called Scarab which has been under development for many years to replace Bugzilla. NetBeans has a plugin that can interface with Scarab. Collab.Net also has subversion integration, mailing list features, and tons of stuff. Basically you can set up sourceforge/java.net on your internal dev server. Enterprise edition is free for 15 users. The only issue is it MUST run on a fresh install of Red Hat Enterprise Linux, and be on a dedicated server. I like it so much I might actually spend the $350 on RHEL.

Solaris 10 is now competing head to head with Red Hat. It supports multiple simultaneous "Linux Environments" that are compatible with Red Hat Enterprise Linux, and it's free. Their support fees are up to 50% less than the cost of Red Hat, and they maintain each version of their OS at priority 1 for 7 years. Red Hat maintains at priority 1 for 3 years, then you can keep using it with diminished OS support/updates or upgrade to the next version with no guarantee of backwards compatibility of your apps. Solaris is the only commercial OS that guarantees application compatibility between releases. I sound like a Solaris salesman.. I got most of that from this link. Really the only problem I have with Solaris is compatability with my hardware. They are compatible with commercial servers, but not just any hardware that is cost effective for me to buy for my PC. They are planning to switch their license to GPL, which would enable them to start making use of Linux drivers.

The new ryandelaplante.com update

For years I've been talking about a rewrite. Then I started learning Java and thought in a few months I'd jump right into it. I've been reading about enterprise architecture, middleware products, Service Oriented Architecture, portal servers, single signon and identity management, web service sercurity, etc etc... and keep putting off the site because I know that today I don't have the skills to do it the way I think is right, until I finish reading my mountain of books. If I just slap something together, then I won't be happy with it and will re-write it again later.

So here is some of my plan. I'm trained and experienced in EJB2 but I want to use EJB3 now. Tonight I'll crack open my 700 page book on EJB3 and get started. While I'm reading that book (a couple months) I'll likely get into Phase 2 and 3 of a java project I'm doing at work which will involve more sophisticated uses of web services, and improving the overall design of the system to fit in an SOA. I also want to poke around with Sun Portal server and JSR-168 portlets. Once I feel comfortable with EJB3, JSR-168 portlets, Sun Portal server, and SOA design, I will then be ready to get started :) Actually, I forgot to mention Sun Creator Studio 2, the IDE for developing JSF web tier components, portlets, and applications. A year ago I read a book on JSF but never used it. This will be a bit of a learning curve as well.

Hopefully you can now see why I haven't started the new site. I'm not lazy -- I read a thick programming book almost nightly. There is just so much to learn, Java is not PHP. Also I have to fight the programmer in me that wants to make a generic content management system instead of programming a specific website for myself. I've got my ideas written down about the content and sections of the site. My realistic guess on when the new ryandelaplante.com will be available is sometime around Christmas 2006 or sooner.