Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 308 lines (260 sloc) 12.375 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 …
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"
e218091 @tjweir more details
authored
75 * Profit! - let's hope :)
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
76 * Cursory examination of:
77 * Index template (shows surround and snippet)
78 * Default template
79 * Hello snippet
e218091 @tjweir more details
authored
80 * Optionally install the JavaRebel Scala plugin from zeroturnaround
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
81
82 2. Getting to know Maven and Project layout (based on HelloLift example)
83
84 - I think this should be a small, but self-contained section with
85 enough info so that someone who wanted to do "standard" things with
86 Maven wouldn't need to go digging around on the site. In other
87 words, enough info on maven in this book to handle all of the
88 examples we use in the book.
89
90 * What is maven
91 * Comprehensive project and build management
92 * Structured project layout (conventions)
93 * Dependency management
94 * Automated testing and packaging
95 * Automated reporting
96 * Archetypes: project "templates"
97 * Directory layout
98 * Scala-specific stuff
99 * web content
100 * resources
101 * Introducing the POM
102 * Project info (author, date, version, etc)
103 * Repo definitions
104 * Dependencies
105 * Special build targets
3f3ec1e Fixed some whitespace that git was complaining about
Derek Chen-Becker authored
106
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
107 ====== General Topics ======
108
e218091 @tjweir more details
authored
109 3. Lift Architecture in general
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
110 * Everything handled by LiftFilter
111 * Show example config in web.xml
112 * Handling in LiftFilter allows fall-through to default handlers for things that Lift doesn't handle (Static content, primarily)
113 * Rendering pipeline (This can be high-level right now, with links to detailed info in the advanced section - Derek)
114 * Dispatch to proper code
115 * dispatch methods in effect?
116 * rewrite methods in effect?
117 * SiteMap matching and access control
118 * template or view matched?
119 * recursive processing of template and any snippets contained therein
120 * direct processing of view
121 * Error handling
122 * List of tags that are handled by Lift (stolen from http://liftweb.net/index.php/LiftTags, not sure how up-to-date this is)
123 * surround
124 * embed
125 * comet
126 * ignore
127 * snippet (and, the alternative lift:<class>.<method>)
128 * additional attribute handling in tags (via S.attr)
129
130 4. A detailed look at lift user components
131 * SiteMap
132 * Performs two primary duties: generates the menu for your site (customizable) and performs per-page access control
133 * Cover Menu, Loc objects to define paths and superpaths (my term for paths that match anything under them)
134 * Additional attributes
135 * If
136 * Unless
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
137 * Test
138 * Title
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
139 * Templates
140 * Static xml that may embed or surround other templates, and may embed snippets (reference tag list)
141 * well-formed XML
142 * Special template-hidden directory not directly accessible
143 * Use of prefixed elements to assist with binding in snippets
144 * Re-cover how templates are located/dispatched
145 * Snippets
146 * Chunks of code that generate pieces of a final output page. May themselves generate template code that is interpreted
147 * Generic Scala classes (stateless)
148 * How to deal with state in snippets
149 * RequestVars
150 * SessionVars
151 * StatefulSnippets
152 * Using Helpers.bind. In particular, cover view vs. forms usage
153 * Using Helpers.chooseTemplate for nested templates
154 * Views
155 * Chunks of code intended to generate a complete page
156 * Can be shoehorned to process template code via processSurroundAndInclude
157 * Re-cover how views are located/dispatched
158 * Path-based (/my/view)
159 * addDispatchBefore/After
160 * What are the use cases for snippets vs. views?
161
162 5. Intro to the Mapper package
0f33d38 @tjweir more details, a couple of questions.
authored
163 * This may be Mapper, or it may be Record depending on whether Record makes the 1.0 cut
164 * If it's Mapper, then blurb about all the Mapped* fields
165
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
166
167 6. AJAX and COMET
0f33d38 @tjweir more details, a couple of questions.
authored
168 * What is COMET?
e218091 @tjweir more details
authored
169 * Why is Comet Awesome? [example]
170 * Push to the browser
171 * Example following a LiveBlog of a keynote presentation, elememts are pushed to your browser
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
172 * Method for async updates pushed *from server to client*
173 * Connection is kept open
174 * Streaming
175 * Long polling
176 * Scalability issues
177 * Using COMET in Lift
178 * CometActor
179 * Mine Jorge's blog post: http://scala-blogs.org/2007/12/dynamic-web-applications-with-lift-and.html
180 * Go through Dynamic chat room example
181 * What is AJAX?
e218091 @tjweir more details
authored
182 * why is AJAX awesome? [example]
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
183 * Method for async updates pulled from the client without a full page reload
184 * Relies heavily on javascript and XML
185 * Javascript client-side events (button push, timer, etc) trigger requests "behind the scenes"
186 * Web 2.0 built on this
187 * Using AJAX in Lift
188 * Allows you to bind Javascript events (AJAX) to form elements, links, etc
189 * 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
190
191 7. Deployment
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
192 - Ask the list what they are deploying with. Generally it shouldn't
193 be an issue where they deploy since Lift is essentially
194 self-contained. We can go into specifics for special cases, I
195 suppose
e218091 @tjweir more details
authored
196 -!! jetty is required for continuations
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
197
198 * Basic deployment via Jetty
199 * Brief overview of Jetty
200 * Capabilities
201 * Configuration
202 * SSL
203 * How jetty is configured in maven for testing
204 * Changing the default port (8080)
205 * Tips and tricks
206 * Deployment in Tomcat
207 * Packaging options (pom dependency scope)
208 * Deployment in JBoss
209 * Deployment in GlassFish
e218091 @tjweir more details
authored
210 * putting nginx out front???
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
211
212 ====== Advanced Topics ======
213
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
214 8. Detailed request/response handling info (should cover how Actors are used, too)
215 1. Request hits LiftFilter
216 2. LiftFilter executes each item in LiftRules.early. This would allow you to do advance processing of the HttpRequest
217 3. Rewrites occur per the LiftRules.rewriteTable (set up via LiftRules.addRewriteBefore/After)
218 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
219 5. Processing takes place via the LiftFilter's internal LiftServlet instance
220 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
221 7. LiftServlet checks LiftRules.statelessDispatchTable and returns if matched (what is this for?)
222 8. LiftServlet checks LiftRules.dispatchTable (set up via LiftRules.addDispatchBefore/After) and if dispatches match it dispatches there and returns the result
223 * detail dispatch handling
224 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
225 * detail COMET handling path
226 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
227 * detail AJAX handling
228 11. If nothing else has occurred, do normal template processing at this point
229 1. Lookup template based on path
230 2. Process template recursively (surround, include, etc)
231 * Additional topics
232 * S.addAround and LoanWrapper
233 * 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
234
235 9. URL Rewriting
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
236 * What is URL rewriting
237 * Using LiftRules.addRewriteBefore.After
238 * What constitutes a rewrite function?
239 * 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
240 * Example: user-friendly URLs
241
242 10. JSON handling
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
243 * What is JSON?
e218091 @tjweir more details
authored
244 * Why is JSON awesome? [example]
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored
245 * Technically, just a data format for Javascript (http://www.json.org/)
246 * Used as an RPC transfer format
247 * Well-suited to AJAX because it's essentially javascript
248 * How does Lift support JSON?
249 * JsonHandler allows simple wrapping and processing of JSON (AJAX) forms
250 * JsonCmd allows matching of submitted JSON
251 * Go through example JSON/AJAX submission form. Maybe it would be best to make
252 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
253
254 11. JsCommands
255 * Integrated javascript handling without hard-coding it in templates
256 * jQuery intro
257 * Utility library that makes IE6 less ugly ;)
258 * Powerful support for dynamic attributing of elements
259 * Based on CSS selectors
560764e @tjweir Small additions, fleshing out topics.
authored
260 * Talk about Marius JS abstraction
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
261
262 12. AJAX and COMET in depth
560764e @tjweir Small additions, fleshing out topics.
authored
263 - this is probably the place for the Spreadsheet example
264 - 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
265
266 13. JPA Integration
560764e @tjweir Small additions, fleshing out topics.
authored
267 - [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
268
269 14. Using Scala Actors
560764e @tjweir Small additions, fleshing out topics.
authored
270 - this is a broad topic, ask the committor list for opinions
271
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
272
273 ====== Advanced Examples ======
274
275 15. OpenID Integration
276
277 16. Lucene/Compass Integration
278
279 17. Tagging support
280
281 ====== Appendices ======
282
283 A. Lift message handling
560764e @tjweir Small additions, fleshing out topics.
authored
284 - What happens now
285 - 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
286
287 B. Helpers methods, in particular Can/Empty/Full
560764e @tjweir Small additions, fleshing out topics.
authored
288 - 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
289
290 C. I18N and L10N
291 * S.?(String)
292 * lift:loc tag
560764e @tjweir Small additions, fleshing out topics.
authored
293 * Proper placement of language resources
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
294
295 D. Logging
296 * Configuring built-in log4j
297 * Using slf4j instead
0f33d38 @tjweir more details, a couple of questions.
authored
298 * Query Logger
299 * Maybe some recommendations?
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored
300
301 E. Mailer
302 * Configuring the mailer lib
303 * Sending email
e218091 @tjweir more details
authored
304 * System.properties
9681159 @tjweir Lets seed
authored
305
0f33d38 @tjweir more details, a couple of questions.
authored
306
307
Something went wrong with that request. Please try again.