aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes FBNS: Is my MVC implementation (GUI) correct? It's based on Habibi and Trottier books Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "FBNS: Is my MVC implementation (GUI) correct? It Watch "FBNS: Is my MVC implementation (GUI) correct? It New topic
Author

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

Azbel Eden
Greenhorn

Joined: Oct 05, 2005
Posts: 16
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 ]

Sun Certified Enterprise Architect (Part I)<br />Sun Certified Java Developer<br />Sun Certified Java Programmer
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11423
    
  85

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


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FBNS: Is my MVC implementation (GUI) correct? It's based on Habibi and Trottier books