UBeans Logo
 

News

By Pascal Forget

September 4, 2008

The web site and web apps have moved to a new hosting service, KGB Internet Solutions. I selected the Silver package. For only 30$ per month, I get to run my own private Java virtual machine (1.6 update 7), and the version of Tomcat that I choose (I chose 6.0.18). I can restart the Tomcat server at will. In addition, I get cvs, PostgreSQL, SSH and SCP access, 100 email addresses, 25GB monthly transfer and 100 Mbit/Sec transfer rate.

KGB Internet's customer service is the best I've ever seen. I highly recommend it. Thanks to Matt Raible for the referral.


August 24, 2008

I'm writing a tutorial on how to create your own custom Struts 2 tags and package them in a jar file to be used in a Struts 2 web app. When researching the subject, I found that there is a need for a quick cookbook on how to make your own tags. Hopefully, this tutorial, along with the open source flight planning web app I will be releasing soon will help many more people learn how to develop web apps using Struts 2 and Hibernate.


August 23, 2008

I am currently putting the final touches on a new flight planning web app. The application allows the user to easily create a flight plan by listing the waypoints along the route. A waypoint can be an airport, a navigation aid such as a VOR or an NDB, or a landmark. Users can easily create their own waypoints by entering the Geographic coordinates (longitude/latitude), in the same format GPS receivers and Google Earth display them. The software then computes the magnetic heading and distance for each segment in the route. You can also either select a generic airplane, or enter the specifications for your own airplane, and you can also enter the passengers and baggage. After you have done that, the software computes time enroute, and verifies that you will have enough fuel plus reserve for the trip, and will verify that the airplane is not over maximum gross weight.

The whole system will be made available as open source, as an exmaple for developers to learn Struts 2 and Hibernate.


November 5, 2007

When starting on a new project, I usually start with drafting the graphical user interface with wireframes, and then modeling the database schema so that I have a practical means of storing all the information that is to be displayed on screen.

I like creating the database schema, filling it with fake data, just to get a feel of what's possible. That gives me a great opportunity to optimize the schema and add fields that I would have otherwise forgotten to add.

I have been working on a large project lately. Once I got the wireframes and a solid database schema modeled on which to build the foundation of the application, it was time to generate the access layer.

I chose to use Hibernate 3 for this project, and to have PojoMaker generate all the domain objects and hibernate mapping file from the database meta data. You simply give PojoMaker the standard jdbc connection parameters to a database, and PojoMaker does the rest. The domain objects really are Pojos. Just getters and setters, and no dependency whatsoever on Hibernate or PojoMaker itself.

PojoMaker has become a very valuable tool. It saves me tons of time. It generates domain objects and a complex hibernate mapping file, all nicely formatted and bug free. Talk about a great way to launch a project.

PojoMaker will be made available, free of charge, under an open source license. I don't have a specific date in mind, so don't ask. The tool needs a good cleanup, needs to be tested against other databases than PostgreSQL, and needs documentation before I can unleash it to the world. But if you are curious and would like to take it for a spin, drop me a note and I'll send it to you.


November 4, 2007

I am currently studying towards my Instrument Rating. This rating will allow me to fly safely in instrument meteorological conditions, will make me a better pilot overall, and allow me to get aircraft insurance on faster/complex/more expensive airplanes. The IFR rating is no walk in the park. Studying for it is a good exercise for the brain. I currently fly Cessna 172s (Skyhawk), but I have also flown Cessna 150s (trainer), 177s (Cardinal RG), 182 (Skylane), Diamond DA-20.


March 15, 2007

Working on the Saori project, I needed to settle on a persistence mechanism. At work, I have done a lot of EJB programming, and I am just appalled by the complexity of it all. I find EJBs to have a very high PITA factor. I really tried hard to like EJBs, so I gave it yet another try, on Geronimo. My verdict is that, for my linking, there is just too many artifacts to produce to get anything done with EJBs.

So what did I do? I wrote PojoMaker, which is a very simple code generator and runtime for easy java persistence. PojoMaker connects to a database using jdbc, reads the database meta data, creates one Java class (a pojo) for each table in the database. PojoMaker also generates a class named BigBrother, in which PojoMaker adds one accessor method for each unique key found for each table. The accessor methods in BigBrother take care of obtaining a database connection, issuing the appropriate SQL query to the database server, and return a new instance of the appropriate pojo, which is initialized with values obtained from the ResultSet through reflection. All in all, the code is currently two Java classes totalling a little over a thousand lines of code.

PojoMaker is a lot like Hibernate for the persistence mechanism, and like the db2hbm tool for the code generation. I like it a lot, because it allows a developer who's new with Java to get the pojos and accessor methods needed without having to write a single line of code. I see this generated code as a pretty nice head start for any project. Then, the developers are free to add more accessors, to enhance the pojos with more functionality, etc. And for developers that are new to java, the learning curve is a lot smoother; they can be up and running producing applications in no time at all, and they can learn a lot about java, jdbc, pojos and reflection (among other things), by looking at the generated code, which by the way is nicely readable thank you.

The next step will be for PojoMaker to be able to perform deletions, inserts and updates. I might end up having PojoMaker also generate Hibernate mapping files, so that PojoMaker would become a tool for getting up to speed fast with Hibernate, while still retaining the full power of that wonderful tool.

PojoMaker generates nicely formatted code, but PojoMaker is itself very much a work in progress; its own source code is still a first draft, a long mess of code that was written over a few sleepless nights on a coding binge. In any case, if you are interested in getting a copy of the software, I will be releasing it as LGPL. Drop me an email and I'll send you a copy.


January 1st, 2007

This holiday season, I started a complete rewrite of the Saori investment platform. The Saori investment platform is a collection of software applications for managing investment portfolios. Adding accounts, trading, rebalancing investment portfolios and synchronizing them to the model portfolio. Stocks, bonds, ETFs, REMICs, REITS, indexes, market feeds, generating proposals, generating reports, and risk questionnaires, there is a whole lot to it. The system is composed of a web app, a trade/rebalancing/synchronization engine, a bridge to trade platforms, and a standalone report generator.

The trade engine is at the heart of the system. It generates trades automatically. However, computers are stupid and humans are intelligent. Therefore, the behavior of the engine is controlled by an exhaustive set of rules that are created and maintained by the money managers at the financial institution.

The world of money management has always captured my attention, and I've been passionate about it since the mid nineties when I was on Wall Street working as a software developer.

For those who are interested in the technologies used in this software, well here they are, in no particular order: Java 1.6.0, Geronimo 1.1.1, Eclipse 3.2.1, PostgreSQL 8, EJB 2.1, Struts 2. As you can see I'm going pretty much cutting edge technology here. That's because between 12 and 15 months will elapse before the product is ready, so I don't want to have a product that runs on obsolete/abandoned technologies when it ships. Besides, the proof of concept I've done showed me that this mix of technologies is already stable enough that I could run an enterprise application on it with confidence. Another reaon for using these new technologies is that it will make it an important motivation factor for the developers I plan to hire. Developers will be more interested in joining the project if it brings value to their resume.

I feel that it is my duty as a member of the Open Source community to give back for what I receive. Therefore, some of the more generic modules of the Saori web app will be released as Open Source.