We're developing a big application with a vast GUI and complex business layer. Without going into too much detail, the application is currently implemented in a rich native client, but functionality is roughly seperated into core business logic related parts and the (also complex) GUI which is based on an MVC paradigm. (Here i must say that the "model" of MVC is tightly linked to the GUI, given that it comes from Windows GUI library)
Plans are to migrate this app to the web, where proper separation will become even more important.
The application features Undo/Redo, based on a classic Command pattern that encapsulates business-related logic. However this command pattern currently "lives" in the GUI part, and commands themselves have great dependencies on the GUI subsystem (notable for UI refresh related functions). Our idea is to move it deeper to the business core layers, which will become part of the backend of a potential web-based solution.
But this raises a fundamental question. Is Undo/Redo functionality supposed to live in the business layer at all? Where would you put it and how would you justify that design choice?