1

I've been reading up on MVC and I had a doubt. The example where the Model, View and Controller are all individual classes whose objects are created and used to deploy the application in another class. A GUI I've designed treats the Model, View and Controller as separate classes and for the most part changes can be made to each without breaking the other .However these separate classes are referenced within the Controller (UI) class. I have no 4th class that calls and creates objects for the Model, View and Controller. Does my setup still follow the MVC design methodology? Thanks.

3

First of all, what you're talking about is a design pattern. What this means is you constrain yourself to only doing certain manipulations in order to make your application more readable and maintainable. Keeping things separate, with specific purposes for each component will help to this end.

As for your specific question, it sounds fine to me. You don't need a 4th class to call the parts, it's a question of whether the parts call what they're supposed to, and importantly don't call parts that they shouldn't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.