First light is the term used for the first time that an observation is made through a new telescope (or other astronomical instrument). Lets get our application up and running.
There are two different ways that WPF applications can start up.
The most common approach is to specify the initial window using
App.xaml. Unfortunately, this doesn’t play well with the MVVM architecture we’re using.
The alternative approach is to use a traditional
Main() entry point that sets everything up for the application to run.
In a new
Program.cs file, write a method to create our initial application model:
We create the screen with the fields already populated so that we can verify our data-binding is working. As we progress the application, we’ll remove those.
Next, we need a method to set up our Redux store, containing both our reducer and the initial application state:
LoggingReduxStore is a debugging tool that wraps the actual store, writing details of each dispatched message using
Debug.WriteLine() before passing them through.
And finally we can create the entry point:
While this looks a bit verbose right now, things will become a lot simpler when we introduce more support infrastructure and use of a dependency injection tool.