Pages

July 29, 2008

Bringing Java to the .NET world

I was killing some time the other day when I stumbled across a pretty interesting open source project named ikvm. With ikvm, you can take Java byte code and convert it into the .NET CIL (.NET code all compiles down to CIL. Yes, Microsoft stole the idea from Java, haha). This means that all of the nice open source Java libraries we use can be converted by ikvm and used in .NET applications.

ikvm is fairly simple to use as well.

You want to convert an executable jar to a Windows application?
ikvmc -target:exe application.jar

Output: application.exe, a Windows console app
Note: GUI applications should use 'winexe' for the target.

You want to convert a library? Easy.
ikvmc -target:library awesomeLibrary.jar

Output: awesomeLibrary.dll


You can even use ikvm to run Java programs as it is basically a .NET implementation of the JVM.

I found all this pretty amazing since there are products on the market right now that charge in the thousands of dollars to do what this project does for free. I tell you, this new age of open source development is kicking ass!! This project brought us that much closer to having .NET and Java code coexisting and playing nice with each other.

July 9, 2008

Drools, You Found Me Too Late!!!

Tonight I went to my local Java User Group meeting and the topic was the use of Rules Engines to handle business rules execution, more specifically Drools. Well as I sat there and saw how simple it was to move the business rules out of the main program logic and pass the buck to the engine I had a flashback to my senior design class in undergrad.

My senior design project was a baby monitoring device that extended on the popular Angel Care baby monitor. We added the ability to stream audio and video from the baby to any computer on the local network in addition to the lack of breathing/movement alerts the monitor sends. Well as you can imagine, there were all kinds of if/else statement logic throughout the code to handle the many different scenarios. Basically, our code was ugly and hard to read. If we had been able to use an engine like Drools we could have moved all this logic into external rule files and loaded them in at run time and had nice, readable source code. Also, it would have been a lot easier to update the rules when we found errors (of course we found tons... it was our first real hardware/software engineering adventure after all).

So I will be adding Drools to my list of things to research and learn. I am already envisioning a use for it on the job if I can get enough people to buy in and get on the band wagon.

July 4, 2008

I Am "Android"-ing

So I have been working through the Google Android tutorial and I have it actually working somewhat. I'm starting to understand the mechanics of it all and how one would create an application with the various screens that are needed. Once I get the tutorial completely finished and have a better understanding I will probably start creating a small app of my own to get some more experience. Either way, I have learned a lot about developing an Android app in the past week and I look forward to learning more.