Slideshows, apps, and OOP
I’ve been working on a new Javascript app to display images on the net. If you’ve seen any of the previous dbCinema slideshows, you may recall they didn’t have fade in/out of the images. I was finally motivated to make that sort of app. The motivation was not for the dbCinema images, but for some others which aren’t up yet, which I’ll show you when that project is finished.
However, I have developed the app with the dbCinema images. All of the dbCinema slideshows at http://vispo.com/dbcinema now have that feature. Fade in/out enhances the experience of these images because there is often continuity between the images, and the fading in of one over another reveals the nature of the continuity in a way that both shows how the thing is growing/changing and contributes to the ‘cinema’ of dbCinema.
It also provides ‘action’ while the app is busy downloading the next image, which is a consideration in streaming net art. Usually the images are 1280×1024 in size and vary from around 75kb to about 400kb in file size, so the downloading of the images is usually not instantaneous.
There are lots of slideshow apps on the net. Why not use one of those? Well, the ones I saw were usually suitable for smaller images. I wanted this to take up the entire screen for an art experience, not a showing of photos. I also wanted to have categories of links that usually weren’t available with the ones on the net. And I wanted the interface simple and integrated into the viewing area, rather than having one area for the graphics and one for the controls, so the full screen could be used to show the graphics. But, also, I’ve been kind of interested in the architecture of a slideshow app. More on that a bit later.
The app has two ‘pages’ or screens. The first displays thumbails of some or all of the images. Some of the series have hundreds of images; in that case, the thumbnails show every second or third image. This page or screen also usually contains a link to information about the series. And links to the previous and next series via the ‘<<’ and ‘>>’ buttons.
When you either click a thumbnail image or the ‘[...]‘ button, you enter the second page or screen which displays the slideshow. You can adjust the amount of time images are displayed and the amount of time images fade by clicking the ‘Options’ button. You can also choose whether images fade in/out or just fade in. When the images fade in/out, there’s a dimming and brightening. When they just fade in, that dimming/brightening is not present. Sometimes the dimming/brightening is nice, such as in the Silvia Saint series. It gives it a sort of breath in and out.
But, all that said, the main thing I’ve learned in making this app is how to make a better one that I haven’t made yet. And therein lies an interesting lesson for me.
The architecture of the current app involves two images. One image fades in while the other fades out. Or one fades in while the other, which is already faded in, stays static, and disappears once the other is faded in.
A more general architecture would be as follows. It would involve going OOP (object oriented programming) with the app. The idea would be to program an image object. When it’s time to display a particular image, an image object would be dynamically created. The data of this object would include the image itself, it’s name and so forth. The methods or behaviors would include the mouse event functions, the fade in/out functions, the destructor function, and so on. When the object is no longer required, it’s deleted.
The advantage of this dynamic creation/destruction of image objects is that rather than being limited to two images, you can have several images onscreen at once. So, for instance, when the user quickly presses the ‘>’ button repeatedly, the response could be more as one would like.
But, more importantly, it would free up formal possibilities. For instance, one could program keyboard functionality so that when a particular key is pressed, a particular image could fade in/out or do that and grow/shrink.
Getting away from the notion of a slideshow into a more general form.
And that is of artistic interest. Programming should suggest and open up formal possibilities. Going OOP, properly understood, does that. So next up for me when I approach another Javascript project will be getting a handle on OOP in Javascript. There’s an interesting article on the subject at http://msdn.microsoft.com/en-us/magazine/cc163419.aspx
Part of the idea of dbCinema is to explore the possibilities of cinema between the still, the slideshow, and the sort of dbCinema at http://vispo.com/dbcinema/londonhypotrochoid which is further yet from slideshow but is, nonetheless, based on 100 pictures downloaded from the net via a Google image search of “London”. This latter piece does not use the new slideshow app but dbCinema itself.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.







Leave a comment.