Java Framework To Create Java Frameworks

By Angsuman Chakraborty, Gaea News Network
Thursday, January 26, 2006

I have seen way too many java frameworks, way beyond my limits of tolerance. And I have found a perfect solution.

Too many java programmer wants to create his own framework. What we need is a java framework to create java frameworks. So every Tom, Dick and Nancy can create their own fancy framework on a weekend and let it loose on the world at large, thanks to the generosity of Sourceforge / Javaforge etc.

We also need a java framework to create documentation for created java frameworks. It will spew out stock documentation (maven style) containing beautiful phrases like - reliable, lightweight, embeddable, inversion of control, dependency injection, flexible etc.

The generated frameworks must be built on Maven, a framework which easily allows you to generate tons of useless documentation without breaking a sweat.

It should support XML based configuration and support a wide selection of other java frameworks like Spring, Struts, Webwork etc.

It should take at least a week to learn. It is advisable to have a steep learning curve with obtuse documentation. Anyone who finally masters it will be too tired and too horrified to ever venture into any other java frameworks.

I predict 2006 will be the year when we will finally see the first wave of such meta frameworks.

Discussion

Robert Muturi
December 3, 2006: 1:38 pm

The above java problem seems interesting.I am a beginner in java programming and would mind figuring out how the problem was solved.You can email me the solution thanks a lot.

July 21, 2006: 7:42 pm

@Alan & Mitchell
Is this some class assignment? Why do you both have the same problem? It appears rather simple. But first I want to know the context and who is Jeff?


Alan Guyer
July 21, 2006: 6:59 pm

I have the same problems as Mitchell Grow. I was wondering if anyone can help me.

July 13, 2006: 12:15 pm

Sure. Please email me with details using my contact form.


Mitchell Grow

Mitchell Grow
July 12, 2006: 1:06 pm

How would you program for Java??

Jeff asks you to create a small Java program that loops through an array of toys ordered as a start to the inventory automation project. For now, he says you can use a sample list of possible items. The items you choose for the inventory list are ball, bat, bear, car, doll, game, glove, playstation, and train. In your sample program, keep a tally of the different items. If the item has already been mentioned, just increment that count as opposed to creating a new count for that item. You remember Jeff mentioning that orders for more than 4 items can sometimes cause stock outages. To alert the shipping department of situations where outages might occur, you decide to put an asterisk (*) before any item for which the customer has requested a quantity of 5 or more. At the end, print to the screen a summary of the items and their total count.

Here is a possible structure of your program. This program has a single class named “ToysInventory”. The class has some private attributes and three public methods: countToys, printItems, and main.

Feel free to design your program from scratch.

public class ToysInventory {

// declare counters to keep track of the number of each type of toys

private …

// Toys in our inventory

// declare an array to hold our inventory of toys

private String [] toysInventory = …

// count the number of each type of toys in our inventory.

// This method uses the “length” method on the array to get the number

// of toys in the inventory.

public void countToys () {

}

// Print the name of each toy, followed by its count.

// identify toys whose count exceeds five with a “*”.

public void printItems() {

}

// This is the main method of the class. It calls the methods of the class to

// perform its job.

public static void main (String [] args) {

// instantiate a class of “toysInventory”, then call its methods:

// countToys and printItems.

ToysInventory collection = new ToysInventory ();

}

(Hint: Use myArray.length to determine how long the order input array is. Use System.out.print() to print a portion of an output line, and use System.out.println() to print a line and the carriage return to the next line. Make sure you handle the case where the inventory item description is not among those listed above – such as could happen with a typo or error.)

Here is your order input array: “bear,” “train,” “car,” “ball,” “doll,” “ball,” “train,” “doll,” “game,” “train,” “bear,” “doll,” “train,” “car,” “ball,” “bat,” “glove,” “bat,” “b,” “doll,” “bear,” “ball,” “doll,” “bat,” “car,” “glove,” “train,” “doll,” “bear”

May 20, 2006: 7:57 pm

Wonderful article. BenjiSmith pretty much hit the nail on the head.


g hammer
February 8, 2006: 3:43 am

[...] Licensing fees are a major deterrent in product development in developing countries. As a result piracy is common. However you cannot sell software based upon pirated environment and without appropriate distribution license. The risks are too high. You have to therefore choose free platform like Java. Java comes with plethora of choices for IDE, frameworks (too many of them IMHO) and best of all it runs on all platform, including but not limited to Windows. [...]

January 30, 2006: 12:42 am

Your joking, are you? Your sarcasm at the tail end of the article gives you away. :-) Nice post.

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :