Browse files

further cleaning up of the TOC, minor section edits

  • Loading branch information...
1 parent 7df985c commit 7b7c810b598d0e922f732ebcf4d0d9fb52a6096a @addyosmani addyosmani committed Apr 6, 2012
Showing with 18 additions and 5 deletions.
  1. +18 −5 book/index.html
23 book/index.html
@@ -128,7 +128,13 @@ <h2 class="booktitle">Volume 1.5.2</h2>
<li class="subitem"><a href="#builderpatternjquery">Builder Pattern</a></li>
<li class="subitem"><a href="#prototypepatternjquery">Prototype Pattern</a></li>
- <li><a href="#modularjavascript">Modern Modular JavaScript Design Patterns</a></li>
+ <li><a href="#modularjavascript">Modern Modular JavaScript Design Patterns</a>
+ <ul>
+ <li class="subitem"><a href="#detailamd">AMD</a>
+ <li class="subitem"><a href="#detailcommonjs">CommonJS</a>
+ <li class="subitem"><a href="#detailharmony">Harmony</a>
+ </ul>
+ </li>
<li><a href="#jquerypluginpatterns">Bonus: jQuery Plugin Design Patterns</a></li>
<li><a href="#conclusions">Conclusions</a></li>
<li><a href="#references">References</a></li>
@@ -4275,9 +4281,10 @@ <h1 id="modularjavascript">Modern Modular JavaScript Design Patterns</h1>
- <h2>AMD <small>A Format For Writing Modular JavaScript In The Browser </small></h2>
+ <h2 id="detailamd">AMD</h2>
+<h3>A Format For Writing Modular JavaScript In The Browser</h3>
<p>The overall goal for the AMD (Asynchronous Module Definition) format is to provide a solution for modular JavaScript that developers can use today. It was born out of Dojo's real world experience using XHR+eval and proponents of this format wanted to avoid any future solutions suffering from the weaknesses of those in the past.</p>
<p>The AMD module format itself is a proposal for defining modules where both the module and dependencies can be <a href="">asynchronously</a> loaded. It has a number of distinct advantages including being both asynchronous and highly flexible by nature which removes the tight coupling one might commonly find between code and module identity. Many developers enjoy using it and one could consider it a reliable stepping stone towards the <a href="">module system</a> proposed for ES Harmony.</p>
@@ -4667,11 +4674,15 @@ <h1 id="modularjavascript">Modern Modular JavaScript Design Patterns</h1>
<p>For more reasons why many developers are opting to use AMD modules in their applications, you may be interested in <a href="">this</a> post by James Burke.</p>
<div class="hr"></div>
- <h2>CommonJS <small>A Module Format Optimized For The Server </small></h2>
- </div>
+ <h2 id="detailcommonjs">CommonJS</h2>
+<h3>A Module Format Optimized For The Server</h3>
<p><a href="">CommonJS</a> are a volunteer working group which aim to design, prototype and standardize JavaScript APIs. To date they've attempted to ratify standards for both <a href="">modules</a> and <a href="">packages</a>. The CommonJS module proposal specifies a simple API for declaring modules server-side and unlike AMD attempts to cover a broader set of concerns such as io, filesystem, promises and more.
@@ -5018,9 +5029,11 @@ <h1 id="modularjavascript">Modern Modular JavaScript Design Patterns</h1>
<div class="hr"></div>
- <h2>ES Harmony <small>Modules Of The Future </small></h2>
+ <h2 id="detailharmony">ES Harmony</h2>
+<h3>Modules Of The Future</h3>
<p><a href="">TC39</a>, the standards body charged with defining the syntax and semantics of ECMAScript and its future iterations is composed of a number of very intelligent developers. Some of these developers (such as <a href="">Alex Russell</a>) have been keeping a close eye on the evolution of JavaScript usage for large-scale development over the past few years and are acutely aware of the need for better language features for writing more modular JS.</p>
<p>For this reason, there are currently proposals for a number of exciting additions to the language including flexible <a href="">modules</a> that can work on both the client and server, a <a href="">module loader</a> and <a href="">more</a>. In this section, I'll be showing you some code samples of the syntax for modules in so you can get a taste of what's to come.</p>

0 comments on commit 7b7c810

Please sign in to comment.