Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 302 lines (253 sloc) 12.035 kb
b6693c2 @tjweir Add the works license.
authored
1 We chose a license: http://creativecommons.org/license/results-one?license_code=by-nd
2 License:
0f33d38 @tjweir more details, a couple of questions.
authored
3 This work is licensed under the Creative Commons Attribution-No Derivative Works 3.0 Unported License.
4 To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/3.0/ or send a letter to
5 Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
b6693c2 @tjweir Add the works license.
authored
6
7
8
0f33d38 @tjweir more details, a couple of questions.
authored
9 [Decision] Pick an application to build from scratch.
10 Here are a few ideas
11 - blogging tool (rebuild and extend HelloLift) Super obvious :)
12 - ToDo tracker (extend to group todo tracker)
13 - build PocketChangeApp (my simple expense tracker)
14 - Build LuxTape, a lift implementation of OpenTape
9681159 @tjweir Lets seed
authored
15
16
0f33d38 @tjweir more details, a couple of questions.
authored
17 [Decision] Should we compare and contrast with other frameworks? I don't know many others --Tyler
18
19 [Ideas]
20 1. Include a "Lift quick reference card": all of the lift template tags, brief overview of the render flow (with cross-refs) (love this idea -Ty)
21
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
22
23 --------------------
24 IMHO we should start with an introduction that gives a brief overview
25 of what Lift is trying to solve, how it works and why it does it
26 well. The first half would explain some basics about it (built on
27 Scala, incredible template support, clean separation of V and C), and
28 then the second half would walk the user through running the HelloLift
29 example just to get something going out of the box. From my
30 understanding at this point that would involve just three things:
31 installing Java (if required), installing Maven2, and then downloading
32 and running the HelloLift project zip. Of those three, I think
9203e13 @tjweir Clean up some GoogleDocs debris
authored
33 installing Maven is probably the most complex - Derek
9681159 @tjweir Lets seed
authored
34
63c477c Expanded more of the sections out. I'll expand the JPA section a bit tom...
Derek Chen-Becker authored
35 So you see 2 distinct Sections: Generalized info and intro, and
36 getting into and building an app? Sounds good to me. -Tyler
37
38 Next question is how much should assume about Scala knowledge? - Derek
39
0f33d38 @tjweir more details, a couple of questions.
authored
40 I think if we assume none, we'll never finish the book. I would prefer to target
41 those that are comfortable with Scala. -Ty
9681159 @tjweir Lets seed
authored
42 --------------------
43
0f33d38 @tjweir more details, a couple of questions.
authored
44 ===============================
45 BOOK
46 ===============================
47
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
48 ====== Intro Section ======
49
50 1. Introduction
51 * Welcome to lift
52 * What is lift?
53 * Fast, flexible template-based web framework built on Scala
54 * Full-featured template system
55 * Clean separation of M,V and C
56 * Powerful Web 2.0 (AJAX, COMET) support baked in
57 * Thriving community of developers
58 * Brief overview of Scala
59 * OO/FP Hybird
60 * Compiles to JVM Bytecode
61 * Made by the good people who brought us generics
62 * You get a new powerful language with access to all of Java's libs
63 * Why another framework?
64 * Too much boilerplate in other frameworks (Struts, we're talking about you)
65 * Exposure of programming logic in templates makes things difficult (JSP, etc)
66 * Scala has higher efficiency in terms of LoC per function point
67 * Powerful AJAX, COMET and JS support
68 * Let's try out HelloLift
69 * Prerequisites
70 * Java 1.5 or newer (Scala is not required directly since Maven will pull it down)
9681159 @tjweir Lets seed
authored
71 * Maven 2 - include a very brief synopsis on Maven. Anything more detailed should point to the Maven site or go in an appendix
3f3ec1e Fixed some whitespace that git was complaining about
Derek Chen-Becker authored
72 * Some sort of programming editor is recommended: mention emacs, Eclipse, NetBeans, JEdit, etc.
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
73 * Download the HelloLift project and unzip it
74 * "mvn jetty:run"
75 * Profit!
76 * Cursory examination of:
77 * Index template (shows surround and snippet)
78 * Default template
79 * Hello snippet
80
81 2. Getting to know Maven and Project layout (based on HelloLift example)
82
83 - I think this should be a small, but self-contained section with
84 enough info so that someone who wanted to do "standard" things with
85 Maven wouldn't need to go digging around on the site. In other
86 words, enough info on maven in this book to handle all of the
87 examples we use in the book.
88
89 * What is maven
90 * Comprehensive project and build management
91 * Structured project layout (conventions)
92 * Dependency management
93 * Automated testing and packaging
94 * Automated reporting
95 * Archetypes: project "templates"
96 * Directory layout
97 * Scala-specific stuff
98 * web content
99 * resources
100 * Introducing the POM
101 * Project info (author, date, version, etc)
102 * Repo definitions
103 * Dependencies
104 * Special build targets
3f3ec1e Fixed some whitespace that git was complaining about
Derek Chen-Becker authored
105
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
106 ====== General Topics ======
107
108 3. Lift Architecture in general (need info from dpp and marius)
109 * Everything handled by LiftFilter
110 * Show example config in web.xml
111 * Handling in LiftFilter allows fall-through to default handlers for things that Lift doesn't handle (Static content, primarily)
112 * Rendering pipeline (This can be high-level right now, with links to detailed info in the advanced section - Derek)
113 * Dispatch to proper code
114 * dispatch methods in effect?
115 * rewrite methods in effect?
116 * SiteMap matching and access control
117 * template or view matched?
118 * recursive processing of template and any snippets contained therein
119 * direct processing of view
120 * Error handling
121 * List of tags that are handled by Lift (stolen from http://liftweb.net/index.php/LiftTags, not sure how up-to-date this is)
122 * surround
123 * embed
124 * comet
125 * ignore
126 * snippet (and, the alternative lift:<class>.<method>)
127 * additional attribute handling in tags (via S.attr)
128
129 4. A detailed look at lift user components
130 * SiteMap
131 * Performs two primary duties: generates the menu for your site (customizable) and performs per-page access control
132 * Cover Menu, Loc objects to define paths and superpaths (my term for paths that match anything under them)
133 * Additional attributes
134 * If
135 * Unless
63c477c Expanded more of the sections out. I'll expand the JPA section a bit tom...
Derek Chen-Becker authored
136 * Test
137 * Title
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
138 * Templates
139 * Static xml that may embed or surround other templates, and may embed snippets (reference tag list)
140 * well-formed XML
141 * Special template-hidden directory not directly accessible
142 * Use of prefixed elements to assist with binding in snippets
143 * Re-cover how templates are located/dispatched
144 * Snippets
145 * Chunks of code that generate pieces of a final output page. May themselves generate template code that is interpreted
146 * Generic Scala classes (stateless)
147 * How to deal with state in snippets
148 * RequestVars
149 * SessionVars
150 * StatefulSnippets
151 * Using Helpers.bind. In particular, cover view vs. forms usage
152 * Using Helpers.chooseTemplate for nested templates
153 * Views
154 * Chunks of code intended to generate a complete page
155 * Can be shoehorned to process template code via processSurroundAndInclude
156 * Re-cover how views are located/dispatched
157 * Path-based (/my/view)
158 * addDispatchBefore/After
159 * What are the use cases for snippets vs. views?
160
161 5. Intro to the Mapper package
0f33d38 @tjweir more details, a couple of questions.
authored
162 * This may be Mapper, or it may be Record depending on whether Record makes the 1.0 cut
163 * If it's Mapper, then blurb about all the Mapped* fields
164
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
165
166 6. AJAX and COMET
0f33d38 @tjweir more details, a couple of questions.
authored
167 * What is COMET?
168 * Why is Comet Awesome?
63c477c Expanded more of the sections out. I'll expand the JPA section a bit tom...
Derek Chen-Becker authored
169 * Method for async updates pushed *from server to client*
170 * Connection is kept open
171 * Streaming
172 * Long polling
173 * Scalability issues
174 * Using COMET in Lift
175 * CometActor
176 * Mine Jorge's blog post: http://scala-blogs.org/2007/12/dynamic-web-applications-with-lift-and.html
177 * Go through Dynamic chat room example
178 * What is AJAX?
0f33d38 @tjweir more details, a couple of questions.
authored
179 * why is AJAX awesome?
63c477c Expanded more of the sections out. I'll expand the JPA section a bit tom...
Derek Chen-Becker authored
180 * Method for async updates pulled from the client without a full page reload
181 * Relies heavily on javascript and XML
182 * Javascript client-side events (button push, timer, etc) trigger requests "behind the scenes"
183 * Web 2.0 built on this
184 * Using AJAX in Lift
185 * Allows you to bind Javascript events (AJAX) to form elements, links, etc
186 * Go through example HelloDarwin AJAX example
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
187
188 7. Deployment
560764e @tjweir Small additions, fleshing out topics.
authored
189
63c477c Expanded more of the sections out. I'll expand the JPA section a bit tom...
Derek Chen-Becker authored
190 - Ask the list what they are deploying with. Generally it shouldn't
191 be an issue where they deploy since Lift is essentially
192 self-contained. We can go into specifics for special cases, I
193 suppose
194
195 * Basic deployment via Jetty
196 * Brief overview of Jetty
197 * Capabilities
198 * Configuration
199 * SSL
200 * How jetty is configured in maven for testing
201 * Changing the default port (8080)
202 * Tips and tricks
203 * Deployment in Tomcat
204 * Packaging options (pom dependency scope)
205 * Deployment in JBoss
206 * Deployment in GlassFish
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
207
208 ====== Advanced Topics ======
209
63c477c Expanded more of the sections out. I'll expand the JPA section a bit tom...
Derek Chen-Becker authored
210 8. Detailed request/response handling info (should cover how Actors are used, too)
211 1. Request hits LiftFilter
212 2. LiftFilter executes each item in LiftRules.early. This would allow you to do advance processing of the HttpRequest
213 3. Rewrites occur per the LiftRules.rewriteTable (set up via LiftRules.addRewriteBefore/After)
214 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
215 5. Processing takes place via the LiftFilter's internal LiftServlet instance
216 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
217 7. LiftServlet checks LiftRules.statelessDispatchTable and returns if matched (what is this for?)
218 8. LiftServlet checks LiftRules.dispatchTable (set up via LiftRules.addDispatchBefore/After) and if dispatches match it dispatches there and returns the result
219 * detail dispatch handling
220 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
221 * detail COMET handling path
222 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
223 * detail AJAX handling
224 11. If nothing else has occurred, do normal template processing at this point
225 1. Lookup template based on path
226 2. Process template recursively (surround, include, etc)
227 * Additional topics
228 * S.addAround and LoanWrapper
229 * How S.attr works in conjunction with XML attributes on snippets, etc and with Rewriting
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
230
231 9. URL Rewriting
63c477c Expanded more of the sections out. I'll expand the JPA section a bit tom...
Derek Chen-Becker authored
232 * What is URL rewriting
233 * Using LiftRules.addRewriteBefore.After
234 * What constitutes a rewrite function?
235 * Using the params Map to pass parts of the path back into your code via S.param
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
236 * Example: user-friendly URLs
237
238 10. JSON handling
63c477c Expanded more of the sections out. I'll expand the JPA section a bit tom...
Derek Chen-Becker authored
239 * What is JSON?
240 * Technically, just a data format for Javascript (http://www.json.org/)
241 * Used as an RPC transfer format
242 * Well-suited to AJAX because it's essentially javascript
243 * How does Lift support JSON?
244 * JsonHandler allows simple wrapping and processing of JSON (AJAX) forms
245 * JsonCmd allows matching of submitted JSON
246 * Go through example JSON/AJAX submission form. Maybe it would be best to make
247 it an extension of one of the other examples?
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
248
249 11. JsCommands
250 * Integrated javascript handling without hard-coding it in templates
251 * jQuery intro
252 * Utility library that makes IE6 less ugly ;)
253 * Powerful support for dynamic attributing of elements
254 * Based on CSS selectors
560764e @tjweir Small additions, fleshing out topics.
authored
255 * Talk about Marius JS abstraction
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
256
257 12. AJAX and COMET in depth
560764e @tjweir Small additions, fleshing out topics.
authored
258 - this is probably the place for the Spreadsheet example
259 - talk about design "patterns" ex. the proper TagCloud example
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
260
261 13. JPA Integration
560764e @tjweir Small additions, fleshing out topics.
authored
262 - [I know nothing about this -Tyler]
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
263
264 14. Using Scala Actors
560764e @tjweir Small additions, fleshing out topics.
authored
265 - this is a broad topic, ask the committor list for opinions
266
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
267
268 ====== Advanced Examples ======
269
270 15. OpenID Integration
271
272 16. Lucene/Compass Integration
273
274 17. Tagging support
275
276 ====== Appendices ======
277
278 A. Lift message handling
560764e @tjweir Small additions, fleshing out topics.
authored
279 - What happens now
280 - How to Fade them web2.0 stylee!
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
281
282 B. Helpers methods, in particular Can/Empty/Full
560764e @tjweir Small additions, fleshing out topics.
authored
283 - Can is super important, as it's everywhere
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
284
285 C. I18N and L10N
286 * S.?(String)
287 * lift:loc tag
560764e @tjweir Small additions, fleshing out topics.
authored
288 * Proper placement of language resources
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
289
290 D. Logging
291 * Configuring built-in log4j
292 * Using slf4j instead
0f33d38 @tjweir more details, a couple of questions.
authored
293 * Query Logger
294 * Maybe some recommendations?
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
295
296 E. Mailer
297 * Configuring the mailer lib
298 * Sending email
9681159 @tjweir Lets seed
authored
299
0f33d38 @tjweir more details, a couple of questions.
authored
300
301
Something went wrong with that request. Please try again.