Thu Oct 18
If you want unobtrusive JavaScript on your page and don’t know where to start, try my recently updated Performer library.
It gives you a good selection of many of the basic features you want from JavaScript - easy AJAX, toggling the visibility of elements, resizing elements and many more. And all of that is done in an unobtrusive, degradeable way so if the visitor doesn’t have JavaScript they can still use your pages.
I’ve recently added two more functions:
- Editor
- Turns any simple text element (
H1, H2, blockquote and many more) into an inline form when the text is clicked. This allows you to provide in-place editing for short pieces of text (usernames, password etc.).
- Prompter
- Adds a piece of text to a
textarea or input type="text" element to prompt the user on what they should type in. The text disappears when they click into the element, and reappears if the box is still empty when they click out.
See demos of all the functions here, along with full documentation and the Performer JavaScript file.
Sat Oct 6
It’s been a long time coming (in fact the bulk of the work was completed nearly a year ago), but the new Computers Unlimited website is finally live. Among the fresh features is a special offers page for toner, printer ribbons and ink cartridges, a printer consumable search and even a blog.
The website has been written using my e-commerce system, called TwistShop for reasons which shall become clear soon. Eventually I hope to offer this as an easily-deployed application to my clients, along with my content management system TwistCMS and the projectGenie project management system. The fact that these three cornerstones of my website development services have been built for real websites doing real business, not just on a whim, means that when someone approaches me to help them get the best from the web I have the tools available to do so.
So, if you’re looking for Brother toner and ink, Panasonic printer ribbons or Xerox fax supplies you now know where to go.
Thu Oct 4
I saw this a little while ago and thought it was excellent. If you are developing a website, and especially if you want to be part of the Web 2.0 thing, pay attention to this: A Web 2.0 Strategy Slideshow « Paul Lomax - Two Point Oh.
Sun Sep 30
I’ve been doing a bit of reading lately about the correct way to store passwords, normally in a database. Obviously keeping passwords in plain text (i.e. no encryption) is A Bad Thing for obvious reasons. We’ve all done it at some point, but now is the time to stop.
The secret to getting over the “dunce” level of securing passwords is to use more than just a hash of a password, and instead throw a little salt into the recipe. A salt is basically an extra ingredient that mixes up your hashes and makes them bitter to crackers. Am I taking the analogy too far? Yes, yes I am.
So, I suggest the following (this is in PHP):
md5(md5("password") . "password");
Why? Well, it’s really easy to understand and implement. It means you don’t have to store the salt for your hashes anywhere - the password generates it’s own. Plus every salt is different. Plus it’s a constant length.
I’m not pretending it’s the most secure way in the world to store passwords, but for a better-than-average method it’s pretty good. Or I think so, at least. Any comments?
Tue Sep 18
Everyone knows I’m a fan of the Prototype JavaScript framework. But even I realise that for a novice getting the best out of it can be a daunting task. So I wrote a simple library called Performer to allow you to use some of the Prototype features without writing a single line of javaScript, instead using CSS rules.
There’s now another way for people to get started with Prototype using Protoscript, a simplified language that gives you lots of nifty features such as fading, drag-and-drop, toggling and much more. It looks good, although it like many JavaScript libraries (except mine, fnar fnar) it doesn’t provide you a way to separate JavaScript from HTML without some extra work. Still, the drag and drop thing is cool.