A New MySQL Forge is Born

As anyone close to me can attest, my life over the past six months or so has revolved consistently around planning for the 2008 MySQL Conference and Expo. However, in my abundant free time not reviewing proposals, working with sponsors, and organizing the conference events, I’ve also been working on a new version of the MySQL Forge platform. In fact, the new code base is almost a complete rewrite from the original one. I’m pretty pleased with the new platform, and Giuseppe and I have been doing a bunch of testing to get things to where they are now. And we’d like your help in the final testing of Forge 2.0 before it hits the mean streets of the Internet.

So, what exactly is new about Forge 2.0? Well, lots of things actually. The old forge code base suffered from a number of problems which the new code base attempts to solve. We’ve made the new platform a whole lot more interactive and, hopefully, more attractive. Users have the ability to vote, comment, and tag virtually everything on the Forge. There is a new unified commenting system that allows you to “prettify” your comments and highlight code sections in 86 different languages. And a whole lot more.

Commenting, Revisited

One of the things I really wanted was the ability for people to comment on just about anything on the Forge, whether it was a worklog task, a project, a code snippet, whatever. And, I wanted people to not be restricted to how they presented their comments. I wanted the commenter to be able to place code snippets into the comment and get that code highlighted in whatever programming language they wanted, and have the ability to put links, bold and italicize text, cite quotations, too. But, with such ability comes the risk of security holes, XSS attack vectors, and other nasties.

Well, I’m happy to say that the solution I came up with works pretty well and enables people to do most of what they want to do in comments while still being safe for web-server consumption. I used Edward Yang’s phenomenal HTMLPurifier library to enable clean markup of the comments and the fantastic GeSHi library for programming language syntax highlighting. Together, the two libraries, and a little bit of custom code on my end, work as a great combo to allow users freedom but protect the site and users at the same time.

For those interested in the code that actually does all this, I have written a post about it.

Rock the Vote

There is now the ability to vote on things you like or find important. You can rate projects and code snippets and vote for the worklog tasks that you feel are most important. I believe it is the most important new feature of the Forge. The reason is that, particularly for feature requests that are logged in our public worklog system, there isn’t currently a good way of seeing which features the community feels are most important. Feedback from the community is really important to us, and this is a good way of getting that high-level feedback about upcoming features and important bugs.

A New “People” Section

We also wanted the new Forge to be a true community-oriented place for MySQL ecosystem. And so, a new People section now gives Forge users the ability to view and search other MySQL community members. There are lots of plans for the People section, including a kind of integrated “karma” system. Currently, you can view what the Forge user has contributed to the Forge — projects they registered, code snippets they contributed, and forge wiki pages they’ve edited. Simply click on a Forge user’s name anywhere in the Forge and you’ll jump to their public profile.

Unified Wiki Login and Looks, Finally

The MySQL Forge uses MediaWiki for it’s underlying Wiki. To say that bending MediaWiki to your will is difficult would be the understatement of the year. To be honest, it’s been a pain in my *$% over the past six months trying to get it to both conform to the overall style of the main Forge and to plug in the regular MySQL Forge authentication system in place of the default MediaWiki authentication/login system.

But, thanks to hours of digging around the Internet and frustratingly going through the MediaWiki code base, I managed to modify the Forge wiki so that it didn’t look like a pile of dung (like the old wiki does). The navigation at the top of the main Forge now is available on the wiki, too (imagine that!) and the style of the wiki itself meshes nicely with the main Forge styling, too. Getting this done required making a new Skin class for MediaWiki, based on the old CologneBlue skin, and modding it up substantially.

In addition to the style problems, one of the biggest gripes people have with the old Forge is the fact that there are two logins — one for the main Forge and another for MediaWiki. This, to say the least, is extremely annoying. In fact, it would have never been the case if, up until recently, we could actually figure out how to override MediaWiki’s authentication system. We tried a few times but never could get it to work. Well, that has changed. Now, the authentication system of MediaWiki is taken over by the main Forge authentication system.

Previously, the authentication system hooked into the main web authentication system, but for security reasons, it was decided to move away from this and have Forge users authenticate to its own system (there are plans to have OpenID authentication in the near future, too). No more different wiki user logins, now. You log in using your email address and password and changes to your main Forge account are synced with the wiki authentication system. Finally.

Site-wide Search

Finally, one thing the old Forge lacked is a way to search the entire Forge — projects, code snippets, worklogs, and wiki pages — through a single, unified search interface. Well, now there’s a new search interface for the entire site, which yields results of all categories of information. The screenshot below shows the search results for “backup”. The search is quite simple at the moment, so I have plans to integrate the Sphinx search engine into the Forge to provide better search capabilities in the future. It’s one of the reasons I’m looking forward to the MySQL Conference. There is a session and a Birds of a Feather session on Sphinx that I plan on going to in order to learn how best to integrate Sphinx into the Forge.

So Help Us Test the New Forge!

We need help in testing the new Forge! Currently, the new Forge is running on a test database (taken from a dump of the real one today). Feel free to hammer it, crack it, add stuff, log in, log out, and all the other things you’d do on the normal forge and all the new things you can do on the new one! Report any bugs to There is a bug category for “MySQL Forge”. Keep in mind there are a few known issues which we will correct as soon as possible, so check there before reporting any bugs! 🙂

Oh, and one final thing. I’ll be releasing the entire source code for MySQL Forge and the underlying library called HiPPO this week on a bzr repository hosted on…what else? MySQL Forge. How sweetly recursive.