(VistoJS) integrates KnockoutJS
) to provide the programming model known from .NET XAML and MVVM
: It is possible to implement views with "code-behind" and bindings to view models, declaratively load subviews in HTML and navigate between pages - all in a single-page application.
The main advantages of this library is that it allows to develop component-based and implement reusable views which are composed of predefined programming blocks (view, view model and HTML). These views can be reused as sub views, in dialogs or as page instances. The programming API and paradigm is very similar to the one found in Windows Phone XAML or Windows 8 Store Apps programming (MVVM pattern, view "code-behind", paging/navigation).
- Support for views with "code-behind" and view models (declared using HTML)
- Support for event methods on views and view models like "loaded", "onNavigatedTo", etc.
- The view model and the view are connected using KnockoutJS bindings
- Possible to load sub views declaratively and pass parameters to it (one-way and two-way bindings possible)
- Possible to instantiate multiple instances of the same view
- No "page built-up flickering" by displaying the view not until every sub view has been loaded
- Support for paging and dialogs
- Automatically called onNavigateTo, loaded, destroy and other event methods
- More maintainable and understandable code by enforcing structure and conventions
- The resulting application is component based (programming in packages)
- Support for GUI internationalization
- Declarative internationalization (with the data-translate attribute) which automatically updates if the language is changed
- Immediate language changes using "language bindings"
- Visto.js file size is 18kb minimized (22kb debug)
- Complete framework (with all libraries like JQuery, JQuery UI, KnockoutJS, RequireJS, etc.)
- With JQuery UI (needed for dialogs): 388kb
- Without JQuery UI: 165kb (it is possible to provide an own dialog implementation)
Dependencies and used technologies
We recommend to use some sort of web services (or simple ajax calls) to communicate with the server. Check out the JSDL (JSON Service Description Language) project
which automatically generates TypeScript service client classes to access JSON-based web services (like .NET WCF service client generation).
Installation in MS Visual Studio
- Install TypeScript
- Create empty TypeScript project (delete all files except Web.config)
- Install NuGet package VistoJS.Complete for a complete app skeleton (or VistoJS for the core library files).
- Create main page view in "app/views/MainPage.html" and Style Sheet document "css/style.css"
If VistoJS is installed using a NuGet package, it can easily be updated in the future...
NuGet support is experimental. If you have any problems, please contact us.
We need help
If you like the project and like to help develop it, build packages or have suggestions, please contact us!
This project is developed and maintained by Rico Suter