Freja – a JavaScript framework for in-broswer MVC applications

This looks really neat. A small JavaScript framework for setting up and running a single-page XML/XSLT application which fetches model data and view definitions from a server and combines them using JavaScript controllers. Once the data and views are loaded the application can run with no server latency, limited only by the ability of the browser to process XSLT and JavaScript.

Freja – CSScripting.

My personal preference would probably be for models in JSON rather than XML and a view template language a bit more developer friendly than XSLT, but this seems a good implementation nonetheless.

ecoder – an in-browser programmers’ editor

This is a neat idea, and certainly more friendly than “keyhole surgery” with ssh and vi if you need to edit files on a remote server over the web. Does not seem to have had a lot of development recently, but seems pretty usable as it is.

ecoder | home

Fun with very strict TDD

I use Test-Driven Development (TDD) every day, and find it very helpful. It can be hard to get to grips with, though. I was pleased to read that acceptance-testing pundit Gojko Adzic had fun with some very strict TDD rules.

Gojko Adzic » Thought-provoking TDD exercise at the Software Craftsmanship conference.

My approach to TDD is really quite similar to these strict rules. I’ll admit that I do (sometmes) cut a few corners. The biggest aid to getting the most from TDD is definately good refactoring tools. Without that the whole thing becomes so much more clumsy.

TDD is very comfortable with Java and Eclipse. Recently I have moved out of that comfort zone into some fairly deep JavaScript work, and really miss the ability to automatically extract or move methods etc.

Options for developing mobile apps: PhoneGap, Palm Pre, etc.

Mobile application development is certainly a hot topic at the moment. People seem to be climbing over one another to produce iPhone apps, and Google’s Android is never far from the tech news. But there are also other players, and several want to enable a more familiar web development experience on mobile devices.

SitePen Blog » PhoneGap, Palm Pre, and the State of Mobile Apps

Who needs Flash? Having fun with Canvas and SVG

Ever since the dawn of the web, the lack of a symbolic graphics format has been a glaring omission. I’ve never been very comfortable with the only option being to step outside the browser and use a plugin such as Flash, Silverlight, or a Java applet.

Now, eventually, it seems that support for, adoption of, and frameworks to use one of the contenders, SVG, are finally taking off. Take a look at these examples built using SproutCore and SVG:

Ajaxian » Who needs Flash? Having fun with Canvas and SVG

A few JavaScript rich UI links

SmartGWT UI component library a blogged description and another one or go to the horse’s mouth and see the project page.

MochaUI is a whole desktop or content management system or something. See MochaUI in action here.

window.name Transport

This seems obscure, but potentially useful. It seems that the window title javascript attribute persists, even when the window it is describing changes from one URL to another. This in turn allows a script form one site to populate it, and a script from another site to read it. A sneaky way round some of the limitations of cross-site scripting (XSS).

SitePen Blog » window.name Transport

Javascript code prettifier

Here’s a neat little thing which I heard about on the Stackoverflow podcast. I can already think of plenty of uses for it. A general purpose code “prettifier” which detects, lays out and highlights the syntax of a range of programming languages. Looks simple to include in the JavaScript of any page which might be displaying code.

Javascript code prettifier

XSS (Cross Site Scripting) Cheat Sheet

A fascinating collection of possible cross-site-scripting vulnerabilities. Potentially very valuable for anyone developing a web application which allows text input.

XSS (Cross Site Scripting) Cheat Sheet

Segmentation by Freshness

Martin Fowler’s “bliki” is often an interesting read. This recent article is very thought-provoking, offering a clever way to bridge the gap between fully dynamic and fully-static web pages.

In regular web development, there is a stark choice between marking a web page as fully dynamic (typically by adding a sprinkle of “don’t cache me” headers) and marking it as static and unchanging. Dynamic pages can bypass web-caches to provide up-to-the-minute information, but force the server to handle the load of every request from every user. Static pages gain the speed and scalability advantages from distributed caching but can fall foul of many problems including stale data and user-session-confusion.

Fowler proposes a technique of using separate HTTP requests controlled by JavaScript to fetch dynamic page fragments and merge them with the main, static, content.

The new bit about this is the solution of using JavaScript to fetch fragments and modify the HTML. The overall approach has been used successfully since the dawn of modern web browsers. – it’s very similar in concept to the way the old faithful “img” tag has always been handled.

MF Bliki: Segmentation by Freshness

SoundManager 2: Javascript Sound for the Web

Oddly enough, some colleagues have been working with integrating progressive sound into web pages. This looks like a really neat JavaScript/CSS API for such stuff.

SoundManager 2: Javascript Sound for the Web