All posts in JavaScript

Having spent most of Saturday trying to get files to upload from a Flex application to a Rails backend, fighting against both Flex and Rails all the way, I thought I’d collect together some of the things that have helped me work through this in the hope that others don’t have to spend quite as long battling through this. Note however that these are not necessarily best pratices, more a collection of tips that helped me in my situation, there are probably better ways to do some or all of the things that I’ll be writing about - and if you know of any improvements/alternatives I’d love to hear about them.
Continue reading this entry »

I’ve just read this interesting post on how to speed up your web application with an automated system for working with browsers cache for your assets (CSS, JavaScript, images etc.).

Previously I’ve used query strings parameters within asset requests so that they act as a ‘cache bust’ parameter, these have usually been the source control revision number and is built into the release process. But I’ve never taken the step of force an expiry date on content that can be cached and the solution in the post is a lot more fine grained than my previous solutions. Something to consider for the future.

I’ve had a list of changes and updates to apply to the JavaScript Image Cropper for quite a while now and I have been thinking of these in a lot more detail recently. There are lots of changes that I plan to make that would bring the cropper up to V2 level and ensure that it remains a viable cropping solution for the future.
Continue reading this entry »

Every so often, in pretty much any field, something comes out or is released that I don’t realise I’ve been missing until it’s pointed out to me. Today it is a little proof of concept for toggling multiple check boxes by click-hold-drag. This is something that I’ve become familiar and comfortable with in desktop programs, but I never noticed it was missing from web browsers. Now this script has pointed out that it’s not there - I miss it.

Ok, so before you get too excited it’s not really a fully fledged version fantastic Firebug Firefox plugin, but the lite version does go some ways to easing your cross browser development.

If you’re not aware what Firebug is, the official site quote is:

Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

But that doesn’t explain just how excellent Firebug is, it is by far and away not only the most complete debugging plugin I have found for any browser, but it also seems to be one of the most complete and professionally executed Firefox plugins around.
Continue reading this entry »

Websites of Interest: cross trainer

I’m currently in the middle of writing a reusable little JavaScript utility, which I’ll probably release when it’s finished, for one of my many projects and I wanted to employ unit testing as part of the development process, as I believe in the benefits of it quite strongly.

However my previous experience with unit testing JavaScript haven’t been the most pleasent, I have tried the most common nUnit variations for JS, the best of which was JSUnit. But I always found this a little cumbersome and difficult to use, however I had recently read about the unit testing available with script.aculo.us and although the only documentation I could find was the PDF available at mir.aculo.us I thought I’d give it a go.
Continue reading this entry »

Screenshot of JavaScript struct dump output I came across this funky little script earlier today which allows you to dump variables of any data type in JavaScript and presents the results in exactly the same format as the default output of a <cfdump var="#myVar#" /> in Coldfusion.

I really like the completeness of this script, how it handles the node elements and the cross browser support. I’ve not tried using it in development yet and I doubt it would replace my console.log() calls in Firefox when using Firebug, as that offers so much more, but for the poorer members of the web browser family (poor little IE) I can definitely see it coming in handy.

I’ve finally released the latest version of the JavaScript Image Cropper UI which has been updated to version 1.2.0.

This adds quite a few bugs fixes, feature additions (the much requested ability to set maximum dimensions) and speed improvements and general streamlining.

NOTE: One really important change to note is that the cropper no longer has the default behaviour of automatically setting a ratio when both min width & height passed, the ratioDimensions must be now passed when this functionality is required.
Continue reading this entry »

The list I’m referring to is that of fantastic JavaScript frameworks. My list now includes Prototype (and the fact that I didn’t need to look up the URL just shows how many times I’ve recommended Prototoype), Dojo Toolkit, script.aculo.us and now MooTools.

I’ve not had the time to play around with MooTools yet, but simply looking at the help page you can’t deny that it looks sweet.
Continue reading this entry »

Screenshot of script.aculo.us redesigned homepage, 22nd August 2006
…it’s all about the effects.

Today I came across the new script.aculo.us website, I will point here out that I really like the script.aculo.us library, my first thoughts were along the lines of "Ugh" or some other onomatopoeic word which in English would translate to "My eyes, it burns!".

As I said just now, and would like to re-iterate, I really do like the library and even extend it in one of my code projects.

I suppose the gratuitous use of the available effects is meant as a show-case of what you can do with script.aculo.us. But the site’s tagline, it’s about the user interface, baby! is the real kick in the giggle berries for me, this is exactly what it should be, a show-case of how script.aculo.us can enhance the UI, not how it can make it inaccessible and difficult to use while concentrating on the effects. The fact that they didn’t manage to do both is what really bothers me in the end.