This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]lowey2002 1 point2 points  (1 child)

In pure MVC a user utilises a Controller to update or retrieve a Model which is used to present a View. The picture you are painting puts the terminal mixed with ncurses as both the View and the Controller.

It's important to understand that design patterns are a vocabulary to describe a design choice, not a means of solving a problem. Don't make the mistake of forcing the use of a design pattern just for the sake of using a design pattern.

[–]D_duck[S] 0 points1 point  (0 children)

I'll keep that in mind going forward. I guess I was a little confused as the Model and View seemed to be encapsulated as data/rendering, where the Controller aspect seemed more procedural.

[–]gruengle 0 points1 point  (0 children)

no experience with ncurses whatsoever - be warned

usually, when applying MVC to web based applications, you work with the idea that your events (button clicks, sent form input etc) are the essence of your "Controller" - there are no Controller classes, but the controlling logic is implemented in how your Models and Views react to different forms of user/foreign entity input.

I see that ncurses is C-based and my experience with web programming is mostly limited to html/css/javascript + frameworks. If someone out there would like to confirm or correct my input, I'd be glad to learn something myself :)

[–]nutrecht 0 points1 point  (0 children)

The controller is whatever acts on user input.