Okay, I still don’t have a full working version of Movable Type up and running yet. (I’ve got the blog creation and edit screens working on Windows, but the pages aren’t rebuilding yet. Something to do with the Unix.pm module.) But from what I’ve seen so far, it looks really good. The code is well constructed. The content creation interface is slick. And the things you can do with it look to be the kind of things I want to do with Sunpig.
Messing around with blogging tools.
I’ve got a test installation of Greymatter going, and I’m trying to spin up MovableType as well. Now I need to figure out if I can make these tools do what I want, or if I need to proceed with my own weblog implementation.
Sunpig is currently built on PHP/MySQL. Using the web editing interface, we can create day entries, and we can edit the left-hand sidebars. There’s a file upload function, but it’s not really usable in its current format.
What we can’t do is easily change the format of our log pages, or archive pages. We also can’t use the interface to create new static pages, although I suppose that a fixed pointer to a past daily entry would suffice.
I’ve looked at, and discared the idea of using Blogger or Frontier (or a Frontier-based service like EditThisPage.com). Both of them give you a very snazzy web interface for creating and editing your blogs. I would like the blogging tools to reside at sunpig.com, though. Blogger will allow you to publish to any site you like, but the tools remain at Blogger.com. And in order to get Frontier installed on sunpig.com, I’d probably have to invest in a dedicated server, which is waaay too expensive.
Greymatter is interesting. It’s a set of Perl scripts, which you place on your own site (provided you can run cgi scripts). These scripts allow you to create and edit your blogs in a very flexible manner, using templates.
I love the whole template thing. If I decide, in the end, to write my own tools for doing the sunpig logs, I will definitely be building a template-based system.
Greymatter has a number of disadvantages, though. First of all, its method of data storage concerns me. For each day entry, it stores both a .cgi data file (containing the text of the entry), and an HTML file, which contains the text with all your templates applied to it.
From the point of view of serving up your files, this is great. All the hard work is done when you apply the template (when you edit the file), and when someone requests the page, all the web server has to do is serve up a single file. The downside is that if your templates are large, each HTML file will take up a large amount of space. Say each page is 25K (not difficult if you include the HTML for a calendar). After 40 entries, you’ve used up 1MB of space, regardless of how big those entries were.
We’ve got 100MB to play with on Sunpig. This may sound a lot, but it gets eaten up very quickly by the amount of photographs we’re putting up. We’ve already used up close to 25MB. I can easily see us running out of space within a year if we don’t manage this carefully. I’m reluctant to just trade off space for performance, when this is really just a family site. It only gets a couple of dozen hits a week.
Secondly, the process of updating and re-applying templates across all files seems prone to errors, and to screwing up your site. You’re not allowed to interrupt Greymatter while it’s performing this update. I’ve heard stories of this going badly wrong, due to simple things like a modem dropping a connection, or accidentally shutting down your web browser.
I’m convinced of Greymatter’s flexibility: in that regard it is great. You can run as many instances of it on your site as you like, and this is probably how I would do our web logs vs static articles. But I am not convinced of its robustness and reliability. Noah Gray, who wrote it, has said that he won’t be producing any new versions (at least, for now).
There is an active community of users who appear capable of fixing most things that go wrong, though. And because you download the code and put it on your own web server, you can edit the code yourself.
This, however, is another reason for mistrusting the application. The code is horrible. It’s one monolilthic cgi perl script, full of variables, constants and functions with nondescriptive names like “thomas” or “FUNNYFEETRELEASE”. Just thinking about it makes me shudder.
However, despite it all, the blogging interface itself is relatively easy to use. Which may well be an overriding requirement for Sunpig.
I’ve only really started looking at MovableType this evening, and I don’t have a working installation yet, but certainly the code behind it looks better. It has the disadvantage of being a 1.0 release, but the folks who developed it look like they’re actively progressing new releases and bug fixes. Which can only be a good thing.
I don’t know how its file structure works yet, but I’m going to play about with it some more, and we’ll see what happens.
Both of these sources are aggregation services: they gather together high quality links and references into a handy digest. Most of the time, they concern themselves with technical matters (software programming and usability), but their authors always include other information where they find it interesting or pertinent. Over the last week, most of their focus has been on the attacks in the US, and on the world’s response.
On another note, I really need to do more work on the blogging tools for Sunpig. Yesterday evening Abi lost a bunch of stuff she’d been typing in because she pressed the backspace key when the focus was outside of the editing text box. This was the equivalent of pressing the browser “back” button, and suddenly all her text was gone.
I’m thinking about adding a “hold” and “released” status (radio buttons) to the editing. With the status set to Hold, you could click Save, and your text would be saved to the databasem but not displayed on the main web log page. You’d have to explicitly release the text before it was published. Updates to existing stuff would be similar: with the status set to Hold, you could update your stuff, and save changes to the DB, but not publish them until you’re ready.
The alternative it to create a scratchpad area, like they have on E2. Both options would allow me to put in a “preview” feature as well.
Added a new feature to the sunpig weblogs: we can now edit the sidebars (the chunks of stuff on the left of this page) in the same simple way as we can edit these diary entries.
This may mean that I’ll keep my favourites relatively up-to-date, but probably not…
Still need to get the photos from Susan’s visit uploaded!
Fixed the home pages and edit pages so they work properly in Netscape 4
now. It’s not identical to what you see with IE4+, but it’s close enough.
Life’s a lot easier (and faster!) now that I’ve got a development version up
and running locally on my PC now. With a combination of MySQL, Apache, and
PHP all up and running on Win98, I can write identical code and deploy it to
the Linux box hosting www.sunpig.com!
New home page! PHP! MySQL! Database-driven! Easy to update! Automatic links to Everthing2
What is the world coming to?
This does prove to me, however, just how easy PHP is to use. It took me well over a week to do the initial “dynamic” version of the sunpig site in perl/cgi, and it didn’t work nearly so well. I started this new version yesterday (Saturday) afternoon, and by evening I had the edit facility all ready. Today I tidied up the calendar, and did the home pages, so they display n day logs.
Over and done with in a single weekend!
Of course, there are still a whole bundle of improvements to be made:
- Put a “today” button on the calendar (particularly for the edit screens)
- Bring the sidebars into the database as well, and make them editable too.
- Allow uploading of images through the edit interface
- Allow user to set how many logs should be displayed on their home page
- Automated backups of the database.
Then, of course, there is Amazing But False to automate as well…
Also, the code is all over the place, and could use to be tidied up. But seeing as it’s my first attempt at PHP and MySQL, I figure I can only get better from here.