System architecture and pattern research of RIA based on silverlight
HU Shi-qing · Jisuanji gongcheng yu sheji · 2010
To solve the problems of the design pattern for rich internet application (RIA) systems development, the silverlight-based RIA architecture is analyzed, according to problems of unit testing and tight coupling when using the model-view-controller (MVC) and the model-view-presenter (MVP) pattern to design RIA systems, the model-view-viewmodel (MVVM) pattern is proposed. This pattern is composed of model, view and viewmodel, the problem of data swap between the model and the viewmodel is resolved by realizing INotifyPropertyChanged interface, and the model independent of the viewmodel is realized. In the while, the problem of event binding in view is resolved by realizing ICommand interface, combined with data binding, the viewmodel independent of the view is realized. Examples show that using the MVVM pattern to design the RIA system can realize the logical interface complete separate from the application logic and has a good capacity of automated testing.