in reply to How realistic is separation of computation from it's display?
Turn the computation data model into something that can be "stepped". That is, instead of $computation->run(); set it up so that you can do something like
Assuming the computation data model is playing fair, it'll notify all views that it has changed after each step, giving each view a chance to redraw (or reconfigure itself and redraw). You're going to take a big performance hit, but if the point is to illustrate the computation, so be it.while ( ! $computation->done() ) { $computation->step() }
This is a standard technique in the MVC world.
The process of thinking through how to split a computation into steps, and what state needs to be maintained between steps, can be difficult, but is often be very insightful.
|
|---|