Work Places Modules
The Work Places functionality is implemented in the following XAF modules being .NET assemblies:
- Xafari.Workplace.dll (the XafariWorkplaceModule class) is a platform-agnostic module that can be added to either the application itself or its platform-independent module.
- Xafari.Workplace.Mvc.dll (the XafariWorkplaceMvcModule class) is a module for the ASP.NET MVC version of the app. It can be added to either the Web application or its platform-dependent module.
- Xafari.Workplace.Web.dll (the XafariWorkplaceWebModule class) is a module for the ASP.NET version of the app. It can be added to either the Web application or its platform-dependent module.
- Xafari.Workplace.Win.dll (the XafariWorkplaceWinModule class) is a module for the Windows version of the app. It can be added to either the Windows application or its platform-dependent module.
- Xafari.Workplace.Cfg.dll (the XafariWorkplaceCfgModule class) is a configuration module that stores the functionality for administration of the user Work Places. It can be accessed through either the application itself or a special Xafari Applications Support.
Core Principles of Work Places Modules
For example, have a look at the Xafari.Workplace.Win module. It implements the logic for the Windows application. It has abstract methods of standard abstract classes (WorkplaceSelector and WorkplaceManager of the Xafari.Workplace module) that depend on the application's type. The Setup method of the XafariWorkplaceWinModule class creates a new instance of the WinWorkplaceManager. The WinWorkplaceSelector instance is therein a parameter of the WinWorkplaceManager constructor. This is how the module is adjusted for a particular application type. The WinWorkplaceManager is, in its turn, a singleton variation which instance is accessible through the WorkplaceManager.Instance property of the application.
WorkplaceDescriptorActionsController implements Actions (create/delete/edit) for Work Places List View.
WorkplaceMainWindowController implements the switching between various Work Places in the runtime through a special control.
The WinSelectableWorkplaceEditor class implements the Property Editor for the drop down list of Work Places in the dialog window in which the user selects the Work Place when the application starts.
The implementation of the described functionality for ASP.NET and ASP.NET MVC application is practically the same.