forked from adamjspooner/coffeescript-meet-backbonejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
70 lines (70 loc) · 3.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CoffeeScript, Meet Backbone.js: A Tutorial</title>
<link rel="stylesheet" media="all" href="01/docs/docco.css">
<style>
.button a {
background: #2929FF;
border-radius: 5px;
color: #FFF;
cursor: pointer;
display: block;
font: bold 14px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 13px 0;
text-align: center;
text-decoration: none;
text-transform: uppercase;
}
</style>
</head>
<body>
<div id="container">
<div id="background"></div>
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="docs"><h1>CoffeeScript, Meet Backbone.js</h1></th>
<th class="code"></th>
</tr>
</thead>
<tbody>
<tr id="section-1">
<td class="docs">
<p><strong>CoffeeScript, Meet Backbone.js</strong> is a simple <a href="http://documentcloud.github.com/backbone">Backbone.js</a> tutorial written in <a href="http://coffeescript.org">CoffeeScript</a> comprised of self-explanatory "hello world" examples of increasing complexity. It was designed to provide a smoother transition from zero to the popular <a href="http://documentcloud.github.com/backbone/#examples-todos">Todos example</a> The bulk of this tutorial is a rewrite of the original <a href="http://arturadib.github.com/hello-backbonejs/">hello-backbonejs</a> tutorial.</p>
<p>Backbone.js offers a lean <a href='http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller'>MVC framework</a> for organizing your Javascript application. It leads to more maintainable code by untangling the "spaghetti" of callbacks tied to different parts of the DOM and the backend server that often arises in rich client-side applications.</p>
<p>The tutorial starts with a minimalist View object, and progressively introduces event binding/handling, Models, and Collections.</p>
<p>Once in the tutorial, use the navigation menu in the top-right corner to view other examples. Example numbers are in order of increasing complexity.</p>
<p class="button"><a href="/01/docs/script.html">Start the Tutorial</a></p>
</td>
<td class="code">
<p style='color:black;'>The only non-Javascript part of the examples is the following HTML template (with some minimal styling):</p>
<pre style='color:#777;'>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CoffeeScript, Meet Backbone.js: Part N</title>
<link rel="stylesheet" href="/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/underscore.js/1.1.6/underscore-min.js"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/backbone.js/0.3.3/backbone-min.js"></script>
<script src="script.js"></script>
</head>
<body>
<header>
<h1>CoffeeScript, Meet Backbone.js: Part N</h1>
<p>Looking for <a href="docs/script.html">the documentation</a>?</p>
</header>
</body>
</html>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>