{"title":"基于MVC模式的Java/Swing程序命令处理框架","authors":"A. Naderlinger, J. Templ","doi":"10.1145/1411732.1411738","DOIUrl":null,"url":null,"abstract":"We present a framework for command processing in Java/Swing programs based on the model-view-controller (MVC) pattern. In addition to standard approaches our framework supports (1) centralized exception handling, (2) premature command termination, (3) pre- and postprocessing of commands, (4) undo/redo based on event objects and model listeners, and (5) generic undo/redo commands. The framework has been applied successfully in a number of graphical editors as part of a tool chain for real time programming. It proved to increase the quality of the software by eliminating local exception handlers and by confining the impact of undo/redo to a small add-on to the model part of the application.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"167 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":"{\"title\":\"A framework for command processing in Java/Swing programs based on the MVC pattern\",\"authors\":\"A. Naderlinger, J. Templ\",\"doi\":\"10.1145/1411732.1411738\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We present a framework for command processing in Java/Swing programs based on the model-view-controller (MVC) pattern. In addition to standard approaches our framework supports (1) centralized exception handling, (2) premature command termination, (3) pre- and postprocessing of commands, (4) undo/redo based on event objects and model listeners, and (5) generic undo/redo commands. The framework has been applied successfully in a number of graphical editors as part of a tool chain for real time programming. It proved to increase the quality of the software by eliminating local exception handlers and by confining the impact of undo/redo to a small add-on to the model part of the application.\",\"PeriodicalId\":169989,\"journal\":{\"name\":\"Principles and Practice of Programming in Java\",\"volume\":\"167 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2008-09-09\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"3\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Principles and Practice of Programming in Java\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1411732.1411738\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Principles and Practice of Programming in Java","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1411732.1411738","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A framework for command processing in Java/Swing programs based on the MVC pattern
We present a framework for command processing in Java/Swing programs based on the model-view-controller (MVC) pattern. In addition to standard approaches our framework supports (1) centralized exception handling, (2) premature command termination, (3) pre- and postprocessing of commands, (4) undo/redo based on event objects and model listeners, and (5) generic undo/redo commands. The framework has been applied successfully in a number of graphical editors as part of a tool chain for real time programming. It proved to increase the quality of the software by eliminating local exception handlers and by confining the impact of undo/redo to a small add-on to the model part of the application.