• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SCJD and MVC ones again

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
According t what I have read about MVC patter I see three options to implement assignment:
1) Use famous observer pattern

2) Make POJO controllers. Controller would implement Then I would define method in view In this method for every gui element I need I would call where is my controller. Then in controller in method I would make my choices according to action commands.

3) Make POJO controllers. In controller I would define private classes (each implementing ActionListener or WindowEvent etc) implementing calls to businesses logic . In view I would define getters returning gui elements I'am interested in. In controller I would call those getters. On returned GUI elements I would call passing already defined objects <ActionListener>.

I personally think 3 version is the most clean but I'm not really sure is it acceptable from exterminator point of view. What do you think of that ?
Jacek
a) sorry for my English
b) I'm not strict GUI developer so sorry if you consider my questions silly
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jacek,

Welcome to the JavaRanch!

Whatever approach you take will be fine if you don't break any must requirement, just explain your decisions in the choices.txt file.

And for the record. I used:
- observer pattern (I have 1 panel to enter configuration settings, which is used to enter server details, connection properties in local and networked mode)
- ActionListeners (both private -named- inner classes and anonymous inner classes)
- a controller (which holds a reference to one of the business service implementations depending on the mode the application is running in)

Kind regards,
Roel
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic