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 howto apply design pattern ? 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 "howto apply design pattern ?" Watch "howto apply design pattern ?" New topic

howto apply design pattern ?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, good day everyone, i'm new to design pattern and i'm here would like everyone contribute some ideas to me as what pattern should i apply into my case

initially, i have 3 webpage which keep user interface setting and i list down all belongs fields as follow :




- previous button --> goto previous page
- next button --> goto next page
- preview button--> display preview of interface base on user selection
- save button --> save created interface

program description :

step1. store user selection

step2. based on user selection, create page like body.jsp, navigation_bar.jsp,footer.jsp and so on (all these jsp file will implement tiles)

step3. detect user action, preview or save

question :
in my case, what design pattern should i use ? and what are the major class that should involved if you can provide ? thank you !!
[ October 03, 2004: Message edited by: Alvin chew ]
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
anyone have idea ?
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
In my opinion, design patterns are applied at a much finer level of detail. With other words, your problem is too big to apply a design pattern to.

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
what if facade pattern ? will it be suitable ?
Maxim Katcharov
Ranch Hand

Joined: Sep 07, 2004
Posts: 113
I don't see any sort of problem with what you're describing. If you were more specific, or mentioned which parts of this bothered you, then a pattern would be easier to detect.

If you think a section of your system can be used to do something, but is too complex to be used well, you can use a facade to provide a nice usable set of methods to be used.

Say you have a very large amount of classes that need to be accessed to register a student. You can put them behind a facade, and have the facade take care of all the work for you. You just call one method - registerStudent. Sort of a limited example, but you should get the idea.

I don't know if the classes you use to accomplish this are too complex and not subject to change, so I can't say if the facade pattern can be applied.

Don't try to find an excuse to apply some sort of pattern - patterns are solid and standard solutions to problems. Just a thought.
I agree. Here's the link:
subject: howto apply design pattern ?
It's not a secret anymore!