Computers, Google, Javascript, Programming, Technology, Web Programming, XML

ASP.NET Atlas really is like Backbase

<![CDATA[It turns out that ASP.NET might not suck after all. Atlas for ASP.NET is a toolkit for doing AJAXy stuff.

Well in fact it is quite a bit more than that. It has many features of the Google Web Toolkit (except in ASP.NET instead of Java) including serializing server side objects for use client side use.

Interesting it also has a lot in common with Backbase. It allows you to embed some nifty XML to define a user interface which is then interpreted by the Javascript to render real (X)HTML.

The final irony is that it’s pretty much free. Since it’s .NET, to really use it you need Visual Studio, but the Atlas part itself is free and should be perfectly usable with the Express version of the Visual Studio projects.

ASP, ASP.NET, AJAX, Javascript, XHTML, HTML, .NET, dotNet]]>

Computers, Entertainment, Games, Programming, Technology, Video Games, Web Programming, XML

PSP browser support

<![CDATA[With my broadband connection came a wireless network. So I tried browsing with my PSP. And it is a lot better than I expected. Except when browsing my own blog 😦

I figured the easiest way to make it work was to send it the XHTML Basic version. So you should now be able to browse my site with a PSP without any hassle 😀

Detecting the PSP browser

Detecting a PSP is really easy. It sends a custom HTTP header: HTTP_X_PSP_BROWSER which contains the firmware version. Just check if that header is set. In PHP you just need to do:

if (isset($_SERVER['HTTP_X_PSP_BROWSER'])) $psp = true;

Sony, browsers, XHTML, PlayStation Portable]]>

Computers, Google, Javascript, Programming, Technology, Web Programming, XML

Now Google push AJAX development

<![CDATA[I recently posted about BackBase, an expensive (for commercial use) AJAX development thingy*. Well Google have produced something similar for free Google Web Toolkit.

Although the end results are the same (as far as the user is concerned) there are important differences. The BackBase software is entirely client side. You write server stuff as normal, output BackBase code and the browser with JavaScript handles everything. The Google system is client and server orientated and odes more work on the server. The server also has to be running Java. It also has better browser support.

This could be a reason for me to learn Java, something I’ve managed to avoid for quite a while now…

* It’s actually an XML based markup language combined with a real time JavaScript processing engine.

Backbase, AJAX, WebToolkit, GWT, Java]]>

Computers, Google, Languages, Programming, Technology, Web Programming, XML

German flip cards Google gadget

<![CDATA[I've created a clever German flip card gadget for Google homepage. It displays a German word for a few seconds and then shows it’s translation. And then repeats with a new word. The vocabulary is very small at the moment but it will increase by at least one per day.

At the moment it also limits itself to 5 words per viewing. That is after showing five cards it loops (if it didn’t you’d never actually begin to memorise them).

Google Homepage

To use Google personalised homepage, you must have a Google account. When you have one, go to “Personalised Home” (links for that and to create an account are in the top right corner of Google’s homepage).

Adding the Gadget

From your personalised homepage, click “Add Content”, then “Create a Section” and then put the following URL in the box: http://www.oliverbrown.me.uk/gadgets/flip.xml . Then just click “Go” and you’re done 🙂

If anyone is interested I might extend the idea to be more flexible.

German, flip cards, Leitner]]>

Computers, Google, Programming, Technology, Web Programming, XML

So where are the Google gadgets

<![CDATA[If you use Google personalised homepage, you can add Google gadgets to them. A Google gadget is just an XML file (or more usually the XML output of some dynamic page) that is displayed. There is a well developed API and you can do quite a lot of nifty stuff with them. But they don’t seem to be that popular (searching for Google gadgets, with Google gets very few relevant results).

There are quite a few in their gadget directory but very little mention of them outside Google…]]>

Computers, Javascript, PHP, Programming, Ruby on Rails, Technology, Web Programming, XML

BackBase really pushing AJAX

<![CDATA[BackBase is another AJAX toolkit. This one is different though. It’s not really an AJAX toolkit, more a toolkit powered by JavaScript taking advantage of AJAX. The clue is the price. Yes it has a price – $2000 to be exact. There is a “community edition” that is free for personal use though.

Anyway, I don’t have time to run down all the features but basically it defines a whole new bunch of tags allowing you to create complicated content in a declarative HTML style way. These tags are then translated into proper XHTML on the fly by the back end JavaScript engine. Since the clever work is actually handled by the browser, you’re free to use whatever you like on the server (PHP, Ruby) including static HTML pages – outputting BXML is no different to outputting HTML.

In fact BXML has a very ASP.NET feel to it and embedding BXML into an XHTML page along with ASP content could have the ultimate cleanness about it (syntax isn’t one of my complaints about ASP.NET). It should be noted that Microsoft are working on Atlas which could be something very similar but I haven’t looked into it…

It all seems very clever.

BackBase
BackBase Demos
ASP.NET Atlas

ASP]]>

Computers, Javascript, Programming, Technology, Web Programming, XML

Silly things with JavaScript closures

<![CDATA[From a theoretical programming point of view, JavaScript is immensely cool. You can do some amazing things with it. Although I’m not entirely sure whether you should.

For example I had a bunch of elements on a page I needed to update using AJAX. I needed a function I could pass the URLs and ids of elements to replace with those URLs and then have it perform each replacement in turn (I’ve seen IE have problems with simultaneous AJAX requests).

First I replace a simple replace_id function that accepts three arguments. An element id, a URL to GET to replace its contents with and finally a function to be called when it’s all completed.

And then things got silly.

function chain_replace(urls, ids)
{
  id = 0;
  next_id = function()
  {
    if (id < = ids.length)
    {
      return function()
      {
        replace_id(urls[id], ids[id++], next_id());
      }
    }
  }
  next_id()();
}

Now the next_id()(); bit towards the end should be a clue that something a little odd is going on. But I must confirm that this code does actually work. With enough arguments it might make the browser explode with some sort of call stack problem though…

closures]]>