• Post Reply Bookmark Topic Watch Topic
  • New Topic

MVC implementation

 
Vrinda Werdel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I just wanted to know if what I knew about it MVC implementation is right.
From what I have understood, we design classes that manange the GUI(the view) , define listener classes for all the gui components (the controller, which, effectively intercept the events help us do the task required of that gui component) and finally we have classes that encapsulate the domain data and behaviour.
All I can understand from this is the clean logical separation of responsibilities.
Is this all there is to implementing the MVC? or is there more to it than meets (my) eyes?

Appreciate your responses.
Vrinda
 
Mark Waldrop
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Vrinda,
You idea is pretty much right.
In code that I maintain and develop.. a lot of times the view and controller are combined into one class and then the model (an encapsulation of all your data) is in another class.
Hopes this helps!
Mark
 
james airey
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The way of splitting them up I tend to use is to say "What if I want to distribute this application in 2 formats?".
How much of my code is common, and contains the core functionality? That's the model.
How much of it changes if I change distribution from a website to WAP? That's the view.
The controller sits in the middle.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!