File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Help with Application Module Design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Help with Application Module Design" Watch "Help with Application Module Design" New topic

Help with Application Module Design

Scott Updike
Ranch Hand

Joined: Feb 16, 2006
Posts: 92
A little Background:
I have a requirement to allow the end user of our Struts application to design their own inventory groups. For example, they could configure a group called Clothing and they could select from a pre-defined list of group attributes like color, size, sex, condition, etc. Based on their selection, the inventory entry screen would only show the fields related to the attributes "assigned" to this particular group. Hence, the screen for inventory items of type Clothing would display the fields for color, sex, and condition, where as the inventroy screen for items of type, say, Baseball Cards, would only see attributes for condition, year, etc. Fields displayed correspond to attributes assigned during setup.

Going Forward:
Can someone point me to some resources (design patterns, etc) that would allow me to start analyzing this requirement more thoroughly?

Thanks in advance,
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I can imagine each product object has a set of attributes, each attribute has a name, value and type, each type has an editor that can build one GUI field and validate user input. The editor might include a list of valid values (dropdown) or rules like "Number between 1 and 1000". I'd guess lots of GUI builder tools have done this over the years, but I don't know any published "pattern" for it.

See the recent thread on Prototype Pattern. You could construct one BaseballCard object (from specs in a database?) and then clone() it when somebody wants to make a new one.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: Help with Application Module Design
It's not a secret anymore!