Have you already tried TypeScript?
There’s been a lot of buzz about it in the last period and, while playing with this new language, I have created a new project on CodePlex – TypedMVVM – for experimenting how TypeScript could be used in a real world scenario by applying separation of concerns via the MVVM pattern in a simple Windows Store navigation app developed with WinJS.
- designData – services implementation for design-time data in order to enable “Blendability”;
- interfaces – interfaces for Services, ViewModels and ViewModelFactory;
- libs – TypeScript definitions and TypedMVVM core classes (in particular RelayCommand<T> and ViewModelBase);
- services – concrete services implementations used by the ViewModels;
- viewModels - concrete ViewModels implementations;
- views – views definitions.
The first impression is very positive: static typing is a must-have for writing complex apps and enabling features like refactoring or intellisense. Language features like interfaces, classes, generics and lambda expressions permit the developer to write code more readable, maintainable and extensible.
I’m planning to add more features and helper classes to this sample in the future whilst waiting for the final release of TypeScript so stay tuned!
The complete source code is available for download here: http://typedmvvm.codeplex.com