Archive for the ‘Programming’ Category

How to make back, forward and reload work in Ajax-based apps

Wednesday, July 16th, 2008

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 ...

Automating creation and caching of image thumbnails

Tuesday, July 8th, 2008

The other day I needed to create some thumbnail images. You know, the usual stuff: Admin uploads image, needs it resized to a smaller one for preview or such... I thought, why bother with writing code manually in the admin to create the thumbnail? I mean, the requirements for its size ...

Making working with DB records easier with a controller helper

Saturday, July 5th, 2008

The other day I noticed a pattern that repeats quite much in my code: Take a parameter from the request, such as id Query the DB for a record that matches the param Redirect or throw a 404 exception if record was not found Why do all this, when it could be simply a ...

Ideas for testing Zend Framework apps

Thursday, July 3rd, 2008

Here are some ideas I was thinking of for making testing Zend Framework (and Doctrine) based apps nice and easy.

JavaScript Canvas charting/timeline example

Monday, June 30th, 2008

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 ...

Simple Photoshop-style layers using JavaScript

Monday, June 23rd, 2008

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 ...

Dependency Injection, or how to make simple concepts sound difficult

Saturday, June 21st, 2008

You may have heard of Dependency Injection. It's essentially a way to remove implementation dependencies from classes, or "the process of supplying an external dependency to a software component. It is a specific form of inversion of control where the concern being inverted is the process of obtaining the needed ...

Put Excel on the net with ASP.NET

Wednesday, June 18th, 2008

Remember when I introduced the idea of cloning Google Spreadsheets with ASP.NET using Excel? Well, it turns out to be a perfectly feasible task, and I have a working prototype too!

Is web application development less challenging than desktop application development?

Monday, June 16th, 2008

I have heard several times that what I do is not "real programming" - web application development is supposedly less challenging than "proper" desktop application development. But is it really so?

Good habits I learnt from Django

Friday, June 13th, 2008

Django has various good features I've previously mentioned. While they can't be taken out and applied to other languages like PHP right away, it also has some nice ways of doing things that can be taken and used elsewhere. Let's look at some good habits I took from Django and started ...