Common Application Architecture
- 2 minutes to read
This topic describes the common application architecture generated by the Scaffolding Wizard.
Below is a diagram that illustrates this application architecture.
Most of the implementation of the Data Access, Data Model and View Model layers is kept in separate assemblies: DevExpress.Mvvm.v21.1.DataModel, DevExpress.Mvvm.v21.1.DataModel.EF6, DevExpress.Mvvm.v21.1.DataModel.WCF and DevExpress.Mvvm.v21.1.ViewModel.
The Test Data Provider and the Unit Tests parts are not generated by the Scaffolding Wizard.
The Data Access Layer is a storage-dependent set of classes that provides access to persistent data.
The Data Model Layer is a Repository/Unit Of Work pattern. The Scaffolding Wizard generates two implementations of the Data Model Layer interfaces.
- The Runtime implementation uses a Data Access Layer (DbContext) to obtain and manipulate real persistent data. There are two possible implementations of the Runtime Data Layer: for the Entity Framework and for the WCF Data services.
- The Design-time implementation provides sample data that is used in views at design-time.
The View Model Layer is the core of an application and contains several view models that are initialized with the unit of work instance and provide all user interaction logic. View models are Data Access- and View layers-independent and can work with either runtime or design-time implementations of the Data Model Layer. You can switch your runtime data provider to another data access technology (for example, from the Entity Framework to the WCF Data Services) without affecting view models.
The View Layer contains collection and detail views. The Scaffolding Wizard can generate several types of Views (see View Types).