Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to achieve the ability of future functionality enhancements of user interface?

 
HiBob Chu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends:
In my assignment instruction:
**********************************************
Creating the user interface
...
Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a control scheme that will support this with minimal disruption to the users when this occurs.
**********************************************
Do your instruction has the same?
How to understand it? Who can give me any example
or advice to understand it?
[ November 27, 2002: Message edited by: HiBob Chu ]
 
Ge Zhang
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your name is similiar to that of one of my friends. Are you Chu Chang Geng or Hang Tou or Chu Ga Pi?
 
HiBob Chu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I am not .
Where are you from?
 
Andrea Gazzarini
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi HiBob,
in my implementation, i have tried to abstract the presentation tier from the specified requiremente of the assignment. This in terms of:
- managed objects: actually there are flight objects with 8 or 9 attributes. The name and the number of these aren't hard-coded on my client: they are retrieved from the database;
- MVC implementation: The view component is completely light, managing all the actions related to view (for example exit from the application). All other actions are installed by the controller component, so if I want another menu item on the menubar, I code it in my controller and it then install it on the view. For Each relevant XXXGUI component I have supplied a related XXXModel interface with a DefaultXXXModel used for the actual implementation.
- Business Delegate: the client interact with a business delegate interface, which in turns hide to the presentation tier the way of retrieving the remote or local service. Actually the remote service uses RMI, but if tomorrow anyone wants to extend the application using EJB, it must supply a delegate interface implementor, changing the way to connect to the service.
I think "future enhancements" means something like this.
Hope it helps.
 
Jawad Kakar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrea,

Could you please give an example and make this a bit more clear(i.e XXXModel, DefaultXXXModel) and how do you use them?
Moreover in your desing, Managed Object is your Bookable interface or this is something different.
If yes then your Bookable interface does not have any method, it is an interface which is implemented by Flight, Car "for future enhancements"
Thank you
Jawad
 
Thomas Fly
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Implement a "Document-Driven Programming" design; i.e., "hard code" as little as possible (preferably nothing). And since you can use j2sdk1.4.1, a key element of your DDP design should be an XML configuration file.
See http://thomasfly.com/SCJD.
 
HiBob Chu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi above friends:
My design's structure is like this:
MyView is in charge of creating and maintain all GUI components and include their action classes.
MyController provides all action functions which will be called by the action classes in MyView. And MyController's functions can update
the components in MyView by the functions provided
by MyView like : getXXXModel();
MyModel is in charge of generating data which is required by MyController functions.
So in future, if you want to change view you only need to modify MyView or MyClient; If you want to change the source you only need to modify MyModel.
Is it not far from the requirement of the instruction?
But the "hard code" is a problem to me:
For example ,when I get the price value from JTable, I code like this:
view.getTableModel().getValueAt(row, 4);
Is this "hard code". If it is, how should I do?
regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic