Yorkshire Twist - The Journal

Yorkshire Twist

How myJournal was built: Part 2

Monday, December 15th, 2008 - 11:03 pm

This is the second in a series of three posts about the tools I used to build myJournal. The first part talks about my workshop (i.e. computer), this post introduces you to the software side of things.

Part 2: The software

I’ve mentioned several times before that this whole site is built on a system called Wordpress MU (multi-user). This is a piece of software designed to run multiple blogs, and itself is built on the very well-known Wordpress software. The most famous installation of Wordpress MU is at wordpress.com, a website with nearly 5 million blogs (their homepage gives the exact number) which contains a vast array of authors writing about every subject under the sun.

Wordpress is free software provided by the nice folks at Automattic (hi Matt and Andy!). It’s also open source (I’ve talked about open source software before) which means anyone can take the code and do (almost) what they want with it. Which, of course, is exactly what we’ve done.

Wordpress offers quite a lot of the basic functionality we needed: user registration and management, blogs (we call them “sites”), post and page editing, and of course the back-end code which runs the site. For everything else (including media library, showrooms, the lists of members and companies, industries and a lot more) I wrote a series of plugins which work on top of Wordpress and result in what you see before you.

The advantage of this approach is we get all the advantages of a very well-resourced software application (over 150 people contributed to the last version of Wordpress), with our own customised stuff on top.

But Wordpress is just one of the building blocks, as it were. I used a lot of other tools to actually get this site to this level of complexity.

The other main building block is another piece of open source software: MySQL. For those of you familiar with Microsoft SQL Server, oracle, db2 or even Access you’ll know what a database is and what it does. You may even have a fair idea about how the myJournal database is set up. For those that aren’t quite that geeky, here’s a quick explanation.

A database is basically a piece of software that stores data. “Data” can be almost anything: lists of member names, company details, posts in a forum discussion and lots more types of textual data are stored for this site. The power of relational databases, such as MySQL, is they can also define the relationships between different bits of data. So, for example, in our database we have a relationship between each myJournal and the people who are their contacts. When you click “Add a contact” or “Accept a contact request” what you’re actually doing is modifying the data and relationships in the database.

It’s actually simpler than it sounds. Or maybe it’s more complicated, I can’t quite decide.

So, to actually put these building blocks together I used several pieces of software. My main development environment is a text editor called SciTE. Here’s a screenshot of some of the code in the myJournal homepage in SciTE (when in Windows I prefer Notepad++).

I don’t really like those visual HTML editors as I find they can too easily mess up what should otherwise be beautiful code. I’m a bit of a stickler for that. SciTE is where I write the HTML, PHP, CSS and JavaScript code for all the sites I’ve done. I also use the MySQL management suite extensively for testing SQL scripts.

Moving up a level from the back-end of the site to the front-end, I use a little tool of my own devsing to provide the cool interactive features of the site. Remember years ago on the web anytime you clicked something it would reload the whole page and everything took ages? Nowadays many sites are trying to be a bit cleverer with their interfaces (some people call this change Web 2.0). myJournal want to be on the cutting edge, and to provide members with a slick site so we’re using some of the same techniques.

For example, when you click the “Add a new member to this site” link instead of the page being reloaded, the form pops out under the link in a most pleasing and modern manner. That’s all due to the power of JavaScript – an often-overlooked and ridiculed programming language. I happen to really like JavaScript, which is why I wrote the Performer library. Performer works with a clever bit of JavaScript called prototype to make putting these modern interface techniques on websites really easy.

Obviously, you have to be a bit geeky to use Performer, but nowhere near as geeky as if you were trying to write all this stuff from scratch yourself.

So, I’ve covered the foundation of myJournal being Wordpress. The database system is MySQL. I code in SciTE and do SQL stuff in the MySQL tools. I also use Performer and prototype to add the interactive sugar on my little digital cake. What else?

Well, as you know I run a flavour of Linux called Ubuntu. But the site needs testing in Windows (as many people worldwide haven’t seen the light, yet). So I use virtual machine technology from VMWare to run a Windows operating system in a window inside my Ubuntu. Clever stuff.

Finally I wouldn’t be without the little browser that could – Firefox. With a selection of special add-ons, Firefox turns into a can’t-live-without tool in my arsenal.

So, there’s a quick introduction to the tools I’ve used to build myJournal. Next time I’ll be talking about some of the great features we have, and how I built them.

no comments so far

myJournal video upgrades

Friday, November 21st, 2008 - 11:51 pm one comment

Wow, long time since I’ve written on here. The reason is I’ve been hard at work making video a much more prominent part of myJournal. You may have seen on the site homepage the new “Featured video” box, and also the “Latest videos” page. We’ve only got half a handful of videos at the moment, [...]

How myJournal was built: Part 1

Tuesday, October 7th, 2008 - 8:25 pm no comments

These next few posts may only be of interest to the three other people worldwide as geeky as me, but I’m going to write them anyway as maybe they will serve as a warning to everyone of what will happen if you spend too long on a computer!
Part 1: My Computer and Free Software
Firstly I’m [...]

Now 99% hack free!

Wednesday, September 17th, 2008 - 9:16 pm one comment

As many of you will have seen, myJournal is built on the wonderful Wordpress platform. I would have called it a blogging system, but obviously we’ve taken it much, MUCH further than that, so it deserves s bigger title. And it’s all thanks to Wordpress’ great plugin system, which means we can take advantage of [...]

Changes ahoy

Monday, September 8th, 2008 - 10:56 pm no comments

There have been some huge changes happening “under the bonnet” of myJournal. Hopefully you haven’t noticed too many things breaking, but we’re aware of some new – and in some cases quite obvious – bug which we’ll be looking at over the next couple of days.
So what are these changes? In a nutshell we’ve rewritten [...]

New community features

Monday, July 21st, 2008 - 7:10 pm no comments

We’ve recently made a couple of changes to myJournal to help people keep up to date with what’s happening with all the members.
Firstly, and you’ll have seen this as it’s actually been live for a little while, is the “Who’s online?” feature on the homepage which shows you which users have been active on the [...]

myJournal Tweaks

Saturday, June 14th, 2008 - 10:40 pm no comments

As is (almost) always the case with sites like this, the tweaks have been coming thick and fast. Some bugs have been squashed, some new features added, some features clarified, some instructions made clearer. We’ll soon have a full list of features available, but for now please click around and see what’s on offer.

myJournal Launched

Thursday, June 12th, 2008 - 10:45 pm no comments

After many months of development, including some late nights (and even early mornings) this new networking site is finally available for public viewing. We’re not fully open to everyone just yet, we’re still in beta (which we’re calling a Public Preview).
I’ll talk more about the features myJournal offers at a later date, my brain is [...]