Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More chapter seeding and a little more content

  • Loading branch information...
commit e3512332fa359037f87534afd4e32e28d55960bb 1 parent 4c666d4
@tjweir authored
View
3  book.txt
@@ -337,6 +337,9 @@ BOOK
17. Tagging support
- I have lots of sample code for this
+18. Lift Widgets
+- let's build one together, Marius' Sparklines
+
====== Appendices ======
A. Lift message handling
View
26 chapter06.lyx
@@ -48,7 +48,11 @@ AJAX and COMET in Lift
\end_layout
\begin_layout Standard
-* What is AJAX? http://en.wikipedia.org/wiki/Ajax_(programming)
+*
+\series bold
+What is AJAX?
+\series default
+ http://en.wikipedia.org/wiki/Ajax_(programming)
\end_layout
\begin_layout Standard
@@ -56,7 +60,7 @@ AJAX (asynchronous JavaScript and XML) is a group of techniques that allow
for interactive web applications.
Using AJAX applications can talk to the server asynchronously and therefore
not disrupt the display of the client.
- (this is awkward)
+ (this is awkwardly worded)
\end_layout
\begin_layout Standard
@@ -64,10 +68,12 @@ AJAX (asynchronous JavaScript and XML) is a group of techniques that allow
\end_layout
\begin_layout Standard
-Ajax allows for a much richer interface for a web application, and example
+Ajax allows for a much richer interface for a web application, an example
is Google Suggest.
When you start typing your search term, the word fragment is sent to the
- server and common completions of your term are sent back.
+ server and common completions of your term are sent back, you see an instant
+ response.
+
\end_layout
\begin_layout Standard
@@ -85,10 +91,6 @@ Ajax allows for a much richer interface for a web application, and example
\end_layout
\begin_layout Standard
-* Web 2.0 built on this
-\end_layout
-
-\begin_layout Standard
* Using AJAX in Lift
\end_layout
@@ -102,7 +104,11 @@ Ajax allows for a much richer interface for a web application, and example
\end_layout
\begin_layout Standard
-* What is COMET? http://en.wikipedia.org/wiki/Comet_(programming)
+*
+\series bold
+What is COMET?
+\series default
+ http://en.wikipedia.org/wiki/Comet_(programming)
\end_layout
\begin_layout Standard
@@ -155,7 +161,7 @@ Comet is a method that uses long-polling to keep a connection between a
\end_layout
\begin_layout Standard
-* Using COMET in Lift
+* Using COMET in Lift
\end_layout
\begin_layout Standard
View
101 chapter07.lyx
@@ -40,135 +40,70 @@
\begin_body
\begin_layout Chapter
-AJAX and COMET
+Deployment
\end_layout
\begin_layout Standard
-AJAX and COMET in Lift
+- Ask the list what they are deploying with.
+ Generally it shouldn't be an issue where they deploy since Lift is essentially
+ self-contained.
+ We can go into specifics for special cases, I suppose
\end_layout
\begin_layout Standard
-* What is AJAX? http://en.wikipedia.org/wiki/Ajax_(programming)
+-!! jetty is required for continuations
\end_layout
\begin_layout Standard
-AJAX (asynchronous JavaScript and XML) is a group of techniques that allow
- for interactive web applications.
- Using AJAX applications can talk to the server asynchronously and therefore
- not disrupt the display of the client.
- (this is awkward)
+* Basic deployment via Jetty
\end_layout
\begin_layout Standard
-* why is AJAX awesome? [example]
+* Brief overview of Jetty
\end_layout
\begin_layout Standard
-Ajax allows for a much richer interface for a web application, and example
- is Google Suggest.
- When you start typing your search term, the word fragment is sent to the
- server and common completions of your term are sent back.
+* Capabilities
\end_layout
\begin_layout Standard
-* Method for async updates pulled from the client without a full page reload
-
+* Configuration
\end_layout
\begin_layout Standard
-* Relies heavily on javascript and XML
+* SSL
\end_layout
\begin_layout Standard
-* Javascript client-side events (button push, timer, etc) trigger requests
- "behind the scenes"
+* How jetty is configured in maven for testing
\end_layout
\begin_layout Standard
-* Web 2.0 built on this
+* Changing the default port (8080)
\end_layout
\begin_layout Standard
-* Using AJAX in Lift
+* Tips and tricks
\end_layout
\begin_layout Standard
-* Allows you to bind Javascript events (AJAX) to form elements, links, etc
-
+* Deployment in Tomcat
\end_layout
\begin_layout Standard
-* Go through example HelloDarwin AJAX example
+* Packaging options (pom dependency scope)
\end_layout
\begin_layout Standard
-* What is COMET? http://en.wikipedia.org/wiki/Comet_(programming)
+* Deployment in JBoss
\end_layout
\begin_layout Standard
-Comet is a method that uses long-polling to keep a connection between a
- browser and a server open, to allow the server to push data to the browser.
- An example of this would be a Stock Ticker.
- A user may have a page open that has a number of stock prices and as the
- price changes, the new value is pushed to the broswer without the need
- to refresh the page.
- Another example is the embedded Google Talk chat client in GMail.
- Instant messages from friends are automatically pushed to your browser.
+* Deployment in GlassFish
\end_layout
\begin_layout Standard
-* Push to the browser
-\end_layout
-
-\begin_layout Standard
-* [Example] following a LiveBlog of a keynote presentation, elememts are
- pushed to your browser
-\end_layout
-
-\begin_layout Standard
-* Here's a super simple example - http://wiki.liftweb.net/index.php/CometActor
-
-\end_layout
-
-\begin_layout Standard
-* Method for async updates pushed
-\end_layout
-\begin_layout Standard
-*from server to client*
-\end_layout
-
-\begin_layout Standard
-* Connection is kept open
-\end_layout
-
-\begin_layout Standard
-* Streaming
-\end_layout
-
-\begin_layout Standard
-* Long polling
-\end_layout
-
-\begin_layout Standard
-* Scalability issues
-\end_layout
-
-\begin_layout Standard
-* Using COMET in Lift
-\end_layout
-
-\begin_layout Standard
-* CometActor
-\end_layout
-
-\begin_layout Standard
-* Mine Jorge's blog post: http://scala-blogs.org/2007/12/dynamic-web-applications
--with-lift-and.html
-\end_layout
-
-\begin_layout Standard
-* Go through Dynamic chat room example
\end_layout
\end_body
View
123 chapter08.lyx
@@ -40,135 +40,106 @@
\begin_body
\begin_layout Chapter
-AJAX and COMET
+Request/Response Lifecycle
\end_layout
\begin_layout Standard
-AJAX and COMET in Lift
+8.
+ Detailed request/response handling info (should cover how Actors are used,
+ too)
\end_layout
\begin_layout Standard
-* What is AJAX? http://en.wikipedia.org/wiki/Ajax_(programming)
+1.
+ Request hits LiftFilter
\end_layout
\begin_layout Standard
-AJAX (asynchronous JavaScript and XML) is a group of techniques that allow
- for interactive web applications.
- Using AJAX applications can talk to the server asynchronously and therefore
- not disrupt the display of the client.
- (this is awkward)
+2.
+ LiftFilter executes each item in LiftRules.early.
+ This would allow you to do advance processing of the HttpRequest
\end_layout
\begin_layout Standard
-* why is AJAX awesome? [example]
+3.
+ Rewrites occur per the LiftRules.rewriteTable (set up via LiftRules.addRewriteBef
+ore/After)
\end_layout
\begin_layout Standard
-Ajax allows for a much richer interface for a web application, and example
- is Google Suggest.
- When you start typing your search term, the word fragment is sent to the
- server and common completions of your term are sent back.
+4.
+ LiftFilter determines whether the request should be handled by Lift or
+ if it should be chained.
+ If the processing fails it's automatically chained
\end_layout
\begin_layout Standard
-* Method for async updates pulled from the client without a full page reload
+5.
+ Processing takes place via the LiftFilter's internal LiftServlet instance
\end_layout
\begin_layout Standard
-* Relies heavily on javascript and XML
+6.
+ If Lift is running in Jetty, any continuations are invoked (explain a little
+ about Jetty continuations here...).
+ If continuation exists and returns a response, return
\end_layout
\begin_layout Standard
-* Javascript client-side events (button push, timer, etc) trigger requests
- "behind the scenes"
+7.
+ LiftServlet checks LiftRules.statelessDispatchTable and returns if matched
+ (what is this for?)
\end_layout
\begin_layout Standard
-* Web 2.0 built on this
+8.
+ LiftServlet checks LiftRules.dispatchTable (set up via LiftRules.addDispatchBefor
+e/After) and if dispatches match it dispatches there and returns the result
+ * detail dispatch handling
\end_layout
\begin_layout Standard
-* Using AJAX in Lift
+9.
+ LiftServlet then checks to see if the request starts with LiftRules.cometPath
+ (default "comet_request") and if so, handles the request as a COMET request
+ * detail COMET handling path
\end_layout
\begin_layout Standard
-* Allows you to bind Javascript events (AJAX) to form elements, links, etc
-
-\end_layout
-
-\begin_layout Standard
-* Go through example HelloDarwin AJAX example
-\end_layout
-
-\begin_layout Standard
-* What is COMET? http://en.wikipedia.org/wiki/Comet_(programming)
-\end_layout
-
-\begin_layout Standard
-Comet is a method that uses long-polling to keep a connection between a
- browser and a server open, to allow the server to push data to the browser.
- An example of this would be a Stock Ticker.
- A user may have a page open that has a number of stock prices and as the
- price changes, the new value is pushed to the broswer without the need
- to refresh the page.
- Another example is the embedded Google Talk chat client in GMail.
- Instant messages from friends are automatically pushed to your browser.
-\end_layout
-
-\begin_layout Standard
-* Push to the browser
-\end_layout
-
-\begin_layout Standard
-* [Example] following a LiveBlog of a keynote presentation, elememts are
- pushed to your browser
+10.
+ LiftServlet then checks to see if the request starts with LiftRules.ajaxPath
+ (default "ajax_request") and if so, handles the request as an AJAX request
+ * detail AJAX handling
\end_layout
\begin_layout Standard
-* Here's a super simple example - http://wiki.liftweb.net/index.php/CometActor
+11.
+ If nothing else has occurred, do normal template processing at this point
\end_layout
\begin_layout Standard
-* Method for async updates pushed
-\end_layout
-
-\begin_layout Standard
-*from server to client*
-\end_layout
-
-\begin_layout Standard
-* Connection is kept open
-\end_layout
-
-\begin_layout Standard
-* Streaming
-\end_layout
-
-\begin_layout Standard
-* Long polling
-\end_layout
-
-\begin_layout Standard
-* Scalability issues
+11.1.
+ Lookup template based on path
\end_layout
\begin_layout Standard
-* Using COMET in Lift
+11.2.
+ Process template recursively (surround, include, etc)
\end_layout
\begin_layout Standard
-* CometActor
+* Additional topics
\end_layout
\begin_layout Standard
-* Mine Jorge's blog post: http://scala-blogs.org/2007/12/dynamic-web-applications
--with-lift-and.html
+* S.addAround and LoanWrapper
\end_layout
\begin_layout Standard
-* Go through Dynamic chat room example
+* How S.attr works in conjunction with XML attributes on snippets, etc and
+ with Rewriting
\end_layout
\end_body
View
117 chapter09.lyx
@@ -40,135 +40,32 @@
\begin_body
\begin_layout Chapter
-AJAX and COMET
+URL Rewriting
\end_layout
\begin_layout Standard
-AJAX and COMET in Lift
+* What is URL rewriting
\end_layout
\begin_layout Standard
-* What is AJAX? http://en.wikipedia.org/wiki/Ajax_(programming)
+* Using LiftRules.addRewriteBefore.After
\end_layout
\begin_layout Standard
-AJAX (asynchronous JavaScript and XML) is a group of techniques that allow
- for interactive web applications.
- Using AJAX applications can talk to the server asynchronously and therefore
- not disrupt the display of the client.
- (this is awkward)
+* What constitutes a rewrite function?
\end_layout
\begin_layout Standard
-* why is AJAX awesome? [example]
+* Using the params Map to pass parts of the path back into your code via
+ S.param
\end_layout
\begin_layout Standard
-Ajax allows for a much richer interface for a web application, and example
- is Google Suggest.
- When you start typing your search term, the word fragment is sent to the
- server and common completions of your term are sent back.
+* Example: user-friendly URLs
\end_layout
\begin_layout Standard
-* Method for async updates pulled from the client without a full page reload
-
-\end_layout
-
-\begin_layout Standard
-* Relies heavily on javascript and XML
-\end_layout
-
-\begin_layout Standard
-* Javascript client-side events (button push, timer, etc) trigger requests
- "behind the scenes"
-\end_layout
-
-\begin_layout Standard
-* Web 2.0 built on this
-\end_layout
-
-\begin_layout Standard
-* Using AJAX in Lift
-\end_layout
-
-\begin_layout Standard
-* Allows you to bind Javascript events (AJAX) to form elements, links, etc
-
-\end_layout
-
-\begin_layout Standard
-* Go through example HelloDarwin AJAX example
-\end_layout
-
-\begin_layout Standard
-* What is COMET? http://en.wikipedia.org/wiki/Comet_(programming)
-\end_layout
-
-\begin_layout Standard
-Comet is a method that uses long-polling to keep a connection between a
- browser and a server open, to allow the server to push data to the browser.
- An example of this would be a Stock Ticker.
- A user may have a page open that has a number of stock prices and as the
- price changes, the new value is pushed to the broswer without the need
- to refresh the page.
- Another example is the embedded Google Talk chat client in GMail.
- Instant messages from friends are automatically pushed to your browser.
-\end_layout
-
-\begin_layout Standard
-* Push to the browser
-\end_layout
-
-\begin_layout Standard
-* [Example] following a LiveBlog of a keynote presentation, elememts are
- pushed to your browser
-\end_layout
-\begin_layout Standard
-* Here's a super simple example - http://wiki.liftweb.net/index.php/CometActor
-
-\end_layout
-
-\begin_layout Standard
-* Method for async updates pushed
-\end_layout
-
-\begin_layout Standard
-*from server to client*
-\end_layout
-
-\begin_layout Standard
-* Connection is kept open
-\end_layout
-
-\begin_layout Standard
-* Streaming
-\end_layout
-
-\begin_layout Standard
-* Long polling
-\end_layout
-
-\begin_layout Standard
-* Scalability issues
-\end_layout
-
-\begin_layout Standard
-* Using COMET in Lift
-\end_layout
-
-\begin_layout Standard
-* CometActor
-\end_layout
-
-\begin_layout Standard
-* Mine Jorge's blog post: http://scala-blogs.org/2007/12/dynamic-web-applications
--with-lift-and.html
-\end_layout
-
-\begin_layout Standard
-* Go through Dynamic chat room example
\end_layout
\end_body
View
111 chapter10.lyx
@@ -40,135 +40,50 @@
\begin_body
\begin_layout Chapter
-AJAX and COMET
+JSON Handling
\end_layout
\begin_layout Standard
-AJAX and COMET in Lift
+10.
+ JSON handling
\end_layout
\begin_layout Standard
-* What is AJAX? http://en.wikipedia.org/wiki/Ajax_(programming)
+* What is JSON?
\end_layout
\begin_layout Standard
-AJAX (asynchronous JavaScript and XML) is a group of techniques that allow
- for interactive web applications.
- Using AJAX applications can talk to the server asynchronously and therefore
- not disrupt the display of the client.
- (this is awkward)
+* Why is JSON awesome? [example]
\end_layout
\begin_layout Standard
-* why is AJAX awesome? [example]
+* Technically, just a data format for Javascript (http://www.json.org/)
\end_layout
\begin_layout Standard
-Ajax allows for a much richer interface for a web application, and example
- is Google Suggest.
- When you start typing your search term, the word fragment is sent to the
- server and common completions of your term are sent back.
+* Used as an RPC transfer format
\end_layout
\begin_layout Standard
-* Method for async updates pulled from the client without a full page reload
-
-\end_layout
-
-\begin_layout Standard
-* Relies heavily on javascript and XML
-\end_layout
-
-\begin_layout Standard
-* Javascript client-side events (button push, timer, etc) trigger requests
- "behind the scenes"
+* Well-suited to AJAX because it's essentially javascript
\end_layout
\begin_layout Standard
-* Web 2.0 built on this
+* How does Lift support JSON?
\end_layout
\begin_layout Standard
-* Using AJAX in Lift
-\end_layout
-
-\begin_layout Standard
-* Allows you to bind Javascript events (AJAX) to form elements, links, etc
+* JsonHandler allows simple wrapping and processing of JSON (AJAX) forms
\end_layout
\begin_layout Standard
-* Go through example HelloDarwin AJAX example
-\end_layout
-
-\begin_layout Standard
-* What is COMET? http://en.wikipedia.org/wiki/Comet_(programming)
-\end_layout
-
-\begin_layout Standard
-Comet is a method that uses long-polling to keep a connection between a
- browser and a server open, to allow the server to push data to the browser.
- An example of this would be a Stock Ticker.
- A user may have a page open that has a number of stock prices and as the
- price changes, the new value is pushed to the broswer without the need
- to refresh the page.
- Another example is the embedded Google Talk chat client in GMail.
- Instant messages from friends are automatically pushed to your browser.
-\end_layout
-
-\begin_layout Standard
-* Push to the browser
-\end_layout
-
-\begin_layout Standard
-* [Example] following a LiveBlog of a keynote presentation, elememts are
- pushed to your browser
-\end_layout
-
-\begin_layout Standard
-* Here's a super simple example - http://wiki.liftweb.net/index.php/CometActor
-
-\end_layout
-
-\begin_layout Standard
-* Method for async updates pushed
-\end_layout
-
-\begin_layout Standard
-*from server to client*
-\end_layout
-
-\begin_layout Standard
-* Connection is kept open
-\end_layout
-
-\begin_layout Standard
-* Streaming
-\end_layout
-
-\begin_layout Standard
-* Long polling
-\end_layout
-
-\begin_layout Standard
-* Scalability issues
-\end_layout
-
-\begin_layout Standard
-* Using COMET in Lift
-\end_layout
-
-\begin_layout Standard
-* CometActor
-\end_layout
-
-\begin_layout Standard
-* Mine Jorge's blog post: http://scala-blogs.org/2007/12/dynamic-web-applications
--with-lift-and.html
+* JsonCmd allows matching of submitted JSON
\end_layout
\begin_layout Standard
-* Go through Dynamic chat room example
+* Go through example JSON/AJAX submission form.
+ Maybe it would be best to make it an extension of one of the other examples?
\end_layout
\end_body
View
117 chapter11.lyx
@@ -40,135 +40,36 @@
\begin_body
\begin_layout Chapter
-AJAX and COMET
+JsCommands
\end_layout
\begin_layout Standard
-AJAX and COMET in Lift
+11.
+ JsCommands
\end_layout
\begin_layout Standard
-* What is AJAX? http://en.wikipedia.org/wiki/Ajax_(programming)
+* Integrated javascript handling without hard-coding it in templates
\end_layout
\begin_layout Standard
-AJAX (asynchronous JavaScript and XML) is a group of techniques that allow
- for interactive web applications.
- Using AJAX applications can talk to the server asynchronously and therefore
- not disrupt the display of the client.
- (this is awkward)
+* jQuery intro
\end_layout
\begin_layout Standard
-* why is AJAX awesome? [example]
+* Utility library that makes IE6 less ugly ;)
\end_layout
\begin_layout Standard
-Ajax allows for a much richer interface for a web application, and example
- is Google Suggest.
- When you start typing your search term, the word fragment is sent to the
- server and common completions of your term are sent back.
+* Powerful support for dynamic attributing of elements
\end_layout
\begin_layout Standard
-* Method for async updates pulled from the client without a full page reload
-
+* Based on CSS selectors
\end_layout
\begin_layout Standard
-* Relies heavily on javascript and XML
-\end_layout
-
-\begin_layout Standard
-* Javascript client-side events (button push, timer, etc) trigger requests
- "behind the scenes"
-\end_layout
-
-\begin_layout Standard
-* Web 2.0 built on this
-\end_layout
-
-\begin_layout Standard
-* Using AJAX in Lift
-\end_layout
-
-\begin_layout Standard
-* Allows you to bind Javascript events (AJAX) to form elements, links, etc
-
-\end_layout
-
-\begin_layout Standard
-* Go through example HelloDarwin AJAX example
-\end_layout
-
-\begin_layout Standard
-* What is COMET? http://en.wikipedia.org/wiki/Comet_(programming)
-\end_layout
-
-\begin_layout Standard
-Comet is a method that uses long-polling to keep a connection between a
- browser and a server open, to allow the server to push data to the browser.
- An example of this would be a Stock Ticker.
- A user may have a page open that has a number of stock prices and as the
- price changes, the new value is pushed to the broswer without the need
- to refresh the page.
- Another example is the embedded Google Talk chat client in GMail.
- Instant messages from friends are automatically pushed to your browser.
-\end_layout
-
-\begin_layout Standard
-* Push to the browser
-\end_layout
-
-\begin_layout Standard
-* [Example] following a LiveBlog of a keynote presentation, elememts are
- pushed to your browser
-\end_layout
-
-\begin_layout Standard
-* Here's a super simple example - http://wiki.liftweb.net/index.php/CometActor
-
-\end_layout
-
-\begin_layout Standard
-* Method for async updates pushed
-\end_layout
-
-\begin_layout Standard
-*from server to client*
-\end_layout
-
-\begin_layout Standard
-* Connection is kept open
-\end_layout
-
-\begin_layout Standard
-* Streaming
-\end_layout
-
-\begin_layout Standard
-* Long polling
-\end_layout
-
-\begin_layout Standard
-* Scalability issues
-\end_layout
-
-\begin_layout Standard
-* Using COMET in Lift
-\end_layout
-
-\begin_layout Standard
-* CometActor
-\end_layout
-
-\begin_layout Standard
-* Mine Jorge's blog post: http://scala-blogs.org/2007/12/dynamic-web-applications
--with-lift-and.html
-\end_layout
-
-\begin_layout Standard
-* Go through Dynamic chat room example
+* Talk about Marius JS abstraction
\end_layout
\end_body
View
36 master.lyx
@@ -114,5 +114,41 @@ preview false
\end_layout
+\begin_layout Standard
+\begin_inset Include \include{chapter07.lyx}
+preview false
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Include \include{chapter08.lyx}
+preview false
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Include \include{chapter09.lyx}
+preview false
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Include \include{chapter10.lyx}
+preview false
+
+\end_inset
+
+
+\end_layout
+
\end_body
\end_document
Please sign in to comment.
Something went wrong with that request. Please try again.