Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are lots of lightweight MVVM frameworks out there, which work great for the basics. However, if you are writing larger enterprise applications, notifying the UI of changed properties isn't enough. For example, did you think about Command Authentication? Or what about sensor emulation for Windows Phone 7 (that Microsoft don’t provide)?

Table of Contents

Why auditing

 There are many reasons why auditing should be added to an application. Most developers only add auditing to the database, but below are several reasons to add auditing to the client as well:

...

With the auditing capabilities of Catel, you can create and register custom auditors that can handled changes and events of view models. This way, you can gather a lot of statistics or any information that you want to gather about the user experience. Below is a list of events that can be handled:

  •  OnViewModelCreating
  • OnViewModelCreated
  • OnPropertyChanging
  • OnPropertyChanged
  • OnCommandExecuting
  • OnViewModelSaving
  • OnViewModelSaved
  • OnViewModelCanceling
  • OnViewModelCanceled
  • OnViewModelClosing
  • OnViewModelClosed

The developer has all the freedom to handle one or more methods in an auditor. Of course multiple auditors are possible as well.

 Creating an auditor

Creating a new auditor is very simple. Create a new class, derive from AuditorBase and override the methods you are interested in. The class example tracks the event to a fake analytics framework.

...