Exforsys

Online Training

Appropriate design pattern to use for this....

This is a discussion on Appropriate design pattern to use for this.... within the Software Patterns forums, part of the Testing category; Hi, I'm a java developer. We have a new requirement to split our existing application code that creates different ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-10-2005, 05:14 PM
swethasandy@gmail.com
Guest
 
Posts: n/a
Appropriate design pattern to use for this....

Hi,

I'm a java developer. We have a new requirement to split our existing
application code that creates different menus. Currently, this is done
by a single class file that creates the menu items and displays them on
the UI.

The requirement is that the menu items that needs to be created can
change based on the device type and underlying protocol being used and
hence the application may have different menus, that can vary based on
where this application is running from i.e. which device type and which
protocol used for communication? So, we would like to seperate the
creation of menu items in such a way that the common behavior is in the
base class and the protocol and device specific behavior is achieved in
the derived classes. Also, the order of the menu items must be
preserved across different model types and protocol implementation i.e.
if the menus are displayed in a particular order on one model type, the
order must remain the same of a different model type and same with the
protocol specific order.

We are currently thinking of using a Mediator pattern for this, but I
would like to know if there is a more appropriate design pattern to use
to address this problem instead of a Mediator pattern.

Thanks,
Sam

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-29-2005, 10:49 AM
pven
Guest
 
Posts: n/a
Re: Appropriate design pattern to use for this....

Hi,

Can you check the Builder Design pattern.

It allows you to construct different products ( menu's)
run-time using an common alogrithm for construction.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:10 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.