Archive for the 'Applications' Category

Everything that’s cool - web2.0

Monday, April 24th, 2006

I couldn’t resist posting this enormous list of web 2.0 applications. Web 2.0 is ofcourse a very generic term saying close to nothing; but then most of the sites that qualify as Web 2.0 are mostly interesting anyway because of their well-written HTML code, nice CSS solutions or clever Javascript effects. So if it is new to yo, have fun with it!

Using JSON to create your DOM elements

Saturday, March 4th, 2006

While working on a webapplication using AJAX technology I found myself reading XML and writing that to the DOM; but doing that is really frustrating. Check out this hideous piece of code I needed to create a simple element:

var dom_item_date, dom_item_title_text, dom_item_title_link;
var dom_item_content_text, dom_item_title, dom_feed_item;
dom_item_date = document.createElement('dt');
dom_item_date.appendChild(document.createTextNode(item.getFirstValue('pubDate')));

dom_item_title_text = document.createTextNode(item.getFirstValue('title'));

dom_item_title_link = document.createElement('a');
dom_item_title_link.href = item.getFirstValue('link');
dom_item_title_link.appendChild(dom_item_title_text);

dom_item_content_text = document.createTextNode(item.getFirstValue('description'));

dom_item_content = document.createElement('p');
dom_item_content.appendChild(dom_item_content_text);

dom_item_title = document.createElement('dd');
dom_item_title.appendChild(dom_item_title_link);

dom_feed_item.appendChild(dom_item_date);
dom_feed_item.appendChild(dom_item_title);
dom_feed_item.appendChild(dom_item_content);

So I wanted a different setup. Reading about JSON I assumed there was an easy way to put JSON object in the DOM. The only one I found is this script. However; the example still seems a bit too long, with redundunt stuff in it. So I decided to create an alternative. Check this out:

var feed_item = {
	dt : {
		_text : item.getFirstValue('pubDate')
	},
	dd : {
		a : {
			href : item.getFirstValue('link'),
			_text : item.getFirstValue('title')
		}
	},
	p : {
		_text : item.getFirstValue('description')
	}
}

var dom_feed_item = Object2DOM(feed_item);

Can you believe that this easy-readable script does the exact same thing that the first script did? This is really going to add joy to my Javascript-DOM coding! You can download the Object2DOM script here. Everything should be quite intuive; the only thing special is that you need to name your attribute ‘_text’ if you want a textnode to be created. Also; since the Object specification requires you to have a top-level element to hold all the sub-items; I am currently converting this top-level element to a <span>, but this can be changed easily inside the script.

MVC - nothing new there is it?

Thursday, January 5th, 2006

Reading MVC and web apps: oil and water after discussing about MVC today I think the article is pretty much right about MVC. At the office today we pretty much concluded that MVC was nothing more than a strict separation of your database, templateparser and actual engine just ‘doing’ the rest. This strict separation prevents spaghetti-code and unstructured calls between the various aspects of these elements of MVC. However, this separation should be common among web developers and there should be no need to call it MVC. It’s the same as “Don’t use registered_globals in your application”. This undefined fuzz about separation I like the comparison between where we are now, and where we were two years ago, it makes you wonder what the web will be like in 2007 :)

PS, haven’t read about CRUD yet? You should!

Y - When a good alternative dies

Sunday, December 25th, 2005

The open-source community being dynamic, popping up new alternatives all the time, doesn’t mean there automatically is a wide choice of software available. It just means a lot of ideas get worked out to a website, some sample code an maybe even a working application. Take Y-Windows for example. Y was created as a from-scratch implementation of X which is bloated, old and started to suck-and-scare more people. A mailinglist was set up, a wiki appeared, and although the idea was good and there were some very interesting discussions; things died with the main developers saying they were working really hard on some ‘very-good’ ideas which never seemed to make it to the actual CVS tree. Fortunately there are also people working on improving X instead of rewriting it, thereby avoiding major compability issues. I assume new projects don’t just need to be hyped, they need people open to new developers and ofcourse: Release early. Release often. And listen to your customers.

Songbird Media Player

Friday, December 23rd, 2005

The very promising XUL based iTunes clone Songbird has delayed it’s 0.1 release date with ‘a few weeks’. It seems as if a designer with XUL experience started this project, but when it came to actually programming it, things went wrong. What would be a better explanation for a sudden ‘few weeks’ delay? I can’t find their subversion or CVS repository neither so helping them out isn’t really easy. Anyway; the screenshots look even better and we still cannot wait for this project te give birth to it’s first public release :)

Songbird XUL based Media Player

When speed matters

Thursday, December 22nd, 2005

When developing a dynamic web-application it is very useful to program your own cache-implementation. Make sure your clients don’t download information they already have, thereby increasing the speed of your application. To check if your application’s caching headers are correct the Cacheability Engine is a very useful link to have in your bookmarks!

RoundCube Webmail

Monday, December 12th, 2005

Even though RoundCube is officially still in alpha phase it is a very usable webmail-client; replacing my previous SquirrelMail client, which is everything RoundCube is not. RoundCube uses AJAX combined with the Ilohamail IMAP classes, while Squirrelmail uses it’s own backend (which is faster) combined with a frontend based purely on HTML tables. Although Roundcube suffers some performance issues, it’s clean PHP code and templating system make this a very nice webmailclient with lots of potential.