News for hackers. Stuff that matters.
Re:The Repeated Deaths of OOP (2015) by dragonwriter on Sunday June 06, 2021 @08:06AM (#27412584)
> I've never seen MVC used in anything but single-run applications that end with an discrete output.

MVCs original use was GUIs, which are not “single run applications with a discrete output”, but instead “software with a perpetual state and loop”. Yes, its since been adapted to web use, which usually fits that single-run description, but still...

Re:The Repeated Deaths of OOP (2015) by vbsteven on Sunday June 06, 2021 @09:12AM (#27412926)
Single run VS state+loop is not the best description of the distinction between MVC and ECS. I look at it like this:

In MVC a typical interaction goes like this:

    -> INPUT: user interacts with view
    -> view triggers controller action
    -> controller updates the model
    -> controller passes model to view
    -> OUTPUT: view changes
    -> (rinse and repeat)
The important part here is that there is a single input that flows through the steps and generates output. This maps well to web frameworks where the input is an HTTP Request and the output is the Response. It also maps well to GUI frameworks where the input is a user interaction event and the output is changes to UI on screen. The perpetual "state and loop" for triggering the next input from the previous output is implementation detail and doesn't really matter for the pattern.

ECS is different because it doesn't have discrete interactions converting input->output. Instead they are built up out of a number of systems all interacting with eachother. User inputs enter a system and that triggers a complex flow of other system interactions, eventually generating 0..N outputs.

Disclaimer: I have lots of experience using MVC in various domains, not that much with ECS.

Re:The Repeated Deaths of OOP (2015) by ehnto on Sunday June 06, 2021 @08:21AM (#27412656)
That's interesting, I knew it was a pattern older than it's use in the web but hadn't given it much thought. There's certainly nothing inherent in either design that limits them to either use case.
Re:The Repeated Deaths of OOP (2015) by slver on Sunday June 06, 2021 @12:28PM (#27414198)
Keep in mind the "web" use of MVC originates with Ruby on Rails. Which actually significantly misunderstood what MVC is...