The Art of Software Development

Jim Boone’s thoughts on software development and other important matters

Pilgrimage Experience

I wasn’t certain what to expect during my NC Presbyterian Pilgrimage #84 weekend on April 17-20, 2008, but I did know that it had a profound effect on all those that I had talked to who had attended. I was first approached about the weekend several years ago but was a bit put off by what appeared to be a shroud of secrecy surrounding the activities of the weekend. I now know the reason for the secrecy was to protect the many surprises that the pilgrim will experience. I intend to protect the surprises as well but if you really want to know I will tell you (but you would just ruin things for yourself).

Read more

7 comments

Foray into Agile Development

I’ve been doing a lot of thinking lately and have come to the conclusion that technical blogging is difficult. If you want to provide useful information for people, you need to do a lot of leg work, a lot of testing, and then take the results of your work and distill it into something that you think might be interesting for folks. Then package it so that people can download it and use it on their own. In contrast, a posting that consists mainly of opinions and thoughts is easy (like this one). My mind is full of thoughts every waking hour of every day. The problem is, or least how I see it, is who really cares what I think about?

I could blog about the three days it took me to replace my hot water heater and everything I learned about sweating copper joints together, but does anyone really care? I could talk about my challenges in managing a family with college-bound teenagers but does than anyone really care about that either? The reality is I choose not to work my whole life away. I think life is more than work. I believe it is everyone’s duty to find their purpose in life and pursue it. Through years of trial and error, I now know that I was meant to be a creator and developer of software. The primary reason I know is I am passionate about it. I love it! So let me tell you about what’s going on in this area of life.

I’ve started a new project at work were I in the technical lead. I really enjoy this role because I love to solve problems and I enjoy applying the latest technology to those solutions. Since I am in charge of this project, and since my employer is allowing me to pursue an agile development methodology, I have delved into the world of agile development headfirst! What I have discovered is there is a lot to unlearn.

When I studied computer science in graduate school the waterfall method was the only way to go. Fifteen years later it is quite obvious to me that that is not the best way to go. I really like the concept of agile development. I especially like the concept of minimal documentation. What surprised me though is that I didn’t know how to act without a requirements document or use cases. How can you design a system without these? How can you architect a solution if you don’t have a vision of the final deliverable? Where did the documentation crutches go?

I like to think that I’m adaptable. What I found is the beauty of agile is you can redefine your process to fit your circumstances. You don’t have to abandon every technique or tool you know. In my small team of four developers and the manager I can basically run the show the way I see fit (even though I’m not the official manager). Therein lies the beauty of agile. I know my team, I know the problem domain, I know our skill sets, I know the environment we all work in, and I know the toolset so I get to use my brain and create a unique approach at developing this application. I am having a good time! I like showing up at work lately and I’m not even coding. Of course I will be coding since there are only four of us but there is more to life. Trust me on this one. Long live agile techniques will and long live human creativity! They are a perfect match.

No comments

RIA Prototype Client Using BlazeDS Messaging and JMS - J2EE Server

In a previous posting I gave an overview of the dashboard prototype that I created to investigate BlazeDS messaging with Flex clients. This posting focuses specifically on the J2EE application server component. I encourage you to read the prototype overview section of my initial post if you have not done so already to glean an understanding of what this server component does in the prototype.

Server Architecture

The EJB3 server architecture is quite basic and consists of one interface, one enterprise Java Bean (EJB), and one plain old Java object (POJO) value object. ITimer is a local interface that is implemented by the stateless DataGeneratorBean EJB. The DataGeneratorBean takes advantage of EJB timer service in order to generate events at the frequency specified by the client. You can start and stop message generation by calling the startTimer() or stopTimer() methods of the DataGeneratorBean EJB (these are the methods called by the client to start and stop message generation). It should be noted that by default EJB timers are persistent. That is if the timer is running when you shut the application server down it will start up automatically when you start the application server and again.

The MetricsVO value object is used to encapsulate the metrics data. A corresponding MetricsVO object is defined within the Flex client and the [RemoteClass(alias='info.jimboone.MetricsVO')] meta tag is added to the Flex definition object to assist BlazeDS in translating the Java object to/from the ActionScript object . You can view all of the Java EJB source files here.

BlazeDS Configuration

Integration of the J2EE server with BlazeDS occurs in the web.xml file. All that is required here is the definition of the MessageBrokerServlet servlet and a listener that keeps track of the HTTP Flex sessions (HttpFlexSession). This is fairly straightforward and very well documented within the BlazeDS Developers Guide (you can also view the web.xml files in the turnkey applications examples). The complete web.xml file is shown below:

Read more

3 comments

RIA Prototype Client Using BlazeDS Messaging and JMS - Flex Client

In a previous posting I gave an overview of the dashboard client that I created to investigate BlazeDS messaging with Flex clients. This posting focuses specifically on the Flex client.

One of the purposes of an application dashboard is to provide the user a means of rapidly discerning the state of an application using data visualization. I couldn’t think of a better use of Flex and than visualizing data! I am partial to real-time strip chart plots since you can monitor the history of operational parameters over a period of time. I am also partial to bar type meter that show the current value of a parameter and maybe even a high water mark. I envisioned a final dashboard application with many such strip charts and bar meters. The first objective of the prototype was to scope out an efficient way of displaying data for one set of metrics.

Charting Components

I wanted to try out some of the stock Flex charting components since I had never had the opportunity to work with them before. The LineChart component looked like a perfect component to use to draw my data in real time. Unfortunately, the LineChart does not allow you to present data in the same way that say the Windows performance monitor does as shown below.

Windows Performance Strip Chart

You basically have the choice of moving the whole chart as the performance monitor does or moving the data plot as you can with the bar chart component. Once I got over my preconceived notions of how a strip chart should work I found the LineChart to be perfectly adequate. The following show the LineChart component in the dashboard demo.

Dashboard Strip Chart

Although the stock LineChart component appears adequate for my purposes, I’m still a bit tempted to try to construct a strip chart component. After checking out the Degrafa web site, it looks like degrafa may be a good tool set to use in constructing a moving strip chart. I suppose I can also make my LineChart appear a bit more polished through CSS. Unfortunately, making UIs look pretty has not been in my job description up until this point so I have a bit to learn.
Read more

No comments

RIA Prototype client using BlazeDS messaging and JMS - Overview

Objectives

In this multi-part post, I will present a prototype that I developed that examines the integration of BlazeDS with a Java 2 Enterprise Edition (J2EE) messaging back-end. I have split the posting into three sections the first being an overview, the second presenting the Flex client and the third dealing with J2EE integration using EJB3. I recognize that many of you use other back-end server technologies such as Cold Fusion, PHP, or Ruby so you can ignore the third posting if you want to although the server Flex configuration files may be the same.

My objectives for writing the prototype were the following:

  • Configure BlazeDS messaging between a J2EE JMS topic and Flex clients
  • Examine the difference between BlazeDS polling and long-polling messaging
  • Tweak the various BlazeDS configuration parameters and observe the effects on the J2EE application server
  • Demonstrate Flex remoting with EJB3
  • Gain experience working with the Flex charting components for real-time charting application
  • Ensure that the client components utilize memory efficiently

Prototype Overview

I chose to develop a dashboard application that basically plots the value of three performance parameters in real time. This prototype mimics the functionality of an AIR application that I will be writing to monitor a production J2EE web application. The prototype application consists of a line chart that plots the performance parameters in real time and a bar chart that shows the instantaneous value for each parameter. The parameter values are generated randomly by the backend server code which places a value object containing these values into a JMS topic that the BlazeDS message broker is listening to. These messages will be forwarded to the Flex client when it is connected to the topic. The following diagram illustrates the basic configuration of the prototype.

Prototype Overview

The Flex client is used to start and/or stop a standard EJB timer session bean which creates a metrics data value object and sends it to a JMS topic (with topics messages are delivered to all subscribers) every time the timer fires. The user can set the frequency that the timer fires from the client. The EJB timer is controlled from the client via remote method calls. An EJB3 adaptor written by Ryan Norris was used to interface the Flex message broker with the J2EE application server. This link will take you to Ryan’s EJB and Flex Integration component.

The JMSAdapter class that is shipped BlazeDS is used to connect the message broker to the JMS topic and forwards messages to all Flex client subscribers. This adapter is feature rich and allows you to set about any configuration setting that a JMS client would need to. I even successfully tested connecting to a secured topic with no problems!

The following is a screenshot of the Flex client. It is not pretty, but it is an effective tool for exploring Flex and BlazeDS messaging. Click here for a full size image.

Dashboard Thumbnail

References

I would also like share many of the excellent references that I have found while developing this prototype. Of course the BlazeDS Developers Guide is a must read but it can be a bit overwhelming if you just want to get a sense of the big picture. I found the article entitled Introduction to the Flex Message Service to be an excellent introduction into Flex messaging. It is perhaps my personal favorite. You might also want to check it out an article titled Getting started with BlazeDS which provides a gentle introduction into BlazeDS messaging. Finally, there is an article on the Flex Developers Journal website titled How to Create a Multi User Flex Application Using JMS. Be warned that your browser will be spammed with all sorts of advertisements, a pet peeve of mine, but I suppose the Flex Developers Journal needs to pay the bills somehow. Stay tuned for some code!

No comments

Next Page »