Tuple space in few words

Recently I got asked by a good friend of mine to lend a hand on a project he is running, SemiSpace. SemiSpace is a light weight open source implementation of Tuple space / Object space. I've only had a vague understanding of what a space is, so my first task was more or less to wrap my head around it. I am a straightforward guy and like simple examples. But I did not find many good articles explaining a space in a simple manner. In this post I will try to do so.

Read More

SVG embed and performance

Lately I've been able to look into SVG in web pages a bit deeper and while writing an article for my blog I decided to use SVG for the illustrations. It is possible to apply a solution where browsers supporting SVG get the SVG and browsers not supporting SVG will get a fallback to a PNG image of the SVG. It turned out this fallback solution come with a performance drawback in most browsers supporting SVG.

Read More

HTML 5 audio element and streaming

HTML 5 introduce the audio element and browsers does providing us with a native audio player for playing sound. This is a test on how well different browsers support streaming trough the native HTML 5 audio element.

Read More

Why you should validate

Opera displaying invalid html document

In writing the year it's almost 2010. HTML should be well known by most developers by now. Despite this; I do still see people ignoring validation errors. As late as today I talked to a developer who found it very odd that invalid mark-up do render different in different browsers. There is nothing odd about that. Each time I am confronted with this topic I always run this simple example to illustrate what is going on.

Read More

Code sniplets – part I

I do collect sniplets of code. I have them all over the place. Almost every time I read about or bump into a technique, pattern, tests or new way of doing things I find useful of interesting I tend to test it out on my own. Mostly for my own curiosity but also because I learn and understand the concepts easier this way. These sniplets are small isolated bits of test code with comments more or less meant only for my self. Lately I've had some time to start to organize some of those sniplets and write a bit more out filling comments and tests on them than I usually do. Here are the first couple of sniplets.

Read More

Pitfalls to watch out for when creating Edge Side Includes

When creating Edge Side Includes (ESI) there are - as pointed out earlier - pitfalls one can fall into. Falling into such a pitfall will definitely reduce the effects of applying ESI so it's important to try to avoid doing so. There are no strict rules for what defines a pitfall, but in this post I will try to give some example for what to look out for and how we can try to work around them.

Read More

How to create a var attribute on scriptless tags

JavaServer Pages 2.0 have a feature called Scriptless tags. Scriptless tags are in a way traditional taglibs but written i JSP and they do provide a good feature to JSP. I must have written tons of JSP during the years and I am not gonna discuss JSP in general here but I've always found the JSP documentation kind of unintuitive and lacking good simple examples on some issues.
It might be my search phrases which are poor, but one such issue I've newer found a simple example on is the simple task of defining a var attribute on a scriptless tag. So here is my note to self example on creating a scriptless tag with a var attribute.

Read More

What to think of when creating Edge Side Includes

In my previous post I wrote about Edge Side Includes (ESI) and how ESI can have huge benefits on the server side. The trick about ESI is to be able to serve parts of a web page as fragments and then let the ESI enabled proxy include these fragments into a whole page. One natural question when dividing a page into fragments is what should go into each fragment. There is no straight answer for this question and the answer will be different with each case, but I think there are some simple rules one should keep in mind when dividing a page into fragments for ESI inclusion.

Read More

Edge Side Includes explained simple

Edge Side Includes, or ESI, are a technology which has been around for many years. Lately I've been working a lot with component based web development where ESI have been used and seeing the benefits ESI have on the server side, have made me wonder why ESI aren't more used. I do also find a lot of developers, specially web developers, go kind of whoooot?!? when mentioning ESI so in this article I will explain what ESI are and what the benefits it provides.

Read More

Bootstrapping JavaScript functions

At the moment I am working on a small JavaScript project which does interact extensively with the DOM. One goal in this project is simple integration with the document it shall work on. The preferred way of injection will be to just include the script in the head of the document and then the script does its "magic". This requirement combined with extensively interaction with the DOM does provide some challenges. The main issue which needs to be challenged in such a combination is to be sure the DOM are ready before the script starts to interact with it. Another challenge in this project is that I cannot use any of the JavaScript frameworks around. I ended up writing a bootstrap script.

Read More