Results 1 to 2 of 2
- 03-12-2012, 04:24 AM #1Member
- Join Date
- Mar 2012
- Rep Power
Question based on MVC - require responses ASAP please
Hi there, I already have a general understanding of what the MVC structure entails, however one thing that confuses me is how each class is stored - more specifically the use of packages within a netbeans project for M-V-C. (Where classes for each are placed within their respective packages/folders).
As of now I have a deadline of tomorrow night for a group project and whilst we believe the classes interact in a MVC structure, we have all classes within one package/folder. I've spoken to other groups who have seperated them into different packages, but unforunately in our attempts to restructure our code we have run into errors (which mainly involves a few minor adjustments to one of the controller classes with Listeners).
My university doesn't specify the need to have differing packages however marks are awarded for "good Model-View structure".
Whilst I do understand that going directly to the source (lecturers) would provide a definitive answer this isn't possible at the moment so in the meantime I would be grateful for your opinions as I'm stressing over this and need to be awake in a few hours.
Last edited by icedy; 03-12-2012 at 04:27 AM.
- 03-13-2012, 01:58 AM #2
- Join Date
- Mar 2011
- London, UK
- Blog Entries
- Rep Power
Re: Question based on MVC - require responses ASAP please
The package isn't so important, so long as the model code is in its own class and the view code in its own class. The observer and listener classes can be private inner classes of the view class, but if they get too big they should be moved to their own seperate class. I think putting the observers and listeners in their own packages would be counter productive, because you would have to work between two or more packages when working on the view.
- By Mario_1990 in forum New To JavaReplies: 20Last Post: 08-19-2011, 06:24 PM
- By talk_to_vivekmishra in forum CDC and Personal ProfileReplies: 3Last Post: 12-30-2010, 11:07 AM
- By nura23 in forum New To JavaReplies: 5Last Post: 01-10-2010, 03:41 AM
- By intelli in forum New To JavaReplies: 1Last Post: 04-18-2009, 06:18 PM
- By Shaolin in forum JavaServer Pages (JSP) and JSTLReplies: 13Last Post: 07-16-2008, 12:36 AM