background preloader

JavaScriptMVC

JavaScriptMVC

Learn Basics of MVC JavaScriptMVC (JMVC) is a MIT licensed, client-side, JavaScript framework that builds maintainable, error-free, lightweight applications as quick as possible. It packs best-of-breed libraries and tools that are guaranteed to work together. It supports every browser that jQuery supports. If you are new to the framework, this page followed by the tutorials is the best place to start. JMVC's goodies are broken down into four sub-projects: CanJS - A client side MVC FrameworkjQuery++ - A collection of useful DOM helpers and special events for jQueryStealJS - JavaScript and CSS dependency management and build toolsFuncUnit - Functional and unit testing frameworkDocumentJS - Documentation engine The remainder of this page highlights each sub-project. CanJS CanJS is a JavaScript framework that makes building rich web applications easy and the MVC of JavaScriptMVC. Everything you want and need to know about CanJS can be found here. jQuery++ The best way to get started is the jQuery++ overview. StealJS

Backbone.js Tracking Model Changes Within Form (Dirty_Bit) - JavaScriptMVC Forum Not sure if anyone will find this useful, but I thought I'd share anyway. If you have model(s) displayed on the page and some of the fields are editable, this controller allows you to visually see which fields have been modified. This can be useful if you have several models represented on the screen and they make a bunch of changes and want to verify what has been changed before submitting the changes. This controller works by comparing the original attribute value to the current value using a new function that I have added to backup.js called isAttrDirty, which is defined as: Copy code This controller should be attached to the DOM element containing the form which contains the models. You also have to make sure that you call the backup method on the models before this will work. Here is the code for the controller.

TodoMVC jQuery.Model - A jQuery Model Layer - Jupiter JavaScript Consulting Complex JavaScript applications are mostly about making it easy to create, read, update, and delete (CRUD) data. But being so close to the UI, most JavaScript developers ignore the data layer and focus on making animated drag-drop effects. We’re doing ourselves a disservice! A strong Model layer can make an architecture infinitely more robust, reusable, and maintainable. jQuery.Model is designed to be a flexible and lightweight model layer for jQuery. The remainder of this article highlights the features, how to use them, and why they are important. Downloads Documentation JavaScriptMVC’s Model docs. Features Service / Ajax encapsulation Type Conversion Data Helper Methods DOM Helper Functions Events and Property Binding Lists Local Storage Associations Backup / Restore Validations Service / Ajax Encapsulation Models encapsulate your application’s raw data. GET /contacts.json The server might return something like: Instead, model encapsulates (wraps) this request so you call it like: Create Read

Related: