Experiments with TypeScript, MVVM and Windows Store apps – TypedMVVM available on CodePlex

Have you already tried TypeScript?

TypeScript is an Open-Source language designed by Anders Hejlsberg (the creator of C#, Delphi and Turbo Pascal) for extending JavaScript with additional features available in languages like C#: classes, static typing, interfaces, generics, and modularization (just to name a few).

The language is a typed superset of JavaScript: the compiler generates plain JavaScript that can be executed on every platform where JavaScript is supported (as reported on the main site: “Any Platform, Any host, Any OS”). The following links are a great starting point for understanding and learning it:

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.

Starting from the default Visual Studio Windows Store app Navigation template for JavaScript, I have converted all the .js source files to TypeScript (mainly renaming their extension to .ts) and then changed / added the following folder structure and classes / interfaces implementations:

  • 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

Happy Coding!

Windows 8 Line of Business (LOB) Guidance – Prism on .NET 4.5 and the road to Windows Store apps

Just a quick post to highlight an interesting article by Blaine Wastell about a new project (codename “Kona“)  that will provide guidance on developing line of business (LOB) apps for Windows 8.

Check out this link for the details of this interesting project!

Learning Windows Store app development? Download Windows 8 Camp in a Box!

Check out these useful downloads including hands-on labs, presentations, samples and resources from the Windows 8 camps.

More resources available in this post @ ExpressionBlend.com.

Enjoy!

Callisto library for Windows 8 XAML applications on GitHub

Great days and lot of new tools for Metro XAML developers on Windows 8.

Callisto is a new library of controls and helpers (including SQLite support) for Windows 8 XAML applications (aka Metro style apps) developed by Tim Heuer (@timheuer) and Morten Nielsen (@dotmorten).

Click here to access the project and download the new bits!

Enjoy 🙂

The XAML Project is live!

A new project has been recently announced in the “Silverlight Experts” group on Linkedin by fellow group-member Laith Alasad:

The XAML Project contains “Free vector design resources for XAML-based technologies such as Silverlight, Metro, WP7, and WPF. Search and download pure XAML graphics for your web, desktop, and/or mobile applications.

It’s a very useful resource, I’ve already inserted it in my favorites!

Happy XAMLing everyone 😉

The XAML platform is here! Download Windows 8 Developer preview

During the //Build conference in Anaheim the release of Windows 8 Developer preview has been announced: you can download it from this link.

To get started an impressive number of video tutorials is available in the official site of the conference: http://www.buildwindows.com/.

Check out also this great post by Michael for downloading all the Build videos in your pc.

Useful resources are available in the SDK: all the XAML Metro style app samples are available following this link.

It’s possible to install Windows 8 side by side with your operating system using a boot from VHD: I’ve followed the instructions described here by Mister Goodcat and all went smoothly.

The new platform and tools are well described in this “Big Picture” showed during the conference:
Laurent Bugnion, Rene Schulte and Doug Seven have great insights into the new platform and tools here, here and here.

Also available for download:

For those like me (also) interested in WPF, a list of the new features is available here.

I’m pretty excited about all these news and I’m looking forward to all the great applications that will be built using XAML, Windows 8, Silverlight, WPF and Windows Phone!

Happy XAMLing!