diff --git a/readme.md b/readme.md index 8881d4c..d20262a 100644 --- a/readme.md +++ b/readme.md @@ -3,67 +3,44 @@ Easily serialize forms in your Backbone.Views into a JSON representation. [![Build Status](https://travis-ci.org/marionettejs/backbone.syphon.svg)](https://travis-ci.org/marionettejs/backbone.syphon) +## About Backbone.Syphon -Working with form elements in a Backbone view can become -very tedious very quickly. You will either end up writing -a lot of repetitive code to read values from the form, -or end up using a key-value-observer or data-binding -solution that automatically populates your model for you. -While these are valid options and I highly recommend -understanding how they work, there are times when these -options are not the best choice for your application. - -Backbone.Syphon aims to make it easy to serialize the -form inputs of a Backbone.View in to a simple JSON object +Backbone.Syphon aims to make it easy to serialize the form inputs of a Backbone.View in to a simple JSON object that contains all of the values from the form. -## Source Code And Downloads - -You can download the raw source code from the "src" -folder above, or grab one of the builds from the -"lib" folder. - -To get the latest stable release, use these links -which point to the 'master' branch's builds: - -### Standard Builds - -Development: [backbone.syphon.js](https://raw.github.com/derickbailey/backbone.syphon/master/lib/backbone.syphon.js) +Working with form elements in a Backbone view can become very tedious very quickly. You will either end up writing +a lot of repetitive code to read values from the form, or end up using a key-value-observer or data-binding +solution that automatically populates your model for you. While these are valid options and it is highly recommended to +understand how they work, there are times when these options are not the best choice for your application. -Production: [backbone.syphon.min.js](https://raw.github.com/derickbailey/backbone.syphon/master/lib/backbone.syphon.min.js) +## Documentation -### AMD/RequireJS Builds +This readme file contains [basic usage examples](#basic-usage). -Development: [backbone.syphon.js](https://raw.github.com/derickbailey/backbone.syphon/master/lib/amd/backbone.syphon.js) +If you need to modify the behaviors of Syphon, see the [API document](https://github.com/marionettejs/backbone.syphon/blob/master/apidoc.md). +It contains the documentation for the core APIs that Syphon exposes, with examples on how to change the behaviors of Syphon. -Production: [backbone.syphon.min.js](https://raw.github.com/derickbailey/backbone.syphon/master/lib/amd/backbone.syphon.min.js) +### [View The API Documentation](https://github.com/marionettejs/backbone.syphon/blob/master/apidoc.md) -## Documentation +## Source Code And Downloads -This readme file contains basic usage examples. +You can download the raw source code from the "src" folder above, or grab one of the builds from the "lib" folder. -### Extensibility / API Documentation +To get the latest stable release, use these links which point to the 'master' branch's builds: -If you need to modify the behaviors of Syphon, see the API document. It -contains the documentation for the core APIs that Syphon exposes, with -examples on how to change the behaviors of Syphon. +### Standard Builds -##### [View The API Documentation](https://github.com/derickbailey/backbone.syphon/blob/master/apidoc.md) +Development: [backbone.syphon.js](https://raw.github.com/marionettejs/backbone.syphon/master/lib/backbone.syphon.js) -### Annotated Source Code +Production: [backbone.syphon.min.js](https://raw.github.com/marionettejs/backbone.syphon/master/lib/backbone.syphon.min.js) -Syphon has annotated source code using the Docco tool to turn -comments in to documentation. This provides an in-depth look -at what each section of is doing. -##### [View The Annotated Source Code](http://derickbailey.github.com/backbone.syphon/docs/backbone.syphon.html) +## Basic Usage -## Basic Usage : Serialize +### Serialize -When the data from a form is needed, you can call the -`serialize` method of `Backbone.Syphon` to retrieve an -object literal that contains the data from your view's -form. +When the data from a form is needed, you can call the `serialize` method of `Backbone.Syphon` to retrieve an object +literal that contains the data from your view's form. ```js Backbone.View.extend({ @@ -88,8 +65,7 @@ Backbone.View.extend({ ### Keys Retrieved By "name" Attribute -The default behavior for serializing fields is to use the field's "name" -attribute as the key in the serialized object. +The default behavior for serializing fields is to use the field's "name" attribute as the key in the serialized object. ```html