Archive for December, 2007

I think a quick – 15 minute, code-generating, CLI demo would be a boon for Zend Framework adoption.  We’re using quite a bit of the Framework where I work and it’s been quite helpful.  Hearing that this will be in place for the 1.5 release is good news.  The 1.5 version of the Zend Framework is due first quarter 2008.

I recently read about a new Mozilla Labs project called Weave.  The basic premise is that it will store information securely on Mozilla’s servers.  Currently, it only backs up bookmarks and browsing history.  Two of the many things that the Google Browser Sync add-on already does.  It’s a very early on 0.1 prototype release, so there is still a lot that can come of it.  Eventually, it will be able to back up anything an add-on would like to store remotely.  That’s the theory at least.  Overall, I’m fairly interested in the project; I’m curious about how Weave will play with technologies like OpenID.

Apparently a MooTools developer was removed from the dev team for some immature ranting/raving about other Javascript frameworks during a presentation. Good. The co-founder of MooTools recently apologized on a blog entry for the whole situation. Good for him, too.

At work we use tons of open source software. Off the top of my head, I can name15:

  1. Gentoo, both desktop and server
  2. Apache 2
  3. Subversion
  4. MySQL
  5. OpenLDAP
  6. Zend Framework
  7. phpMyAdmin
  8. phpLDAPadmin
  9. MediaWiki
  10. Aptana
  11. PuTTy
  12. Mozilla Firefox
  13. Mozilla Thunderbird
  14. Open Office
  15. trixbox

That last one, trixbox, made the news recently when it was recently discovered that the software contacts a Fonality server once every 24 hours by itself. This process sends information about the hardware setup it’s running on and a few configuration details. This is all done via allowing a remote server to execute root-privileged commands on the local box. You can read this forum thread for more details.

The problem here is mainly that no one knew any of this was happening.  So, naturally, when people find out about it, they feel duped.  Now, this certainly should have been a better described “feature”, sure.  But, I’m not overly concerned about it.  The script doesn’t gather anything like phone numbers or email addresses.  The theoretical problem is if this “feature” was abused in some way.  It looks like their in the process of updating this part of their system and I’m satisfied with the changes they’re making to correct the potential problems with it.

So, 24 Ways is here again this holiday season. If you don’t read 24 Ways, you really ought to. It’s an advent calendar for web geeks, touching on varying topics relating to development, design, typography, accessibility, and lots of stuff in between.

Day 4 was entitled, Capturing Caps Lock. Stuart Langridge presented a really smart way of capturing whether or not the Caps Lock key was on when entering a password. How handy?!

A lot of the JS development I’m doing nowadays is done via the Ext JS Framework. While Stuart’s code is quite usable, I found it hard to quickly scan the code. It’s not that I don’t understand it, it’s just not that readable. Since I’ve already got the Ext JS Framework on the pages I’d be using something like this Caps Lock checker, I figured why not just re-write it with some Ext functions. This helps in a lot of ways, such as being easier to scan through and less overall code. I think I cut his code in half. That being said, I’m also including the necessary Ext .js files.

Below is the code itself:

var CapsLock = {
	init: function() {
		var id = Ext.id();
		this.alertBox = Ext.DomHelper.append(document.body,{
			tag: 'div',
			style: 'width: 8em',
			children: [{
				tag: 'div',
				style: 'text-align: center; color: red;',
				html: 'Caps Lock is on.',
				id: id
			}]
		}, true);
		Ext.fly(id).boxWrap();
		this.alertBox.hide();
		var pwds = Ext.query("INPUT[type='password']");
		for(var i = 0; i < pwds.length; i++) {
			Ext.get(pwds[i].id).on(
				'keypress',
				this.keypress.createDelegate(this,pwds[i],true),
				this
			);
		}
	},
	keypress: function(e, el) {
		var charCode = e.getCharCode();
		if(
			(e.shiftKey && charCode >= 97 && charCode <= 122) ||
			(!e.shiftKey && charCode >= 65 && charCode <= 90)
		){
			this.showWarning(el);
		} else {
			this.hideWarning();
		}
	},
	showWarning: function(el) {
		var x = Ext.fly(el).getX();
		var width = Ext.fly(el).getWidth();
		var y = Ext.fly(el).getY();
		this.alertBox.setXY([x + width + 6,y]);
		this.alertBox.show();
	},
	hideWarning: function() {
		this.alertBox.hide();
	}
}
Ext.onReady(CapsLock.init, CapsLock, true);

You can see a working example here or download the Caps Lock script here.