Apps vs frameworks…

The other day I was reading this post on Ian Bickings blog which (for Python, his language of choice) recommends thinking about using little apps more and frameworks less.

I can understand why he says this. The few times when I’ve tried to use a framework for web development – normally something like Sarissa, a JavaScript framework – I’ve quickly come unstuck for several reasons.

Firstly is my very weak understanding of object oriented programming, but I’ll gloss over that quickly. Secondly it’s that a lot of these frameworks, I have noticed, are just too darn big for simple applications. Why would you want to include a 300Kb JavaScript file if all you want to do is show and hide a page element? Thirdly they can be really complex, certainly much too complex for a simpleton like me to understand.

Before you think I have some kind of hatred for frameworks, let me assure you they have their place and can be very useful. After all, .net is a framework and I’m currently falling in love with that (note to self: get Mono). However, as Ian says, little applications can be more useful and certainly easier to implement.

But, I would go further than that and say that, for me at least, the most useful functionality comes from what I’m going to call an extendable application. That’s an application that does a particular job – transferring data between databases, storing user preferences, formatting and printing invoices for example – but is extendable with regard to the data it can handle.

A nice example is the little database app I wrote last week. It does a simple job: queries a database, creates SQL from the records retrieved and posts those SQL commands to a web URL. However it uses an XML configuration file to set most of the variables in the program – the database connection string, the initial SQL query to run, the format of the output SQL to create and the URL to post the data to. Therefore it’s extendable and can be used for a variety of tasks, all within the bounds of it’s core functionality.

Some people may say that what I wrote is a simple framework, but I’m not sure I agree, as it was designed to do a single job, but is also capable of being extended. It’s certainly an area of development that I’m going to be looking into in more depth, as I think – for my needs at least – extendable applications are the way forward.