Wednesday, 17 November 2010

Software Framework: OpenFrameworks

I'm going to take a software engineering point of view in this post. To come up with any type of model or simulation, it is a good idea to start with a software framework.

A software framework according to Wikipedia is 'an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user code'. Software frameworks facilitate the development of software, and allow the developer to focus on the software requirements rather than the low level details of providing a working system that allows access to the hardware. This, in turn, reduces development time.
For the short term, it would more than likely increase the development time, as there is a learning curve involved which needs additional time. In the long run, once the framework is learned, future projects can be a lot quicker to complete, as the need to concern ourselves with the low level details is diminished.

There are several types of frameworks available for C++ such as SDL, OpenFrameworks, Qt, etc., I'll focus on OpenFrameworks today. A few projects made using OpenFrameworks is below (clicking on it will take you to the project site on OpenFrameworks):

OpenFrameworks is a library that is designed for 'creative coding'. The library is wrapped with glut which is a windowing library. This wrapping I feel is quite a good choice, as it works really well with OpenGL. The OpenGL red book bases its code on glut as well.

If you've used Processing, OpenFrameworks certainly draws parallels with it. The website that provides the reference to the commands of the framework is also very similar. Processing users would feel right at home, there's also a wiki that provides an orientation to OpenFrameworks that can be quite handy.
What I like about this framework is that it wraps several other libraries to provide a very good interface. OpenGL is used for the graphics, as I mentioned works well with glut. freeImage which is a popular library for image I/O and processing is also included. Even quicktime which is good for playing video.
I currently use SDL, but after having a look at OpenFrameworks, I'm considering using it. Looks like a very good framework to use, and the learning curve doesn't seem too high after having used Processing previously. At the same time, there is already a lot of articles and a whole community available for SDL. I'll discuss SDL in another post. OpenFrameworks does indeed look like a very good software framework indeed.

No comments:

Post a Comment