Sammy tries to achieve this by providing a small ‘core’ framework and an ever-growing list of plugins for specific functionality. The core includes a simple API for defining applications which are made up primarily of routes and events. By driving application development around a small and specific API, Sammy attempts to keep your code organized while still allowing a lot of breathing room to define your own style and structure.
In the modern age of super-fast browsers and user expectations about the responsiveness and perceived speed of web applications – single page AJAX applications have become the rage (GMail, etc.) Furthermore, instead of just fetching full HTML and rendering it asynchronously, fetching raw data (JSON) and rendering on the client side has not only become possible – it’s actually very common.
Sammy continues to be fueled by the community and real-world production applications. It’s small enough that it can stay out of your way, and soon it will integrate with the DOM/AJAX Framework of your choice.
- Elegant dependency tracking - automatically updates the right parts of your UI whenever your data model changes
- Declarative bindings - a simple and obvious way to connect parts of your UI to your data model
- Flexible and sophisticated templating - construct a complex dynamic UI easily using arbitrarily nested templates
- Trivially extensible - implement custom behaviors as new declarative bindings for easy reuse in just a few lines of code
- Can be added on top of your existing web application without requiring major architectural changes
- Compact - around 25kb before gzipping
- Works on any mainstream browser (IE 6+, Firefox 2+, Chrome, Safari, others)
- Comprehensive suite of specifications (developed BDD-style) means its correct functioning can easily be verified on new browsers and platforms
Developers who’ve used Silverlight or WPF may recognize KO as an example of the MVVM pattern; developers more familiar with Ruby on Rails or other MVC technologies may see it as a real-time form of MVC with declarative syntax. In another sense, you can think of KO as a general way to make UIs for editing JSON data… whatever works for you :)
What HTML would have been had it been designed for web apps.
Gordon was created and is maintained by me, Tobias Schneider, a web developer based in Munich, Germany.