To date, we have a functional, but basic set of Windows Phone and Windows Store applications which can translate Alphabetical Input to Morse Code. One of the key tenets of MVVM Light is the ability to inject design time services or functionality to provide a better design experience. We need somewhere to store our Application Settings, along with a means of setting and retrieving them, we won’t cover the implementation of this, but we will cover the creation of our interface and the implementation of a design time settings class.
By the end of this post we will have, at design time, the ability to manipulate a settings class to be used with the designer in Visual Studio, or through Expression Blend. This will be done via an application settings interface detailing what data we need to store and of course what type it needs to be. As we are targeting multiple platforms, the interface, in a future post will be implemented to provide the storage of our settings per operating system.
One of the main benefits of using Dependency Injection to achieve this is that the implementation of our ViewModel is not concerned with where it retrieves information from and doesn’t need to make decisions depending on which context it is being ran in, this moves us closer to alignment with the Single Responsibility Principle.
Continue reading “Morse Coder Part 4 : Dependency Injection with MVVM Light SimpleIoc”
Data Binding can be used to dynamically bind information from a set of objects (View Model) to controls on a page (View). Following from the previous post, Morse Coder Part 2, we will be adding some flesh to the User Interface to take input from the user, process, in our case ‘translate’, and return output back to the user via our ViewModel.
By the end of this post we should have a basic, but functional User Interface, taking a sentence from the user via a TextBox, and returning a Morse translation via a TextBlock. We’ll also start to consider Background Colour bindings. As before, this will cover both Windows 8.1. and Windows Phone.
Continue reading “Morse Coder Part 3 : Data Binding with MVVM Light in Universal Apps”
Portable Class Libraries allow the reuse of code cross-platform, following from the previous post, Morse Coder Part 1, we will be implementing a very basic Portable Class Library (PCL), again targeting Windows 8.1 and Windows Phone 8.1.
Portable Class Libraries provide a means of sharing code between Projects targeting different types at the Solution/Project level, they differ from Shared Code Projects in that Shared Projects share resources at compile time and compile as ‘part of’ their host project. You choose your Targets as part of the configuration of the Project, the result being a subset of libraries and namespaces being made available based on intersection of what’s available in the chosen Targets. We will be looking at Windows 8.1 and Windows Phone 8.1, this could be extended at a later date to include a number of other platforms, such as Silverlight, Xamarin, etc.
Continue reading “Morse Coder Part 2 : Portable Class Libraries with Universal Apps”
This is the first in a series of blog posts detailing the process of creating a new Universal App targeting Windows 8.1 and Windows Phone 8.1, from creation of the solution to publication to the store. The goal of the application is to translate between Morse Code and the standard Alphabet and vice-versa.
MVVM Light is an excellent MVVM toolkit by Laurent Bugnion that I’ve used on a number of apps currently published on the Windows Phone Marketplace.
Universal Apps (can, and do by default) use a shared code project in order to share code between platform specific Projects at compile time.
Continue reading “Morse Coder Part 1 : Universal Apps with MVVM Light”