File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FBNS: Is my MVC implementation (GUI) correct? It's based on Habibi and Trottier books

 
Azbel Eden
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, JavaRanchers.
I was about to upload my assignment when I noticed, after giving it a final review, that my MVC implementation seems to be weak. It is based on existing SCJD-related bibliography as Habibi and Trottier books. Despite my mental effort I've made the last months I think I would need to re-design my GUI and spend about a one week more to fix it.

Here's my aproach, it's quite simple:


As you can see, the inner actionlistener classes play the CONTROLLER role, since receive the events from the GUI (VIEW), make references to GUI components, as table and comboboxes, and call methods to my business services provider class, FlightManager (processes the DATA). This class has methods such bookFlight(), searchFlights(), closeConnection().

Do you think that this aproach is sufficient, or do I need to implement a less coupled implementation of MVC, such as Observer-Observable? Or simple try something else, will my simply implementation fail (loosing points)?

Thanks in advance.

P.D. How do I make the code block font smaller?
[ October 27, 2005: Message edited by: Azbel Eden ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11833
181
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Azbel,

There is nothing wrong with coupling the view and controller as you have done, however I would recommend you specify why you chose to do this in your design document.

As an alternative, you may want to look at the "View-Helper" design pattern, which you might feel describes your usage as well. You might also be interested in reading this post where Max and I discussed what makes an MVC.

P.D. How do I make the code block font smaller?
Why would you want to? It looks fine to me using both Opera and Internet Explorer.

Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic