Web JavaScript framework Learning

Source: Internet
Author: User
Tags tojson

JS framework Learning

1. Underscore http://documentcloud.github.com/underscore/
========================================================== ======================================
Underscore is a utility-belt library for JavaScript that provides a lot of
Functional programming support that you wowould have CT in prototype. js (or Ruby ),
But without extending any of the built-in Javascript objects. It's the tie
Go along with jquery's tux.

Table of contents
-----------------

Object-oriented and functional styles
Collections
-----------
Each, MAP, reduce, reduceright, detect, select, reject, all, any, include,
Invoke, pluck, Max, Min, sortby, groupby, sortedindex, toarray, size

Arrays
------
First, rest, last, compact, flatten, without, union, intersection, difference,
Uniq, zip, indexof, lastindexof, Range

Functions
---------
BIND, bindall, memoize, delay, defer, throttle, debounce, once, after, wrap, compose

Objects
-------
Keys, values, functions, extend, defaults, clone, tap, isequal, isempty, iselement,
Isarray, isarguments, isfunction, isstring, isnumber, isboolean, isdate, isregexp
Isnan, isnull, isundefined

Utility
-------
Noconflict, identity, times, Mixin, uniqueid, template

Chaining
--------
Chain, Value

In short, underscore is a basic tool library that provides some JavaScript Functions and methods.
Encapsulation, used to provide functional programming features. Although there is a lightweight rendering template of its own template, it is not very useful.

2. mustache https://github.com/janl/mustache.js
========================================================== ======================================
Logic-less templates with JavaScript
Quik start:
-> Var view = {
-> Title: "Joe ",
-> Calc: function (){
-> Return 2 + 4;
->}
->}
-> Var template = "{Title }}spends {calc }}";
-> Var html = mustache. to_html (template, view );

A simple and intuitive template rendering tool. Powerful functions and concise syntax. Okay.

3. Prototype http://prototypejs.org/
========================================================== ===
Prototype is a javascript framework that aims to publish development of dynamic web
Applications. It offers a familiar class-style OO framework, extensive Ajax
Support, higher-order programming constructs, and easy Dom manipulation.

This mainly includes Ajax-related extensions. Among them, the extension Dom is the core, which makes Dom access more object-oriented.
That is to say, it integrates more object-oriented attributes into JS, including inheritance.

4. Backbone http://documentcloud.github.com/backbone/
========================================================== ================================
Backbone supplies structure to JavaScript-heavy applications by providing models
With key-value binding and custom events, collections with a rich API of enumerable
Functions, views with declarative event handling, and connects it all to your
Existing application over a restful JSON interface.

Events

-Bind
-Unbind
-Trigger

Model

-Extend
-Constructor/initialize
-Get
-Set
-Escape
-Has
-Unset
-Clear
-ID
-CID
-Attributes
-Defaults
-Tojson
-Fetch
-Save
-Destroy
-Validate
-URL
-Urlroot
-Parse
-Clone
-Isnew
-Change
-Haschanged
-Changedattributes
-Previous
-Previusattributes

Collection

-Extend
-Model
-Constructor/initialize
-Models
-Tojson
-Underscore methods (26)
-Add
-Remove
-Get
-Getbycid
-
-Length
-Comparator
-Sort
-Pluck
-URL
-Parse
-Fetch
-Reset
-Create

Router

-Extend
-Routes
-Constructor/initialize
-Route
-Navigate

History

-Start

Sync

-Backbone. sync
-Backbone. emulatehttp
-Backbone. emulatejson

View

-Extend
-Constructor/initialize
-El
-$ (Jquery or zepto)
-Render
-Remove
-Make
-Delegateevents

Utility

-Noconflict

Simply put, backbone provides a complete set of MVC frameworks in JavaScript. Suitable for large applications, such
Web site.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.