*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Tabbed panel design pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Tabbed panel design pattern" Watch "Tabbed panel design pattern" New topic
Author

Tabbed panel design pattern

Dean Reedy
Ranch Hand

Joined: Sep 10, 2001
Posts: 89
I am new to using design patterns and I was wondering does anyone have any recommendations for my next project.
Basic Prject definitions:
I will be using a tabbed panel
Each panel will be used for gathering information
Some panels will read data for other panels and current outputs or perform database updates.
Any ideas or guidance would be great. I can write it as one big class file but I was hoping to use some design pattern.
I know, I have been pretty generic.
Thanks,
Dean
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I know, I have been pretty generic.
So I'll be pretty generic in return.
Without knowing more about your application, this seems like a pretty good match for MVC (Model, View, Controller). It's not a pattern in the "Gang Of Four" sense, but it's a good choice for a system with potentially multiple input/output "views" (your tabbed panels), and a single model (your database and "current values").
Rather than go into detail here, I encourage you to search the web for "MVC" and "Model View Controller".
As an aside, it seems a little strange to me to be deciding the User Interface before you understand the internals. How do you know that a multi-panel tabbed interface will turn out to be appropriate?


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Dean Reedy
Ranch Hand

Joined: Sep 10, 2001
Posts: 89
This project is an internal project. The application will be setting up new catalogs into our system. I am currently the person in charge of setups.
The tabbed panel seems to be a good choice as there is quite a bit of data to input and this data can be broken down into logical groups. I thought about the wizards style, but I like the tabbed panel as a user interface.
I will start looking for a MVC on the net. In short, I just do not want to have one big class for my application, I am looking for a good way to break it apart into smaller class and thus possible being easier to manage in the future.
Thanks again.
Dean
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
The tabbed panel seems to be a good choice as there is quite a bit of data to input and this data can be broken down into logical groups
OK. But make sure that there are no hidden dependencies between fields. There can be big usability problems with multiple pages which either need to be filled in in a specific order, or retroactively modify or invalidate stuff you have already entered when you enter or change something else. And adding page validation and enable/disable rules later can be a pain for developers and users.
Making large data entry systems is often not as simple as it appears at first. It sounds as though you are already pretty familiar with the actual data (if not, study and understand that first), but have you thought deeply about how it might change in the future?
Typical "gotcha"s are things like a page being optional or (worse) mandatory in some circumstances, or (the one I dislike the most) certain pages or fields being allowed to appear multiple times.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Is this interface a web interface or a Swing interface? It changes the design quite a bit...
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Dean Reedy
Ranch Hand

Joined: Sep 10, 2001
Posts: 89
I have good knowledge of the data. The rules can be complicated on the data entered. This Program should replace 80 pages of step by step process. I will have this as a Swing interface. This will also have to insert into oracle tables, as well as load file via ftp and process these files using Unix shells.
I apprecaite all of the advice.
I did find a good example of breaking down an application into smaller parts and groups logicailly at Sun. It is their DiverLog example, which by chance uses JTabbedPane. Nice step by step example, which has shown me one way of designing and breakdown the class files into simpler parts.
Thanks,
Dean
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
I think you need a domain model here. Trying to do this in the GUI sounds like a really bad idea. For a good introduction to domain modeling, see Eric Evan's book at:
http://www.domainlanguage.com/book/book.html
Kyle
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tabbed panel design pattern