Archive for the ‘Flex’ Category

I had to evolve myself back to Java, one of the first languages I learned to program in, and boy was that a fallback. Being in PHP so long, used to the OOP capabilities it brings a long, I noticed the side effects of using PHP’s flawed and missing OOP principles.

The project I was working on needed a Java program that communicated with hardware devices under Linux. My main development environment has been OSX + Netbeans for the last year so abusing Java’s statement for being OS independent, I developed the Java program for both OSX and Linux.

One of the requirements the Java program should have was a communication bridge between Java and a Flex program (designated to be the interface). So the first thing we (me and my colleague) looked at was Merapi. Though after some hours of trial and error, when things started to communicate between each other, the work required to get it communicating was just way to much for the little information being passed through Merapi (though Merapi is superb in building a sophisticated communication bridge). So we decided to switch to a more simpler approach, a socket connection.

A socket connection is just simply said “binding a port to a socket to retrieve and send streams of data from and to the designated client(s)”. So being the lazy programmers we are, and having tied deadlines, we started searching for some ready to use Server/Client codes and I started to wonder if any of them even understood the full picture of Streams, Bytes and the Charsets, which at the end is needed to convert those pretty little bytes back to a useful characters. And hopefully the character that was meant to be send from the server and received by the client.
(more…)