Excitement

September 6th, 2004

(In case you haven’t noticed, it seems to be a very work oriented evening this evening.)

I’m often a little envious of people who get to work in cool places developing brand new technology and speaking at conferences (and more importantly having more than a handful of people actually care about that area of development). I’ve been in the same job for about 3 years now and while we are and always have been on the very cutting edge of content related technologies (see, not even a cool name for it…), it’s a little bit old hat to me. I’ve beaten my head against all kinds of standards, HTTP, HTML, CSS, XML, Namespaces, XPath, XSD, XSLT, Word - if there’s content written in it, I’ve probably had to deal with it at some point and if it’s at all web related I’ve probably had a lot to do with it.

Now I don’t mean to say that I know everything and I certainly don’t want to imply that I’m any more knowledgeable than anyone else - quite the opposite, I still have a lot to learn and there are a lot of people that I’m constantly learning from.

What I am trying to say however, is that as a product becomes more mature, the coolness factor of it’s development tends to wear off. 5 years ago, the ability to replace a standard text area on a HTML page with a WYSIWYG HTML editor was nothing short of astounding. These days most browsers have (very) primitive WYSIWYG editing modes built in.

In the past week or two however, I’ve gotten my teeth sunk into some awesome new features that once again have me really excited about the technology space I’m in. With the features I’ve put in during the last week or two and a couple of the features that will go in this week and next, our boring little editor is rocketing forward in usability. When Ephox started making it’s editors the general practice was to look at Word, FrontPage and DreamWeaver to see what they did and how they did it then try to find a way to make that possible within the confines of a browser. Now I’m looking at how those programs handle things and finding them lacking and quite buggy. I used to think their behavior was how it was supposed to work and that working out what the user meant was just difficult - I’m really excited to have discovered that’s not the case: most programs are just really buggy and make it look hard.

Now I’m not about to suggest that our product is completely bug free, it’s not - it has a lot of room for improvement (and I’m excited that we’re really focussing on making those improvements happen), but when you look back over the past few years and see the journey that Ephox has taken to get here and follow the progress of the entire content management industry, it’s really quite exciting that we’ve gotten here.

So keep an eye out for our 4.0 release (or whatever the heck marketing decide to call it) when it comes out (waiting on management and marketing to decide what the best time for a release would be and what features we want in it). It won’t be announced on Slashdot and seeing as we don’t really sell to end users and most people don’t read the kind of news sites we do get mentioned on, you’ll probably never notice the release, but I’m telling you - it’ll be awesome. I’m excited.

Java Is Now Officially Fast

September 6th, 2004

I don’t use our product outside of debug mode often enough apparently. Having played around with the wiki system I mentioned previously (you do read your planet’s from bottom to top right?), I suddenly noticed that the progress bar our editor applet shows while it’s starting up wasn’t displaying. Turns out the applet was loaded and ready instantly so the screen wasn’t getting a chance to repaint. Awesome!

This by the way is only on a 1.4Ghz AMD machine with 512Mb RAM so it’s about the average for corporate desktops these days, maybe a little above and it is running the Java 1.5 beta which provided some massive improvements in start up time. Still, our ActiveX based editor doesn’t load this fast. Even better, I’m using an old version of the applet since I didn’t have a recent copy on my laptop when I came home tonight and couldn’t be bothered downloading a new version. It should be a faster still with the performance improvements we’ve put in.

I Love Regex, I Hate Regex

September 6th, 2004

I’ve been playing around with writing a mini-wiki that uses the full compliment of HTML as it’s syntax (instead of forcing me to learn yet another markup language) and use EditLive! for Java as the editor - eating ones own dog food and all that. Frankly, that’s the way a wiki should work, no messing around with mark up at all, just simple, easy to use WYSIWYG markup.

Anyway, I wrote the back end in PHP since we don’t have any PHP examples in our SDK and I couldn’t be bothered working out why perl refused to install the MySQL drivers. Loading and saving from the database is simple enough, and I settled in to make the CamelCase works hyperlinks.

The obvious answer: regex. The obvious problem: working out which regex expression to use (I don’t use regex often since I usually live in the land of custom automatons instead). I’ve wound up with:

    $pattern = "/(\b)([A-Z][\w]*[A-Z][\w]*)(\b)/";
    $replacement = "\$1<a href="view.php?page=\$2">\$2</a>\$3";
    echo preg_replace($pattern, $replacement, $pageData["content"]);

which seems to work but is ugly as sin. It’s seriously cool to be able to achieve that in what’s essentially 1 line ($pattern and $replacement didn’t need to be separate variables) but I’m going to hate myself when I come back and try to maintain that.

I think it should be good enough even though it would break on something like:

<p class="SomeClassName">

I think it’s a reasonable limitation to have that break when “someClassName” would work fine. If the regex were to get any more complex it’d be time to break it down and detect the tags then run the above code just over the actual content.

The other limitation of the current setup would be that you can’t have something like:

Camel<b>Case</b>

because all HTML tags are considered word breaks instead of only block and empty tags. I don’t think it’s worth worrying about for my purposes though.