A post about things I'm excited about at the moment. Includes jQuery, a fab javascript library for simplifying common techniques, dBug for visualising variables in PHP, an online HTML image map creator, a javascript timeline visualiser and someone's running Icar in play by post!
jQuery
I think Javascript is a dog. An evil programming language that has growth up from the vile filth of the early days of the internet. It's not very standard, it's ugly, it's powerful in all the wrong ways, is bereft of good tools (although that is improving) and an ugly boil on the face of web development. There is hope. A glimmer of sunshine that is jQuery.
jQuery simplifies a lot of the things you have to do regularly in javascript. It turns accessing the document object model (the tags on your page) into a dream. You can retrofit javascript into existing pages without having to put any ugly 'onclick' handlers into the middle of the html. The best way to show you how lovely it is is through example. Here, we'll colour all off the borders of divs red.
before:var divs = document.getElementsByTagName("div");
for (var i=0; i
if (divs[i])
{
divs[i].style.border = "1px solid #f00";
}
}
with jQuery:$("div").css("border", "1px solid #f00");
That's it. The more complex the code, the more of a bastard it is to write in normal javascript but with jQeury it just gets easier. I love it and have used it extensively in the new Icar character sheet maker. Ajax looks simple too, although I've not touched that yet. No doubt I'll retrofit lots of lovely GUI-ness into chomisis after the Beta. There are loads of very cool library addons for it for making beautiful GUIs, handling tables and more.
What's more is that Google host the jQuery library. This is good because if loads of people link to the Google library then browsers can cache it from a single source and won't keep downloading it. Not to mention the bandwidth you save from your own server. Love it.
jQuery comes highly reccomended.
dBug for PHP
dBug is an equally exciting PHP library that helps you to debug PHP objects by giving you a nice visualisation of php variables. You just inclue the library, pass your variable into dbug and it prints out a friendly description of the variable. The true joy of this is that it works on strings, arrays, classes and database resources all with the same call. The examples on the website are a good indicator. This is going to save me HUGE amounts of time developing Chom in the future as I can see what is actually going on in a class. I also get to strip out loads of dodgy debug code too.
Online HTML image map creator
A really useful tool for anyone who has had to make their own damn image maps. I've used various methods before, but none are as easy as using this tool. Upload your image, click away and it gets on with building the image map code for you. Takes the bind out of coding.
Simile Timeline
Simile timeline is a free javascript/ajax tool for visualising timelines. I'm gagging to use this for Icar or the Chom Isis post game stats. I certainly log enough information in Chom Isis for a very detailed timeline of people screwing each other over. It's got lovely Ajax in it so it can smoothly load, rather than having to wait for ages and the javascript functionality allows you to drag left or right. Tooltips pop up to show you more information in an event and you get specify ages of things, to group stuff together. Very useful.
Someone's running an Icar Play by Post
Over on Myth Weavers, a predominantly D&D play by post board, a chap is going to be running an Icar game. Looks low powered type of game with players working out their own trooper character skeletons. I'm going to try and help best I can but I'm interested to see what problems they have so I can iron them out.
That's it for now, just a random blathering of stuff that's excited me. :)
Comments
The JQuery stuff looks very good... I find scripting on pages a complete whore, especially with DOM, so I'll be sure to give that a go!
Mate, you're coming from the same place as I am. I love the swiftness of jQuery. You have to get into the mindset of jQuerying but once you do, it's insanely powerful and leaves you with neat, manageable code.
the Hide stuff is something I've been playing with, as I'd like to change my site so that it just shows the images from Picasa/YouTube, and then hover-overs provide the text. Given that JQuery has that as a standard bit of kit looks like a winner!
The PHP dbug stuff looks really useful!
Thanks for sharing.
Thanks Rob
No probs gents and welcome to Tim Hastings, a charming fellow I spent two years living in the Reading DMZ with.
Welcome to Lack Of. :)