• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hierarchical MVC?

 
Nick Kerr
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone adopted the HMVC pattern when implementing their SCJD solution?

Im wondering how much effort I should put into implementing an MVC design for my SCJD project. I could implement a simple MVC where I have a single controller that performs all functions or I could create an HMVC framework whereby every UI component has its own Model View and Controller.

Please let me know what approach you chose.

Thanks
Nick
 
Dalton Filho
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to implement all functions in a single controller. Use the State pattern to delegate controller functionality to the right state object.

The good thing about this pattern is that your view classes can be decoupled from the controller classes. You can change the state classes whenever you want because the view classes will communicate with the controller classes through a standard interface defined by that context class.
[ August 26, 2006: Message edited by: Dalton R. Filho ]
 
Nick Kerr
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the good suggestion Dalton,

I'm also contemplating the chain of responsibility pattern within my Controllers.

I'm curious about how many people have gone to the length of implementing MVC for every UI component or whether they have just implemented it at the application level?

If anyone has submitted and passed the SCJD with a high grade, I'd be most grateful to hear from you about what level of MVC you implemented.

Thanks

Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic