Permalink
Browse files

Added screencasts page

  • Loading branch information...
1 parent 30f749a commit 4144af33518011b5da3a77bf3ae4af6996b6b0ff @tj tj committed Dec 20, 2010
Showing with 1,150 additions and 532 deletions.
  1. +1 −0 Makefile
  2. +843 −488 docs/api.html
  3. +1 −1 docs/applications.1
  4. +2 −2 docs/applications.html
  5. +2 −2 docs/contrib.html
  6. +1 −1 docs/executable.1
  7. +2 −2 docs/executable.html
  8. +7 −19 docs/guide.1
  9. +6 −10 docs/guide.html
  10. +1 −1 docs/index.1
  11. +2 −2 docs/index.html
  12. +2 −2 docs/layout/head.html
  13. +2 −2 docs/migrate.html
  14. +28 −0 docs/screencasts.1
  15. +226 −0 docs/screencasts.html
  16. +24 −0 docs/screencasts.md
View
@@ -3,6 +3,7 @@ PREFIX ?= /usr/local
LIB_PREFIX = ~/.node_libraries
DOCS = docs/index.md \
+ docs/screencasts.md \
docs/executable.md \
docs/contrib.md \
docs/guide.md \
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "APPLICATIONS" "" "October 2010" "" ""
+.TH "APPLICATIONS" "" "November 2010" "" ""
.
.SH "NAME"
\fBapplications\fR
View
@@ -133,7 +133,7 @@
font-size: 11px;
}
#menu {
- margin-left: 65px;
+ margin-left: 80px;
padding: 0;
padding-bottom: 30px; }
#menu li {
@@ -187,7 +187,7 @@
<ul id="menu">
<li><a href="index.html">Home</a></li>
<li><a href="guide.html">Guide</a></li>
- <li><a href="contrib.html">Contributing</a></li>
+ <li><a href="screencasts.html">Screencasts</a></li>
<li><a href="applications.html">Applications</a></li>
</ul>
<div class='mp'>
View
@@ -133,7 +133,7 @@
font-size: 11px;
}
#menu {
- margin-left: 65px;
+ margin-left: 80px;
padding: 0;
padding-bottom: 30px; }
#menu li {
@@ -187,7 +187,7 @@
<ul id="menu">
<li><a href="index.html">Home</a></li>
<li><a href="guide.html">Guide</a></li>
- <li><a href="contrib.html">Contributing</a></li>
+ <li><a href="screencasts.html">Screencasts</a></li>
<li><a href="applications.html">Applications</a></li>
</ul>
<div class='mp'>
View
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "EXECUTABLE" "" "October 2010" "" ""
+.TH "EXECUTABLE" "" "November 2010" "" ""
.
.SH "NAME"
\fBexecutable\fR
View
@@ -133,7 +133,7 @@
font-size: 11px;
}
#menu {
- margin-left: 65px;
+ margin-left: 80px;
padding: 0;
padding-bottom: 30px; }
#menu li {
@@ -187,7 +187,7 @@
<ul id="menu">
<li><a href="index.html">Home</a></li>
<li><a href="guide.html">Guide</a></li>
- <li><a href="contrib.html">Contributing</a></li>
+ <li><a href="screencasts.html">Screencasts</a></li>
<li><a href="applications.html">Applications</a></li>
</ul>
<div class='mp'>
View
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "GUIDE" "" "November 2010" "" ""
+.TH "GUIDE" "" "December 2010" "" ""
.
.SH "NAME"
\fBguide\fR
@@ -32,21 +32,6 @@ $ npm install express
.
.IP "" 0
.
-.P
-git clone, first update the submodules:
-.
-.IP "" 4
-.
-.nf
-
-$ git submodule update \-\-init
-$ make install
-$ make install\-support
-.
-.fi
-.
-.IP "" 0
-.
.SS "Creating An Application"
The \fIexpress\.Server\fR now inherits from \fIhttp\.Server\fR, however follows the same idiom by providing \fIexpress\.createServer()\fR as shown below\. This means that you can utilize Express server\'s transparently with other libraries\.
.
@@ -153,9 +138,6 @@ Express supports the following settings out of the box:
\fIview options\fR An object specifying global view options
.
.IP "\(bu" 4
-\fIpartials\fR Root view partials directory defaulting to \fIviews\fR/partials\.
-.
-.IP "\(bu" 4
\fIstream threshold\fR Bytesize indicating when a file should be streamed for \fIres\.sendfile()\fR using \fIfs\.ReadStream()\fR and \fIsys\.pump()\fR\.
.
.IP "" 0
@@ -922,6 +904,9 @@ When using the partial collection support a few "magic" variables are provided f
.P
For documentation on altering the object name view res\.partial() \fIhttp://expressjs\.com/guide\.html#res\-partial\-view\-options\-\fR\.
.
+.P
+NOTE: partials are not recommended for large collections (150+) because the view system adds to the overhead\. For example do \fInot\fR implement a simple ul list with partial collection support, simply create a partial and iterate within that single partial, as this is far more efficient than rendering 150+ templates\.
+.
.SS "Template Engines"
Below are a few template engines commonly used with Express:
.
@@ -1344,6 +1329,9 @@ The \fBres\.send()\fR method is a high level response utility allowing you to pa
.P
By default the \fIContent\-Type\fR response header is set, however if explicitly assigned through \fBres\.send()\fR or previously with \fBres\.header()\fR or \fBres\.contentType()\fR it will not be set again\.
.
+.P
+Note that this method \fIend()\fR the response, so you will want to use node\'s \fIres\.writeHead()\fR / \fIres\.write()\fR for multiple writes or streaming\.
+.
.SS "res\.redirect(url[, status])"
Redirect to the given \fIurl\fR with a default response \fIstatus\fR of 302\.
.
View
@@ -133,7 +133,7 @@
font-size: 11px;
}
#menu {
- margin-left: 65px;
+ margin-left: 80px;
padding: 0;
padding-bottom: 30px; }
#menu li {
@@ -237,7 +237,7 @@
<ul id="menu">
<li><a href="index.html">Home</a></li>
<li><a href="guide.html">Guide</a></li>
- <li><a href="contrib.html">Contributing</a></li>
+ <li><a href="screencasts.html">Screencasts</a></li>
<li><a href="applications.html">Applications</a></li>
</ul>
<div class='mp'>
@@ -257,13 +257,6 @@ <h3 id="Installation">Installation</h3>
<pre><code>$ npm install express
</code></pre>
-<p>git clone, first update the submodules:</p>
-
-<pre><code>$ git submodule update --init
-$ make install
-$ make install-support
-</code></pre>
-
<h3 id="Creating-An-Application">Creating An Application</h3>
<p>The <em>express.Server</em> now inherits from <em>http.Server</em>, however
@@ -339,7 +332,6 @@ <h3 id="Settings">Settings</h3>
<li><em>views</em> Root views directory defaulting to <strong>CWD/views</strong></li>
<li><em>view engine</em> Default view engine name for views rendered without extensions</li>
<li><em>view options</em> An object specifying global view options</li>
-<li><em>partials</em> Root view partials directory defaulting to <em>views</em>/partials.</li>
<li><em>stream threshold</em> Bytesize indicating when a file should be streamed for <em>res.sendfile()</em> using <em>fs.ReadStream()</em> and <em>sys.pump()</em>.</li>
</ul>
@@ -813,6 +805,8 @@ <h3 id="View-Partials">View Partials</h3>
<p>For documentation on altering the object name view <a href="http://expressjs.com/guide.html#res-partial-view-options-">res.partial()</a>.</p>
+<p>NOTE: partials are not recommended for large collections (150+) because the view system adds to the overhead. For example do <em>not</em> implement a simple ul list with partial collection support, simply create a partial and iterate within that single partial, as this is far more efficient than rendering 150+ templates.</p>
+
<h3 id="Template-Engines">Template Engines</h3>
<p>Below are a few template engines commonly used with Express:</p>
@@ -1092,6 +1086,8 @@ <h3 id="res-send-body-status-headers-status-status-">res.send(body|status[, head
assigned through <code>res.send()</code> or previously with <code>res.header()</code> or <code>res.contentType()</code>
it will not be set again.</p>
+<p>Note that this method <em>end()</em> the response, so you will want to use node's <em>res.writeHead()</em> / <em>res.write()</em> for multiple writes or streaming.</p>
+
<h3 id="res-redirect-url-status-">res.redirect(url[, status])</h3>
<p>Redirect to the given <em>url</em> with a default response <em>status</em> of 302.</p>
View
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "INDEX" "" "October 2010" "" ""
+.TH "INDEX" "" "December 2010" "" ""
.
.SH "NAME"
\fBindex\fR
View
@@ -133,7 +133,7 @@
font-size: 11px;
}
#menu {
- margin-left: 65px;
+ margin-left: 80px;
padding: 0;
padding-bottom: 30px; }
#menu li {
@@ -187,7 +187,7 @@
<ul id="menu">
<li><a href="index.html">Home</a></li>
<li><a href="guide.html">Guide</a></li>
- <li><a href="contrib.html">Contributing</a></li>
+ <li><a href="screencasts.html">Screencasts</a></li>
<li><a href="applications.html">Applications</a></li>
</ul>
<div class='mp'>
View
@@ -133,7 +133,7 @@
font-size: 11px;
}
#menu {
- margin-left: 65px;
+ margin-left: 75px;
padding: 0;
padding-bottom: 30px; }
#menu li {
@@ -187,6 +187,6 @@
<ul id="menu">
<li><a href="index.html">Home</a></li>
<li><a href="guide.html">Guide</a></li>
- <li><a href="contrib.html">Contributing</a></li>
+ <li><a href="screencasts.html">Screencasts</a></li>
<li><a href="applications.html">Applications</a></li>
</ul>
View
@@ -133,7 +133,7 @@
font-size: 11px;
}
#menu {
- margin-left: 65px;
+ margin-left: 80px;
padding: 0;
padding-bottom: 30px; }
#menu li {
@@ -187,7 +187,7 @@
<ul id="menu">
<li><a href="index.html">Home</a></li>
<li><a href="guide.html">Guide</a></li>
- <li><a href="contrib.html">Contributing</a></li>
+ <li><a href="screencasts.html">Screencasts</a></li>
<li><a href="applications.html">Applications</a></li>
</ul>
<div class='mp'>
View
@@ -0,0 +1,28 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "SCREENCASTS" "" "December 2010" "" ""
+.
+.SH "NAME"
+\fBscreencasts\fR
+.
+.SS "Introduction"
+This introduction screencast covers the basics of Express, and how to get started with your first application\.
+.
+.P
+.
+.SS "View Partials"
+In this screencast we work with partials to display a collection of users using the Jade \fIhttp://jade\-lang\.com\fR template engine, and learn about view path resolution\.
+.
+.P
+.
+.SS "Route Specific Middleware"
+In the screencast below we learn about the benefits of route\-specific middleware\.
+.
+.P
+.
+.SS "Route Placeholder Preconditions"
+Learn about route placeholder (\fI/user/:id\fR) pre\-conditions, allowing validation, and loading of data via the named route placeholder segments\.
+.
+.P
+
Oops, something went wrong.

0 comments on commit 4144af3

Please sign in to comment.