This project is read-only.

Project Description

The Saltarelle C# to Javascript compiler allows a developer to write C# code and then compile it to Javascript which can be run in any web browser. This makes it possible to write applications in C# that target any platform. Thanks to the type safe nature of C# and its language features it also allows the developer to more easily write complicated applications than would have been possible in javascript. The Quicklight library was written to help exploit this capability and is meant to be for Saltarelle what Silverlight is for .NET (but replacing the XAML view enging with the Razor view engine). At least as far as is possible, given the limitations of javascript.

The Quicklight project is a collection of libraries that, along with the Saltarelle C# to Javascript compiler, allow a developer to write anything from Rich Internet Applications to Apps for mobile phones using C# and the HTML based Razor syntax. The project contains three libraries:

  1. The Quicklight.Web library contains classes used to write a GUI using patterns and tools such as MVVM, dependancy injection, Razor generated views, region management and event management. It allows you to write an application consisting of loosely coupled modules. It is inspired by the Microsoft Prism library. A tutorial on the patterns employed is available for viewing on YouTube.
  2. The Quicklight.Net library which contains meta data for the Javascript Soap Client . This allows the developer to create a C# webservice wrapper using the C# version of the Javascript Soap Client, thereby allowing the application easily access webservices.
  3. The Quicklight.Mobile library which contains meta data for the PhoneGap/Cordova library. This allows the developer to write C# code against the PhoneGap/Cordova library, thereby accessing the hardware of a mobile device. If this library is used the developer writes the C# code, compiles it to Javascript and then creates a native app using the PhoneGap online compiler.

The vision for this project is that it will be used to create applications of a wide range, covering diverse platforms, but with only one C# codebase. It is envisioned that the different resolutions of the supported devices are addressed by using different views (but the same business logic), and that the application will simply load the resolution specific views in the dependancy injector, thereby displaying the correct view for the device.

Component libraries

The Quicklight.Web library is designed to be used with the MVVM design pattern. Within this pattern the ViewModel is not aware of the View. Therefore it should be used with declarative component libraries, instead of programmatic component libraries, and the view properties, collections and events should then be binded to the elements of the view. Declarative component libraries include:

  1. Bootstrap
  2. KickStart
  3. jQuery Mobile
  4. jQuery UI
  5. XTag

jQuery UI does have some programmatic parts, but because it has been wrapped for the Saltarelle compiler it can be used with Quicklight.

It is possible to use programmatic component libraries with Quicklight if there are metadata libraries for these programmatic component libraries. Unfortunately none, except for jQuery UI, currently exist.

Last edited Oct 21, 2012 at 9:43 PM by jfkirsten, version 15