Major Geek Entry

This is a pretty geeky entry, so if the thought of reading about programming languages and technology bores you, you might want to skip this post and read something more entertaining.

That said, onto the post. Lori and I were both on call this weekend and spent most of the weekend trying to quiet beeping pagers. Sadly, flushing them down the toilet wasn’t an option and Lori spent a lot of time on the phone with various managers and people trying to get stuff sorted out. Oddly enough my pager was silent. Very odd considering that mine usually goes off non-stop and hers is usually the quiet one.

Anyway, while she did that I spent a lot of time programming. As I mentioned before, I’m trying to learn how to effectively use Jakarta Struts to build web applications in Java. Armed with the awesome IDE Eclipse, an excellent Struts plugin, and my handy Struts in Action book, I set off to build the skeleton for what will eventually be the manager for the new price guide.

I have to say I absorbed a LOT of information this weekend, and even managed to learn how to effectively use a system called Hibernate, which is an Object/Relational Mapper, abbreviated ORM. Basically it allows you to map your database tables onto useable Java classes via an XML mapping, JavaBeans, and some utility Java classes. So instead of accessing JDBC directly and writing SQL queries, I can do the following:


List users = UsersService.getInstance().getUsersList(1);
String firstName = (Users)users.get(0).getFirstName();

That queries the database for the row with the user_id=1, and populates the string firstName with the first_name from the database. It’s pretty neat, if you ask me. The UsersService class is a class you have to create that has all the basic CRUD elements (Create, Read, Update, Delete) so all you do is call the methods contained within. It’s uber-geeky and I dig it.

So I’ve been able to create the basic framework for priceguide admins to login. Now that I know how to use the tools, the rest will be pretty easy to code. I can’t wait!!

Leave a Reply

You must be logged in to post a comment.