the new new HotForestGreen framework

Posted on April 5, 2012

0


C#, almost there

Almost 8 months have passed since the last time I coded on the HotForestGreen framework. I wrote that code in C# as C# offers some benefits to the second option: Java.

The main benefit of C# is the integration in all kinds of Windows-goodies, allowing me to write code that can simulate mouse movements and keyboard-input from remote input.

The idea was to port the framework from C# to Java and have a double code-base. The maintenance would be done in one source-base (the C# source) and the Java ode would be generated via a C# to Java converter that would translate the C# code to Java syntax. Platform specific libraries would be plugged in from a separate library, allowing me to keep the generic things (processes) separate from the specific things (how connections to databases, Sockets, serial ports and features in the OS would be made).

The Java code would enable me to run the framework on Android phones, making them into Servers running either on an existing network, or acting as a WiFi hub by use of the Tethering options of the phone.

In August, the prototype code was as far as allowing me to discover Servers in the network, connecting WebSockets and run remote applications over C#, Flash and Web clients.

Design Patterns, refactorings and Android leads to Java

In 2010 I started to pick up Design Patterns, and I learned a few new tricks and got some new insights.

Due to my work I was not able to incorporate these in the (almost finished) framework.

These new insights would lead to some major refactorings in the framework. Basically comparable to a re-write with re-use of the existing code. Especially the Server, with options to cluster over multiple machines in the same network and to cluster with several machines over different IP-numbers is very messy. I used some design principles which created a structure that I am less than happy with.

Also, with Android as the second main target, C# would not run and the code would have to be migrated to Java (as stated before).

So with all this, the code base will be built up from the bottom in Java, using many of the ideas present in the HotForestGreen C# code, but putting it in an entirely new structure that allows for all the features I have in mind (clustering, distribution of workload, auto-discovery) but with code that is more straight forward and better organized.

One step back, two steps forward

It is a cold decision: to kill code that works, code that has never seen anything of the world. Also: code that was close to be finished.

But that code no longer suffices. I can do better. Even though it is tempting to finish that code, I think it will be a waste of my time. As I then still need to refactor and publish that code to Java, with additional consequences.

So I take one step back, spend another two or three months, and deliver something that will run on all relevant platforms.

Everyone waiting for something to happen and come out: my apologies. Earning money had priority over my work here.

Advertisements
Posted in: update