Contact Info

sean [at] coreitpro [dot] com gpg key

Mastodon

sc68cal on Libera

J2EE First Impressions

I’ve been quite busy playing around with lots of different stuff. I’m rebelling against all that “structured” education that they keep burying me under at the University. I’ve got six weeks to stretch out and explore.I’ve got a huge chunk of code just laying around right now. HTML, PHP, Java, SQL. All kinds of good stuff. Programs and snippets from all my classes and some stuff that I wrote on my own time. One of the pieces that I’ve been working on recently is a Java program that parses out Apache log files. Originally, the Apache Log files would be read in, then put back out in Xbase format. Xbase was an excellent candidate for Apache logs because it’s easy to create .xb files (they’re DSV format as opposed to CSV) from my program and Xbase does an excellent job of displaying the output. The usage of DSV is important because escaping characters is painless, compared to CSV.

The one downside of using Xbase and flat data files is that the log files can be quite large. Large enough where performance issues come into play. One alternative to using flat files (xbase, or .log) is to put the data into a database. Databases handle large data sets on a regular basis and software that takes Apache logs and puts them into a SQL database is not very common. It’s a niche that I can easily fill.Paving the way for me was the J2EE platform. Java is a fairly robust and powerful programming language in my humble opinion. It receives some ridicule because it’s a language taught at the University level, which is not as sexy as going out and picking your own programming language and being “unique” and “different” from your peers who are just scraping by in class. It’s not as fast as C and it’s not as “sexy” (We’re talking programming languages, I don’t get the context of “sexy”) as Ruby or whatever the flavor of the week is but the number of classes and libraries available to Java makes the language very powerful.

Case and point? J2EE.

Since I had already finished a class on SQL I decided that I wanted to test out parts of the J2EE. The J2EE, for those that don’t know, is a Java “platform” that includes many server-side APIs that allows a Java program to interact with enterprise level systems. What was important to me was using the J2EE API that communicates with database systems.Using Java to communicate with RDBMS systems was much faster and easier, compared to previous experience with PHP. It might just be code maturity but with PHP all the data had to be cleaned up by hand before being entered into the database, as opposed to to using Java’s preparedStatement to handle escaping data and allowing the ODBC driver to handle the details.

Even with the small amount of experience that I have with using the J2EE the perceived power and usefulness of the Java language has increased exponentially.