I’ve usually dismissed the Dojo Toolkit as a difficult, poorly documented JavaScript library. However, Zend Framework recently decided to choose it as the default JS library to bundle with the framework. It can’t be all bad if that happens, right? This sparked my curiosity towards Dojo again – Maybe it was time to actually try it for real, armed with …
Browser as an OS
It seems as if the browser is becoming easier to understand than other applications for people who don’t know much about computers in general. For example, if an application has a settings dialog and you ask the user to go back or close the dialog, they aren’t always sure what to do – should they press Cancel, OK or the …
How to make back, forward and reload work in Ajax-based apps
With Ajax apps getting more and more popular, there’s often the question of the browsers own controls working or not in the app in question. If you hit reload, you might end up back on the start page of the application, if you hit back.. who knows. I think this is especially an issue in applications, where you would work …
JavaScript Canvas charting/timeline example
I was on holiday last week and haven’t been really able to think of anything really really interesting to write, so here’s something I made a while back: A Canvas-element powered chart/graph/timeline thing of my programming language skills, which I made as an excercise for making chart-type stuff with canvas. I think the canvas element is starting to get quite …
Simple Photoshop-style layers using JavaScript
Today I wrote a small JavaScript class to display images layered on top of each other, in a similar manner as layers are shown in editors like Photoshop. I wanted to show my Dwarf Fortress to someone, but I didn’t just want to stack screenshots below each other like you’d usually do. Since dwarf forts can span multiple depth levels, …
Resource URLs and JavaScript
Sometimes when working with JavaScript, you may need to refer some resource: Maybe a page or an image. They’re then used on the client-side code on your site. But what happens if you restructure your project? Files move elsewhere… Maybe even domains change – you might be moving content to a specialized content hosting server for example. You would need …
Aptana Jaxer: MVC and other thoughts
This week I decided to take a look at Aptana Jaxer – A server-side JavaScript implementation, or “Ajax Server” like their site says. It’s a bit different take on a server-side language and requires some new ways to do things. What it basically lets you do, is completely throw away all “traditional” server-side languages, and write all your code in …
Working with Regular Expressions
Regular Expressions – you either love them or hate them, and usually when you hate them, you just haven’t spent enough time trying to learn them! :) They are incredibly useful, but they can often be difficult to build and test. I have previously mentioned a great tool called RegexBuddy, which is a great help. However, being a Windows application, …
JavaScript and MVC
For some reason, despite understanding a programming concept in one language can make it difficult to understand it in a different language, especially if it differs a lot from the one you know. JavaScript is a good example of this. From experience I can say that grasping the concepts of things like MVC in JS can be slightly difficult at …
Client-side validation with Zend_Form
Zend_Form is Zend Framework’s brand new tool for simplifying form creation, parsing, validation and filtering. There’s one big thing I want from any kind of form generation tool: The ability to let me combine my server-side validators with JavaScript validation on the client, or other such features. And here’s the thing: Zend_Form is easily extendable to automatically generate JavaScript for …