• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX:my design,any opinion is appreciated

 
janvy wei
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi,Fellow Ranchers.
above is my class diagram . any opinion is appreciated.
i use three tiers and apply MVC pattern.
the model interface is a abstract class -- BookerModel
as you know,the programe has three mode,so i have three concrete model classes -- AloneBookerModel,DefaultBookModel,ServerBookerModel.
as the programe should show different dialog accroding to different mode when it is launched to gain the info such as db location and so on.
so,i have three classes --DefaultModeInfoPanel,ServerModelInfoPanel,AloneModeInfoPanel which extend JPanel.
and,i apply the abstract factory pattern,the abstractfactory is BookerFactory,it has two abstract methods --- createModeInfoPanel() and createBookerModel(),and it has three concretefactories --- DefaultBookerFactory,ServerBookerFactory and AlonebookerFactory.
ok,the next is the main client ui,i have a interface bookerPanel extends Observer interface to provide the method setBookerModel(BookerModel bm),and have four classes implement it,they are SearchPanel, BookPanel,StatusPanel,ResultPanel,which extend JPanel.
they are the view part of the MVC.
and i'll provide some event handlers such as SearchAction,BookAction,which are the controllers.
next is the server package.
it's so simple,only a Server interface which provides the book() method and the search() method.and a ServerImpl which implements the interface.
the last is the db package.
Data implements DBAccess interface
in AloneBookerModel,it accesses the Data class directly by keep a Data reference,
in DefaultBookerModel,it delegates the request of search and book to the ServerImpl by keep a ServerImpl reference
[ February 23, 2004: Message edited by: janvy wei ]
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Janvy,
I can't view your class diagram. The design that you've outlined sounds good to me.
 
janvy wei
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,George.
thanks your reply.
you are always the first guy replys me ,your opinion is important to me.
if you use IE,you may right-click and select "show picture" to show my class diagram.
and anybody's any opion is appreciated,thanks in advanced.
[ February 22, 2004: Message edited by: janvy wei ]
 
Jonathan Liu
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot see your picture either
 
janvy wei
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's wrong?i could see it at all time
[ February 23, 2004: Message edited by: janvy wei ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Janvy
Probably Anzwers.com does not allow anyone but the site owner to get access to a file directly. Since you are the site owner you can see the JPG file. Since we are not, we can only access html files from that site.
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic