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

Packages dependency problem

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ranchers,

I implement mvc in my assigment, i have a services layer than is my model a controller class than manages interaction between gui and model and gui classes than have a reference to the controller. I have a trouble because i declared my controller in middleware package and gui classes in gui package, but both packages depends on each other (i pass my classes through a metrics program and this inform about the double dependency between gui and middelware packages).

In some other threads i read than gui classes no need to have a reference to the controller making a lose coupling between gui and controller (but i don't know how do this) and searching an example of mvc i found the strategy pattern implemented in the controller declared for the gui but model, view and controller classes are declared in the same package. It is a good design?, how i can change my implementation to resolve package dependency?

Thanks to all.
 
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about putting your controller to gui package?


BTW: What is the name of sotware you used? I'd like to try it too.
 
Gabriel Vargas
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,

I create and put my controller interface in the gui package and conserve my controller impl in my middleware package, it is a good approach?. I develop my project with netbeans and the plugin is for eclipse so i have my project now for eclipse and netbeans.

Eclipse metrics

Also i see my statistics at

Locmetrics

because discussion in this thread:

Number of classes/interfaces

Some advice about this topic is appreciated. Thanks.
 
John Stone
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why does your gui packagae depend on middlerware package? Your gui should use only Controller interface.

(I have both in gui package.)
 
Gabriel Vargas
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi john.


Why does your gui packagae depend on middlerware package? Your gui should use only Controller interface.

(I have both in gui package.)



I put mi controller interface in gui package and controller implementation in middleware package because gui only have user interface classes and middleware have integration classes like the controller implementation, before i haven't this interface , i have only the implementation but i think is necesary to decoupling packages.
[ August 30, 2007: Message edited by: Gabriel Vargas ]
 
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic