• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic