Saturday, March 31, 2007

My life needs SCM

Well I haven't been able to spend much personal time programming lately. I have accepted a job as a software engineer. My very soon to be wife and myself will be leaving the lovely state of Oregon next weekend. We are relocating near Santa Rosa, California. I'm really excited, but a little bummed by the huge shift in my focus. It'll be weeks before we settle down and I can get back to working on my little pet project. I keep coming up with new stuff I want to start playing around with, which can be rather bothersome. Oh well all I can do is write down these ideas and save them for later. Sometimes other duties come up that keep you from doing what you love to do.

One of my ideas I haven't gotten around to involves using Rhino. Rhino is a javascript engine implemented with Java. I would like to create a SWING version of my time tracking application. Seeing that the time tracking app is a single page web application, all the core logic is implemented in javascript. I would like to reuse as much of the javascript code as possible. Thats where Rhino would come in.

In this javascript app I have worked to separate application code through a number of interfaces. There are objects that represent the views. These create and control the HTML elements in the DOM structure. These objects have events that fire, such as when a button in the GUI is clicked. There are objects that maintain the state of the application, these interface with the views. They relay messages to the view. They also have to be able to receive events from the view objects. Therefore we have circular references between the state objects and the view objects. Note one state object may have many references to view objects, but the view objects (so far) have references to only one state object.

Other objects contained by the state objects will have to be interfaced out. Here I am thinking of the objects that communicate with the server (XMLHTTP!). I have not done this so far. I was thinking about the DAO pattern being used in javascript to do this. This may help to ease working with Java based DAO's in the SWING app implementation. The Java DAO's would drop in to replace the functionality of the XMLHTTP DAO's from the single page web application.

Let's stop it here. Later these notes could come in handy.

No comments: