My Latest Thingy

August 28th, 2008

I’ve just been up most of the night developing my latest idea into a demonstration. The idea is a centrally-hosted Content Management System which can be dropped in to any existing web page (whose server supports php or python scripts.) I’m calling it “breeze.” Here’s the scheme, currently:

Users can sign up for an account. After this, they can define sites, then content areas, and then content. Each content area has a unique id and supplies to the user a small piece of php code to drop into the site:

$breeze->showContent(2);

Users include a script file provided and initialize the $breeze object with a secret key in the header of the page. Then, they can create as many variable content areas as they like. Content is served to these content areas from the central server.

No knowledge of PHP is necessary, save knowing whether your web server supports it.

Web designers will be able to provide clients with a login to let them edit content areas on their site, without having to design for a template as would be necessary for other CMS systems, such as Wordpress, Joomla, Drupal et. al. In effect, the CMS gets customized for the design, rather than vice-versa.

How It Works

The trick to this is a php socket connection to the Breeze server. In this Test Page, the gibberish on the page actually comes from a socket connection between adambard.com, located on a server somewhere in Texas, and my laptop in Victoria via dyndns. This service is superior to existing javascript-based options of a similar nature, due to the fact that it still allows content to be indexed and searched. (Edit: Proof)

In the future, I might provide an open-source admin interface that could be deployed on any given server, allowing anyone to serve—no, not serve… breeze*. Users will be able to breeze content to their clients, or even their own pages.

I think this could be a valuable service to any web designer or developer. What do you people who occasionally stumble across my blog searching for god-knows-what think?

*Everyone knows the secret to internet success it to turn your company name into a verb.

FreeNAS: Quick, Easy Fileserver

August 26th, 2008

FreeNAS (Network Attached Storage) is a BSD-based file server. It features a web GUI for easy configuration, a small footprint, and a whole bunch of features. Plus, it has quite reasonable community documentation. It’s easy and quick to install and boot. If you have a spare computer sitting around somewhere gathering dust, and that computer happens to have at least 96 MB of ram and a 300 MHz processor, you might just have the makings of a full-featured file server in your basement.

Why Have a File Server?

There are a myriad of reasons to maintain a file server, although this all depends on who you are and what you want to do with it. Myself, I enjoy having one for the sake of having one, although the backups sure are nice.

Backups

This is the primary reason for having a fileserver, and with this in mind FreeNAS comes with built-in support for rsync and unison, two popular backup tools. Both will mirror your files, and have the noteworthy advantage of only copying changes to your files, meaning that while your first sync will be slow while you copy everything over, subsequent ones will be really fast, as only files you’ve edited or created will be uploaded. I only have experience with rsync, but it definitely seems to do everything I ever dreamed of in a backup server. You can even set it up to back itself up!

Linux users are obviously at an advantage with rsync, but Windows users have access to a number of rsync implementations too, I’m told. Unison apparently works perfectly well on both.

Sharing Network Files

If you have more than one computer in your home, even if it’s just a desktop and a laptop, you will enjoy the benefits of having a single place for (at least some of) your files. Multimedia, music and movies and the like, strike me as something user-agnostic enough to benefit from being shared throughout your house. This will provide a centralized place to store all your really big files that would otherwise be taking up space on your laptop.

Remote Access

FreeNAS also boasts an SSH and an FTP server, which means you can share your files no matter where you are, as long as you have internet. SSHFS, a way to mount ssh connections as drives in linux, provides a particularly appealing way of doing this. You can also backup files over the network

If you have cable internet, you’ll probably need a DNS service like dynDNS to keep your ip up to date and provide a domain. However, FreeNAS will even do that for you!

How-To

I just installed the thing yesterday, I’m not nearly qualified to help you with that. Fortunately, a pretty decent setup and user guide exists already, which certainly saves me some time.

Don’t Use JS’s for(i in object) in Internet Explorer

August 13th, 2008

Just don’t do it. Use for(i=0;i<object.length;i++), please!

I spent about 30 minutes trying to figure out why IE wouldn’t recognize instanceof HTMLElement or nodeType, only to realize that my for(i in object) loop was just spitting out garbage.

ARGH! I HATE YOU INTERNET EXPLORERRRRRR!

Blueprint.css: You’re Just Fooling Yourself.

August 9th, 2008

Blueprint.css is a “css framework” which makes it easy for you to lay out your page with however many columns you like, without even looking at the css. It works by instituting a 950px wide container around your page, and then dividing this into 24 columns. You can add a ’span-x’ class to any div to make it span x columns.

The Good

Blueprint makes it really, really easy to add columns to your page. You just decide how many columns you want the area to span, and add that class (keeping in mind to add the ‘last’ class to the last element in a row).

Blueprint also sets many sensible options for line spacing, fonts (arial), lists, and other things, making the defaults a bit prettier. It also includes an ie.css file of its own, to include in your page to correct some IE bugs, which is convenient.

The Bad

Blueprint marries you to a 950px fixed-width layout, which may or may not be ok with you.

I did notice one IE bug where list elements in an <ol> had the numbers cut off, which a client complained about. It just needed a bit of extra left margin is all.

The Ugly

The real evil of blueprint.css is that it tricks you into thinking you’re being a good designer, seperating content and behavior and layout in html, js and css like a good designer should. However, all the column-defining classes live in the HTML, and have names with no semantic meaning; just, ’span-24.’ In reality, blueprint.css is table-based design with a different syntax.

If you were to do the right thing, and call the left sidebar ‘left-sidebar,’ the content ‘content,’ the header ‘header,’ and the menu ‘menu,’ you could reorganize everything without having to change any HTML, which is doubleplusgood if you have a lot of pages to change.

Instead, in a few years, when you want to redesign your site, you’re going to have to change each of the elements you told to span-x to either span something different, or remove it.

I know it seems easy now, but so do tables. Do the right thing, and you’ll be happier later.

I’ll keep using blueprint though, I do my separation using PHP. Thanks, blueprint guys!

Imagine This.

August 9th, 2008

An online service that would remain connected to MSN/AIM/Jabber networks whenever you’re not online (With some sort of different status), delivering messages sent to you to your email inbox every 10 minutes or so.

That would be cool. I should do that.