Java + Perl + Ruby + Python + JVM = Groovy

General No Comments »

My goal is to learn a new language or two every year and this year i’ve focused on scripting languages. Being an expert in Perl and having used Ruby and Python off and on for a while, I was very intrigued when I saw an introduction to the Groovy scripting language. It’s one of the first scripting languages to target the Java Virtual Machine (JVM) for portability instead of defining its own pcode interpreter (which is what Perl, Ruby, and Python do). Basically, Groovy is just another language for the JVM and Groovy code compiles to Java bytecodes just like Java source does. From what I’ve seen while playing with it, it’s a wonderful combination of my favorite scripting languages yet feels like my favorite systems language: Java. It has all the basics of a modern system language but includes features like here-docs, regular expression statements, closures, and dynamic typing taken from languages like Perl and Python. But, unlike Perl, Ruby, or Python, learning Groovy is a cinch for Java programmers: it just feels like home. If you’re a Java programmer who has been staying away from other scripting languages because of their syntax, take a look at Groovy. The power of the language along with the fact that it runs on a standard 1.4 JVM make this a very cool scripting language, indeed. Especially for us Java folks.
Read the rest of this entry »

AOP, the evolution of OOP

General No Comments »

Over the past couple of years I’ve been teaching courses on Aspect-oriented Programming (AOP) and find that developers have a hard time grasping the concepts (as did I when I first encountered it). If we use an analogy, AOP is to Object-oriented Programming (OOP) what OOP was to top-down programming. OOP took the concepts of modularity and encapsulation to new levels, but it’s clear that OOP alone will not be able to tackle the complex software systems that we’re trying manage today. For sure OOP helps build complex systems but maintaining, ehnancing, and managing them is another matter. One of the main problems that AOP hopes to solve is separation of concerns — that is the idea that even across objects there is a set of functionality that is shared but can not be inherited or delegated easily. AOP and OOP are not competitors (just like OOP was not a competitor to top-down programming). Just as OOP extended functions into methods and structures into objects, AOP extends OOP concepts to help manage concerns.
Read the rest of this entry »

Automated testing of GUIs

General No Comments »

On Friday I attended the annual University of Maryland Technology Fair. Most of the presentations were academic and didn’t seem immediately applicable (due to the fact that I’m a software guy and the presentations were hardware-related). However, one of the presentations, entitled “Techniques and Tools for Testing Event-Driven Software”, caught my I and I sat through the entire talk. I found it to be both enlightening and applicable to many of the problems that I try to solve on a daily basis. One of my clients, who is working on a desktop-based GUI application using .NET, is using test-driven development techniques and good unit testing processes to help maintain quality at the algorithm and class levels. However, once they’ve integrated their classes and put them to use via GUI it becomes very difficult to test. Here’s where the “Techniques and Tools for Testing Event-Driven Software” became applicable.
Read the rest of this entry »

Comprehending Java application structures

General No Comments »

I’m regularly brought in to a client site when their applications are nearing completion. Usually, it’s for taking a look at performance problems or for completing some features that the existing staff couldn’t get to in time. In either case, understanding a Java program’s structure becomes very important. Today’s modern IDEs (my favorite is Intellij IDEA) do a great job of showing class structures and letting us browse through existing classes, interfaces, and packages with the ease of simple mouse clicks. However, I’ve found a nice tool by IBM that helps to truly comprehend structural information for discovery of complexity, potential side affects created by changes, and other facts necessary for maintenance of existing code as opposed to the creation of new code. If you need to understand someone else’s code and the relationships of packages, classes, and interfaces, I’d recommend taking a look at the IBM Structural Analysis for Java (S4J) toolkit.
Read the rest of this entry »

Measuring web client performance

General No Comments »

Today I was asked about the best way to measure client-side performance for heavily-used web applications. Since I spend more of my time in Java/J2EE I pretty much end up using tools written for Java. I have found and use two primary tools for client-side performance measurement: IBM’s Page Detailer (available at AlphaWorks) and the Charles Web Debugging Toolkit (available at SourceForge). Of the two, I’ve found IBM’s page detailer to do what almost no other tool does — provide accurate samples of “page weights” or how heavy a page is with respect to the number of resources it contains. For example, if you look at any web page it will consist of HTML (one object) plus numerous other objects like JavaScript, CSS, and other related “external resources”. Everyone of the external resources will require a connection to the webserver and if you count up those extra “hits” it will end up slowing your pages down. The IBM Page Detailer utility, which works as a proxy server, is an excellent tool to help you measure and therefore reduce the size of your pages’ external resources. The Charles Web Debugger is a great way to simulate, using software-based throttling, how your end user’s will perceive your application’s performance. It works as a proxy server to intercept your calls and provide you all kinds of statistics about page size, number of connections, speed, etc. If you need to measure client-side performance (and who doesn’t!) you should definitely give both the IBM Page Detailer and the Charles Web Debugger a spin.

FreeMarker 2.3 RC 1 is out

General No Comments »

If you haven’t heard already, you should mosey on down to this page to see the new features. FreeMarker is my favorite Java-based templating engine and IMHO easily beats out engines like JSP, Velocity, or WebMacro. It’s got a great design and it’s a cinch to integrate into any Java application. Of course my framework has built-in support for FreeMarker, along with JSP, and we’ll be releasing our next version of the NEFS with the latest FreeMarker version.


WordPress Theme & Icons by N.Design Studio
Entries RSS Comments RSS Login