Win a copy of Rust Web Development this week in the Other Languages forum!

Glen Ihrig

+ Follow
since Mar 12, 2007
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Glen Ihrig

Thank you both for your insightful reply. It is encouraging to have two very different perspectives arriving at essentially the same conclusion: "Make the most of the opportunity!"

I, too was concerned about why I was chosen for this position, I know they were looking for at least two months and that was only because their previous developer moved out of the area.

Having heard from both of you that the issues apparently to be considered are not centered around faults in the technology gives me encouragement to study all aspects of the application, including the role it plays in this business.

The honest encouragement is appreciated!


13 years ago
Hello all,

I have taken on a job as a contract developer where I am having difficulty learning the application, and I feel that I'm in over my head. I've discussed this with my client/employer and he is, none the less, interested in trying out the relationship to see how it works out. My client is a small business with around 100 employees, the application is critical to the business operation and I am the only developer.

I am posting here in hopes of getting opinions on the sanity of the environment and application. Is my inability to pick up the workings of this application due just to my own ignorance, or does this application and/or its environment have too many tell-tale signs of an unmaintainable app?

First, a little about may abilities:

I am an intermediate level developer having several years experience in VBA for MS Access, Cold Fusion and PHP.

In the Java world, I have intently studied Java and GWT at home for the past year, but have no production experience with Java. I am comfortable with Eclipse and can import or create fairly complex Java projects (from books, tutorials, etc), get them compiled and running on Tomcat. I have a proven ability to learn and apply from books, web sites, etc.

Some of the Java books I have studied:

Head First Java
Head First OOA&D
Head First Design Patterns
Google Web Toolkit Applications
Pro Web 2.0 Application Development with GWT
Spring Recipes
Google Guice
SCJP Study Guide

The first two above I found to be easy, but informative. I only skimmed HF Design Patterns, but I expect this would fairly easy as well.

The GWT, Spring and Guice books were more difficult. I am able to get the example apps working and make some sense of the code, but the finer design points necessary to building my own apps with the ideas presented are still somewhat beyond my reach.
I found the SCJP Study Guide surprisingly difficult.

The application:

The application is built on Appfuse version 1 using Spring, Struts version 1. and Hibernate. The application uses many JSPs pre-compiled using Xdoclet and has a browser based AJAX UI built with Prototype and Scriptaculous.

The app has 420 classes and 105 .xml files and Runs on Apache Tomcat. Most of the configuration data is contained in .xml or .properties files, some is contained in the database and some is hard coded into the Java source.

The app is compiled by a complex Ant script, on the production server. I have copied the source on a local Eclipse installation but have not been able to get it to compile there due to problems getting Eclipse to pre-compile the JSP's.

There are no design or requirements documents, and no end user documentation. I do have a 16 page document that details some of the internal class/method/Spring Bean relationships and work flow.

The app runs on Tomcat 5.0 under Ubuntu Linux on a virtual machine. I see no evidence that any software patching/updates have ever been done. There is no working development/testing environment and no backup of the production application(!). An IT support person was hired two months ago and he is working on application backup/continuity, but this seems to be a low priority project, his time pretty much consumed supporting end users.

The app interacts with a commercial accounting system on a database level and downloads data from a manufacturer's web site using a complex series of wget calls. This app also builds a dynamic series of web pages which it automatically loads onto the business web site. The pages are in a master list/detail relationship and are auto generated from information contained in the app's database plus data and images automatically downloaded and processed.

The developer who designed and built this app has not been with the company for 2 years and is no longer available, The machine he used to develop the app is no longer available. I am the only developer at the company.

The task for which I was hired is to add features to this application. These features will extend the UI and Data Model in small ways and export new records to the accounting system. The problem here is that access to the accounting database is not supported (or documented) by the accounting vendor, so adding new records may be anywhere from difficult to unwise or even impossible.

Sanity check please:

Does the above sound like something that might be successfully maintained by an intermediate level developer new to JEE? Do you see any serious red flags in what I have written.

I am grateful for any and all comments.


13 years ago
HI Costa,

I am pretty new to this Composition, Association, Aggregation business myself, but after a lengthy study of "Head First OOA&D" and "The Object-Oriented Thought Process" and many internet articles, I have come the following conclusions regarding your questions:

if I am having a class1 that USE class2 without having instance variable pointing to class2, Is that Association?

Yes, while the classes are clearly associated, the instance of class2 is independent and may participate in relationships with other objects. This is true as long as class2 is instantiated elsewhere. It make no difference how class1 accesses class2.

if class1 is having a instance variable which reference class2, while class1 never instantiated class2, is this Aggregation?

No. This is still Association. Aggregation is not clearly defined beyond the UML symbol (white diamond). I (and notable others) believe you are best ignoring Aggregation, it doesn't really exist...

if the previous case but class1 instantiated class2, is this composition.

Yes. The key here is that class1 "owns" this instance of class2, the life span of these instances are the same. They are truly composed into a new whole.

For more detail, and examples, see this thread

Differing opinions are welcome, but please read the linked thread first.

Hello All,

I am in the process of developing my first "real" app using SWT Designer from Instantiations for the UI layer.

I planned to use the ClientBilling example discussed the SWT Designer's docs as a model to follow in completing my first app, and I'm wondering if the ClientBilling example really represents a best practices approach.

A class diagram is here:

Individual source files are here:

Others are here also, just use the appropriate class name if interested.

Full source may be downloaded from:

ClientBillingUI class has:

Fields: 54
Methods: 12
Lines of code per method min: 9, max 273, avg: 63
Lines of code: 1041

I get the idea from Fowler's Refactoring (sections on Long Method and Large Class) that this code may not be well designed from a best practices viewpoint.

I would really appreciate any comments from those more familiar than I with Today's best practices regarding this app. Specifically in terms of good/bad design and future maintainability.

Thanks, your comments are very much appreciated.

Just in case there is any doubt about Eclipse on Mac OS X...

I Work with Eclipse and commercial tools from Visual Paradigm and Instantiations on OS X.

So far I have been able to do everything with Eclipse on OS X that I can do with Eclipse on Windows.

Eclipse works fine for me under OS X.

As for the JDK on OS X, it's installed with Mac Developer Tools from the OS X install media. The Mac I bought in November 2006 came with JDK 1.4. If you want to up grade to a newer JDK see:

14 years ago
Right click My Computer and select "Properties".
Select the "General" tab.

If the System name does not contain "x64" or "64 bit" then you are running 32 bit windows.

64 bit windows is a high performance, usually server, operating system although there is a Windows XP Professional 64 bit. You would probably know if you had this.
[ March 15, 2007: Message edited by: Glen Ihrig ]
14 years ago

First of all thanks for all the helpful input - A great first impression of Java Ranch.

@Michael Dunn

a number of IDE's link their 'Help' to the api docs.

I'm using Eclipse and this feature (F2) is often helpful when reviewing existing code. I'd never thought to just type in my best guess to see what it turned up.

I played around with this a bit and it is useful. I can see making more use of this feature as I get to know the API, right now I'm just trying to get my wits around what's available.

@Mark Webber

I learned about the docs on from Google, I think. It's the Sun API repackaged in Windows HtmlHelp format. I often find that HtmlHelp is easier to search than html docs, but that's just a preference. It's that same API as can be found on Sun's site.

I guess mentioning this qualifies as a "red herring", my apologies for that.

Your quote, "Concatenation of localized strings...," seems to be from

I guess you win the product trivia prize Yes that information is from Instantiations' CodePro product.

Have you tried Sun's API?

Yes, but that's what got me overwhelmed in the first place, not that the same data packaged in HtmlHelp format is really any different. I'm just having difficulty finding what I need, when I don't know what to call it.

@Paul Clapham

You're right, is a resource to be down loaded for those who prefer Windows HtmlHelp format - _please_ don't download all that data on my behalf, it's the same data provided by Sun, just repackaged. I really should not have mentioned that site as it only confused my request.

but when there are over 5,000 classes in the API it could easily overload you with results. (The number of classes is part of the reason it's so daunting.)

That is exactly the problem. What I was hoping to find was some kind of cross reference, kind of like a table of contents to this voluminous sea of data. I suppose you could argue that the class names themselves are sort of a contents list, I just don't know them well enough yet.


So, It seems the bottom line is that Java has a sort of a surprise twist in the learning curve for beginners. Just learning the language is not enough, then You have to learn the APIs as well, and that can be quite overwhelming for the rank beginner. But not to fear, you'll get it in time...

Am I correct then in believing that those who have posted above have found the API docs to be pretty much all that is needed?

You don't use books like "Java Almanac" or "Java In a Nutshell"? Did you find these, or similar titles useful in learning the API?

Head First Java (pg 158-159) recommends using Java In a Nutshell to locate the class you need, then finding the details in the official API docs. I am a little hesitant to spend ~$30 for a copy of the APIs unless it's really going to help me learn what I am unable to learn by browsing the API docs. I guess I need to visit the _real_ book store and have a look for myself.

Thanks again for all your input, this has been a real concern for me. Knowing that I'm on the right track and just need to keep going has been very encouraging, even if I still don't know my String from a MessageFormat

14 years ago
Hello all,

This is my first post to Java Ranch, and frankly I don't understand why this question doesn't get asked a LOT, maybe I have missed something BIG...

How the **** do you guys find your way around the Java API Docs?

Maybe I'm just totally spoiled by other languages' docs, but it seems to me that if I want a class to perform a basic programming function, I should be able to search for the _general_function_ and find a list of applicable classes.

Referring to the "JDK 5.0 Documentation" in HtmlHelp format from

1. Suppose I want to build a string from a bunch of fragments - I've been told that "abc" + " " + "xyz" is evil...

"Concatenation of localized strings to produce a longer string is not valid because the word order changes from one locale to the next."

The recommended alternative from this source is "Use the class Message to construct the string..."

A search for "Message" returns a bunch of stuff, but no classes by that name...

A search for the logical "concatenation" returns one entry for "concatenateTransform" (what ever that is - docs go way over my head).

A search for "String" returns a _large_ number of results, none of which mention concatenation. Searching the entry for class "String" finally reveals this:

"String concatenation is implemented through the StringBuilder(or StringBuffer) class and its append method."

But the "append" method is not mentioned further..

Finally, after several hours of frustration and much googling, I discover that the advice I had was in error. The class that assembles locale friendly strings is "MessageFormat".

2. Suppose I want to know about the various Java data types and their memory requirements?

3. The String class has a lot of functionality but apparently converting a string to Title Case is not among them. At least a search within the String class entry for "title case" returns nothing and "case" finds a bunch of entries relating upperCase, lowerCase and caseInsensitve.

The point is, over the last 25 years, I have worked with a variety of languages from 6803 ASM to various flavors of Basic, Pascal, DBase, ColdFusion and PHP. After working my way through "Head First Java", "Head First OOA&D" and working on "Head First Design Patterns", I feel that the API docs represent my steepest learning curve.

I have reviewed the recommendations at, but these don't provide much help.


"Java Almanac" looks good, but is rather out of date.
"Java In A Nutshell" appears to be largely a printed copy of Sun's API docs.

I have learned Java (to some extent), so now how do I quickly find my way around the API?

Thanks for any suggestions.

[ March 15, 2007: Message edited by: Glen Ihrig ]
14 years ago