• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

howto apply design pattern ?

 
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 :

page1.jsp


page2.jsp


page3.jsp


- 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
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anyone have idea ?
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what if facade pattern ? will it be suitable ?
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic