Skip to content
Newer
Older
100644 466 lines (404 sloc) 19.6 KB
b6693c2 @tjweir Add the works license.
authored Sep 17, 2008
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 Sep 19, 2008
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 Sep 18, 2008
6
7
8
48a3748 @tjweir Example talking
authored Sep 23, 2008
9 [Decision] Pick an application to build from scratch.
10 (Let's see if we can extend these hit all of the sections -Ty)
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
11 Here are a few ideas
48a3748 @tjweir Example talking
authored Sep 23, 2008
12 - Maybe - ToDo tracker (extend to group todo tracker)
13 - Add an API
14 - Comet feature, add group editing?
15 - AJAX - Fades!!! Moar FAdez!!
16 - OpenID works
17 - search works
18 - tags work
19
20 - Maybe - build PocketChangeApp (my simple expense tracker, we can build this and put it up as pocketchangeapp.com, nice -Ty)
21 - API would actually be awesome for this
22 - Comet would be hard unless you could have like a joint account - this would be awesometown
23 - Search works
24 - OpenID works
25 - tags work
26
27 - Maybe - Build LuxTape, a lift implementation of OpenTape
28 - trendy!
29 - legal issues?
30 - comet would make sense
31 -
9681159 @tjweir Lets seed
authored Sep 16, 2008
32
33
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
34 [Decision] Should we compare and contrast with other frameworks? I don't know many others --Tyler
35
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
36 - Not sure on this. I've done a lot of Struts 1 and some Tapestry in
37 the past, but it's getting a little rusty and both frameworks have
38 recently added and refined a lot. I have a feeling that comparisons
39 are better left to the bloggers...
1653ad4 @tjweir Add a question
authored Sep 22, 2008
40
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
41 1. Include a "Lift quick reference card": (love this idea -Ty)
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
42
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
43
44 --------------------
45 IMHO we should start with an introduction that gives a brief overview
46 of what Lift is trying to solve, how it works and why it does it
47 well. The first half would explain some basics about it (built on
48 Scala, incredible template support, clean separation of V and C), and
49 then the second half would walk the user through running the HelloLift
50 example just to get something going out of the box. From my
51 understanding at this point that would involve just three things:
52 installing Java (if required), installing Maven2, and then downloading
53 and running the HelloLift project zip. Of those three, I think
9203e13 @tjweir Clean up some GoogleDocs debris
authored Sep 17, 2008
54 installing Maven is probably the most complex - Derek
9681159 @tjweir Lets seed
authored Sep 16, 2008
55
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
56 So you see 2 distinct Sections: Generalized info and intro, and
57 getting into and building an app? Sounds good to me. -Tyler
58
59 Next question is how much should assume about Scala knowledge? - Derek
60
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
61 I think if we assume none, we'll never finish the book. I would prefer to target
62 those that are comfortable with Scala. -Ty
9681159 @tjweir Lets seed
authored Sep 16, 2008
63 --------------------
64
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
65 ===============================
66 BOOK
67 ===============================
68
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
69 ====== Intro Section ======
70
71 1. Introduction
72 * Welcome to lift
2c2ee91 @dchenbecker Expanded JPA Section
dchenbecker authored Sep 20, 2008
73 * What we'd like you to get out of this book
1930e92 @tjweir Started turning points into prose.
authored Sep 21, 2008
74 * By the end of the book you should be able to create and extend any web application you can think of
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
75 * Why another framework?
76 * Too much boilerplate in other frameworks (Struts, we're talking about you)
77 * Exposure of programming logic in templates makes things difficult (JSP, etc)
78 * Scala has higher efficiency in terms of LoC per function point
79 * Powerful AJAX, COMET and JS support
2c2ee91 @dchenbecker Expanded JPA Section
dchenbecker authored Sep 20, 2008
80 * What we expect you to already know
81 * Scala
82 * HTTP protocol
83 * HTML
84 * Javascript
1930e92 @tjweir Started turning points into prose.
authored Sep 21, 2008
85 * CSS
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
86 * What is lift?
87 * Fast, flexible template-based web framework built on Scala
88 * Full-featured template system
89 * Clean separation of M,V and C
90 * Powerful Web 2.0 (AJAX, COMET) support baked in
91 * Thriving community of developers
92 * Brief overview of Scala
93 * OO/FP Hybird
94 * Compiles to JVM Bytecode
95 * Made by the good people who brought us generics
96 * You get a new powerful language with access to all of Java's libs
97 * Let's try out HelloLift
98 * Prerequisites
99 * Java 1.5 or newer (Scala is not required directly since Maven will pull it down)
9681159 @tjweir Lets seed
authored Sep 16, 2008
100 * 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 Sep 16, 2008
101 * 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 Sep 16, 2008
102 * Download the HelloLift project and unzip it
103 * "mvn jetty:run"
e218091 @tjweir more details
authored Sep 19, 2008
104 * Profit! - let's hope :)
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
105 * Cursory examination of:
106 * Index template (shows surround and snippet)
107 * Default template
108 * Hello snippet
e218091 @tjweir more details
authored Sep 19, 2008
109 * 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 Sep 16, 2008
110
111 2. Getting to know Maven and Project layout (based on HelloLift example)
112
113 - I think this should be a small, but self-contained section with
114 enough info so that someone who wanted to do "standard" things with
115 Maven wouldn't need to go digging around on the site. In other
116 words, enough info on maven in this book to handle all of the
117 examples we use in the book.
118
119 * What is maven
120 * Comprehensive project and build management
121 * Structured project layout (conventions)
122 * Dependency management
123 * Automated testing and packaging
124 * Automated reporting
125 * Archetypes: project "templates"
126 * Directory layout
127 * Scala-specific stuff
128 * web content
129 * resources
130 * Introducing the POM
131 * Project info (author, date, version, etc)
132 * Repo definitions
133 * Dependencies
134 * Special build targets
3f3ec1e Fixed some whitespace that git was complaining about
Derek Chen-Becker authored Sep 16, 2008
135
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
136 ====== General Topics ======
137
e218091 @tjweir more details
authored Sep 19, 2008
138 3. Lift Architecture in general
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
139 * Everything handled by LiftFilter
140 * Show example config in web.xml
141 * Handling in LiftFilter allows fall-through to default handlers for things that Lift doesn't handle (Static content, primarily)
142 * Rendering pipeline (This can be high-level right now, with links to detailed info in the advanced section - Derek)
143 * Dispatch to proper code
144 * dispatch methods in effect?
145 * rewrite methods in effect?
146 * SiteMap matching and access control
147 * template or view matched?
148 * recursive processing of template and any snippets contained therein
149 * direct processing of view
150 * Error handling
151 * List of tags that are handled by Lift (stolen from http://liftweb.net/index.php/LiftTags, not sure how up-to-date this is)
152 * surround
153 * embed
154 * comet
155 * ignore
156 * snippet (and, the alternative lift:<class>.<method>)
157 * additional attribute handling in tags (via S.attr)
158
159 4. A detailed look at lift user components
160 * SiteMap
161 * Performs two primary duties: generates the menu for your site (customizable) and performs per-page access control
162 * Cover Menu, Loc objects to define paths and superpaths (my term for paths that match anything under them)
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
163 * Support for grouping via LocGroup object
164 * <lift:Menu> snippets:
165 * <lift:Menu.group group="...">content</...> (http://groups.google.com/group/liftweb/browse_thread/thread/5f18df13cd735c51?hl=en#)
166 * <lift:Menu.item name="..."> binding to Loc("...",) (http://groups.google.com/group/liftweb/browse_thread/thread/dbdf6a17b9704c99/30f5168e87161f74?hl=en&lnk=gst&q=new+sitemap%2Fmenu+features)
167 * Customizing content and attributes on menus
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
168 * Additional attributes
169 * If
170 * Unless
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
171 * Test
172 * Title
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
173 * Finding the current Loc for a page (RequestState.location)
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
174 * Templates
175 * Static xml that may embed or surround other templates, and may embed snippets (reference tag list)
176 * well-formed XML
177 * Special template-hidden directory not directly accessible
178 * Use of prefixed elements to assist with binding in snippets
179 * Re-cover how templates are located/dispatched
180 * Snippets
181 * Chunks of code that generate pieces of a final output page. May themselves generate template code that is interpreted
182 * Generic Scala classes (stateless)
183 * How to deal with state in snippets
184 * RequestVars
185 * SessionVars
186 * StatefulSnippets
187 * Using Helpers.bind. In particular, cover view vs. forms usage
188 * Using Helpers.chooseTemplate for nested templates
189 * Views
190 * Chunks of code intended to generate a complete page
191 * Can be shoehorned to process template code via processSurroundAndInclude
192 * Re-cover how views are located/dispatched
193 * Path-based (/my/view)
194 * addDispatchBefore/After
195 * What are the use cases for snippets vs. views?
196
197 5. Intro to the Mapper package
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
198 * This may be Mapper, or it may be Record depending on whether Record makes the 1.0 cut
199 * If it's Mapper, then blurb about all the Mapped* fields
200
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
201 6. AJAX and COMET
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
202 * What is COMET?
e218091 @tjweir more details
authored Sep 19, 2008
203 * Why is Comet Awesome? [example]
204 * Push to the browser
1930e92 @tjweir Started turning points into prose.
authored Sep 21, 2008
205 * [Example] following a LiveBlog of a keynote presentation, elememts are pushed to your browser
206 * Here's a super simple example - http://wiki.liftweb.net/index.php/CometActor
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
207 * Method for async updates pushed *from server to client*
208 * Connection is kept open
209 * Streaming
210 * Long polling
211 * Scalability issues
212 * Using COMET in Lift
213 * CometActor
214 * Mine Jorge's blog post: http://scala-blogs.org/2007/12/dynamic-web-applications-with-lift-and.html
215 * Go through Dynamic chat room example
216 * What is AJAX?
e218091 @tjweir more details
authored Sep 19, 2008
217 * why is AJAX awesome? [example]
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
218 * Method for async updates pulled from the client without a full page reload
219 * Relies heavily on javascript and XML
220 * Javascript client-side events (button push, timer, etc) trigger requests "behind the scenes"
221 * Web 2.0 built on this
222 * Using AJAX in Lift
223 * Allows you to bind Javascript events (AJAX) to form elements, links, etc
224 * 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 Sep 16, 2008
225
226 7. Deployment
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
227 - Ask the list what they are deploying with. Generally it shouldn't
228 be an issue where they deploy since Lift is essentially
229 self-contained. We can go into specifics for special cases, I
230 suppose
e218091 @tjweir more details
authored Sep 19, 2008
231 -!! jetty is required for continuations
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
232
233 * Basic deployment via Jetty
234 * Brief overview of Jetty
235 * Capabilities
236 * Configuration
237 * SSL
238 * How jetty is configured in maven for testing
239 * Changing the default port (8080)
240 * Tips and tricks
241 * Deployment in Tomcat
242 * Packaging options (pom dependency scope)
243 * Deployment in JBoss
244 * Deployment in GlassFish
e218091 @tjweir more details
authored Sep 19, 2008
245 * putting nginx out front???
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
246
247 ====== Advanced Topics ======
248
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
249 8. Detailed request/response handling info (should cover how Actors are used, too)
250 1. Request hits LiftFilter
251 2. LiftFilter executes each item in LiftRules.early. This would allow you to do advance processing of the HttpRequest
252 3. Rewrites occur per the LiftRules.rewriteTable (set up via LiftRules.addRewriteBefore/After)
253 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
254 5. Processing takes place via the LiftFilter's internal LiftServlet instance
255 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
256 7. LiftServlet checks LiftRules.statelessDispatchTable and returns if matched (what is this for?)
257 8. LiftServlet checks LiftRules.dispatchTable (set up via LiftRules.addDispatchBefore/After) and if dispatches match it dispatches there and returns the result
258 * detail dispatch handling
259 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
260 * detail COMET handling path
261 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
262 * detail AJAX handling
263 11. If nothing else has occurred, do normal template processing at this point
264 1. Lookup template based on path
265 2. Process template recursively (surround, include, etc)
266 * Additional topics
267 * S.addAround and LoanWrapper
268 * 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 Sep 16, 2008
269
270 9. URL Rewriting
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
271 * What is URL rewriting
272 * Using LiftRules.addRewriteBefore.After
273 * What constitutes a rewrite function?
274 * 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 Sep 16, 2008
275 * Example: user-friendly URLs
276
277 10. JSON handling
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
278 * What is JSON?
e218091 @tjweir more details
authored Sep 19, 2008
279 * Why is JSON awesome? [example]
63c477c Expanded more of the sections out. I'll expand the JPA section a bit …
Derek Chen-Becker authored Sep 18, 2008
280 * Technically, just a data format for Javascript (http://www.json.org/)
281 * Used as an RPC transfer format
282 * Well-suited to AJAX because it's essentially javascript
283 * How does Lift support JSON?
284 * JsonHandler allows simple wrapping and processing of JSON (AJAX) forms
285 * JsonCmd allows matching of submitted JSON
286 * Go through example JSON/AJAX submission form. Maybe it would be best to make
287 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 Sep 16, 2008
288
289 11. JsCommands
290 * Integrated javascript handling without hard-coding it in templates
291 * jQuery intro
292 * Utility library that makes IE6 less ugly ;)
293 * Powerful support for dynamic attributing of elements
294 * Based on CSS selectors
560764e @tjweir Small additions, fleshing out topics.
authored Sep 17, 2008
295 * Talk about Marius JS abstraction
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
296
297 12. AJAX and COMET in depth
560764e @tjweir Small additions, fleshing out topics.
authored Sep 17, 2008
298 - this is probably the place for the Spreadsheet example
299 - 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 Sep 16, 2008
300
301 13. JPA Integration
2c2ee91 @dchenbecker Expanded JPA Section
dchenbecker authored Sep 20, 2008
302 * What is JPA?
303 * Part of EJB3 spec
304 * Evolution of container-managed persistence
305 * Simplified model (a lot less XML)
306 * Heavy use of annotations, although you can define/override via XML descriptors if you want
307 * Available in container and outside of container (Hibernate EM, JPOX, etc)
308 * Why use JPA when we have mapper?
309 * Usable outside of Lift
310 * Easily accessible from Java and Scala
311 * Legacy models
312 * More flexibility w/large schemas
313 * Performance/Caching
314 * Intro to JPA
315 * JPA archetype in Maven
316 * Annotations on Scala classes
317 * Using orm.xml to override and define
318 * Getting a per-session entity manager
319 * RequestVar lifecycle
320 * In a container (JTA)
321 * User-managed transactions
322 * ScalaEntityManager and ScalaQuery
323 * Provide Scala-esque access to all EM methods (List vs java.util.List,etc)
324 * Implicit defs for conversion from java.util.{Set,List} to Scala counterparts
325 * Example app (Library catalog)
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
326
327 14. Using Scala Actors
560764e @tjweir Small additions, fleshing out topics.
authored Sep 17, 2008
328 - this is a broad topic, ask the committor list for opinions
329
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
330
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
331 ====== Advanced Examples and HOWTOs ======
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
332
333 15. OpenID Integration
334
335 16. Lucene/Compass Integration
336
337 17. Tagging support
48a3748 @tjweir Example talking
authored Sep 23, 2008
338 - I have lots of sample code for this
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
339
340 ====== Appendices ======
341
342 A. Lift message handling
560764e @tjweir Small additions, fleshing out topics.
authored Sep 17, 2008
343 - What happens now
344 - 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 Sep 16, 2008
345
346 B. Helpers methods, in particular Can/Empty/Full
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
347 * Can/Empty/Full/Failure
348 * Richer alternative to Scala's Option/None/Some
349 * openOr examples
350 * map examples
351 * pass - function with side effects
352 * run - function with default
353 * Using and/or chaining Failure objects
354 * Time/date formatting
355 * String formatting and utilities
356 * Encryption and hashing
357 * List helpers
358 * Binding
359 * URL modification
360 * IO Helpers
361 * tryo wrappers
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
362
363 C. I18N and L10N
364 * S.?(String)
365 * lift:loc tag
560764e @tjweir Small additions, fleshing out topics.
authored Sep 17, 2008
366 * Proper placement of language resources
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
367
368 D. Logging
369 * Configuring built-in log4j
370 * Using slf4j instead
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
371 * Query Logger
372 * Maybe some recommendations?
79972f3 Major expansion started on the ToC/Outline. Lots more work to do but I
Derek Chen-Becker authored Sep 16, 2008
373
374 E. Mailer
375 * Configuring the mailer lib
376 * Sending email
e218091 @tjweir more details
authored Sep 19, 2008
377 * System.properties
9681159 @tjweir Lets seed
authored Sep 16, 2008
378
48a3748 @tjweir Example talking
authored Sep 23, 2008
379 F. Dev tips
380 * .props for Dev and Prod
381 * JavaRebel
382
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
383 XX. Lift Quick Reference card (inside of back cover and facing page)
384 * All of the lift template tags
385 * Brief overview of the render flow (with cross-refs)
0f33d38 @tjweir more details, a couple of questions.
authored Sep 19, 2008
386
387
1930e92 @tjweir Started turning points into prose.
authored Sep 21, 2008
388
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
389 ====== Attempts at content ======
1930e92 @tjweir Started turning points into prose.
authored Sep 21, 2008
390
391 Chapter 1: Introduction
392
393 * Welcome to Lift!
24f1d21 @dchenbecker Fixed the merge and added some more content to the start.
dchenbecker authored Sep 23, 2008
394
395 Welcome to <title>. We've created this book to educate you about Lift,
396 which we think is a great framework for building compelling web
397 applications. Lift is designed to make powerful techniques easily
398 accessible, while keeping the overall framework simple and flexible.
399 Our goal for this book is that by the end, you'll be able to create
400 and extend any web application you can think of.
401
402 For those of you have experience with other web frameworks such as
403 Struts, Tapestry, Rails or PHP, you must be asking yourself "Why
404 another framework? Does Lift really solve problems any differently or
405 more effectively than the ones I've used before?" Based on our
406 experience (and of others in the Lift community), the answer is an
407 emphatic "Yes!" Lift has cherry-picked the best ideas from a number of
408 other frameworks, while creating some novel ideas of its own. It's
409 this combination of solid foundation and new techniques that makes
410 Lift so powerful.
411
412 A key aspect of Lift's development is that it's been able to avoid the
413 mistakes made in the past by other frameworks. A growing trend in web
414 (and other) frameworks is to reduce or eliminate boilerplate
415 configuration and code. Lift has sensible defaults for everything,
416 while making it easy to customize precisely what you need to; no more
417 and no less. Gone are the days of XML file after XML file providing
418 *basic configuration* for your application. Instead, a basic Lift app
419 only requires that you add the LiftFilter to your web.xml and add one
420 or more lines telling Lift what package your classes sit in []. Lift is
421 intended to work out of the box, and to make you as efficient and
422 productive as possible.
423
424 One of the key strengths of Lift (IOHO) is the clean separation of
425 content and logic, based on the bedrock concept of the
426 Model-View-Controller pattern []. One of the original Java web
427 application technologies (still used today) is JSP, or Java Server
428 Pages []. JSP allows you to mix HTML and Java code directly within the
429 page. While this may have seemed like a good idea at the start, it has
430 proven to be painful in practice. Putting code in your presentation
431 layer makes it more difficult to debug and understand what is going on
432 within a page, and makes it more difficult for the people writing the
433 HTML portion because the contents aren't valid HTML. While many modern
434 programming and HTML editors have been modified to accomodate this
435 mess, proper syntax highlighting and validation don't make up for the
436 fact that you still have to switch back and forth between one or more
437 files to follow the page flow. Lift takes the approach that there
438 should be no code in the presentation layer, but that the presentation
439 layer has to be flexible enough to accomodate any conceivable uses. To
440 that end, Lift uses a powerful templating system, a la Wicket[], to
441 bind user-generated data into the presentation layer. Lift's
442 templating is built on the XML processing capabilities of the Scala
443 Language (which we'll cover in more detail later), and allows things
444 such as nested templates, simple injection of user-generated content,
445 and advanced data binding capabilities. For those coming from JSP,
446 Lift's advanced template and XML processing allows you to essentially
447 write custom tag libraries at a fraction of the cost in time and effort.
1930e92 @tjweir Started turning points into prose.
authored Sep 21, 2008
448
449 * Expections for the reader
450 We are going to focus on Lift in the book, so we expect that you're comfortable with:
451 - Scala - http://www.scala-lang.org
452 - The HTTP Protocol - http://www.ietf.org/rfc/rfc2616.txt
453 - HTML - http://www.w3.org/MarkUp/Guide/
454 - JavaScript - http://en.wikipedia.org/wiki/JavaScript, and
455 - CSS - http://en.wikipedia.org/wiki/Cascading_Style_Sheets
456
457 * What is Lift?
458 Lift is a fast, flexible template-based web framework built on Scala. Some of it's notable features are a full-featured template system, a clean separation of Model, View and Controller, powerful AJAX and COMET support baked in and there is also a thriving community of developers.
459
460 * Brief overview of Scala
461 From Scala-lang.org: http://www.scala-lang.org/node/25
462 [quote]Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. It is also fully interoperable with Java.[/quote]
463 Scala code Compiles to JVM Bytecode so you get a new powerful language with access to all of Java's libraries.
178e15a @tjweir Add the mailing list file.
authored Sep 21, 2008
464 [todo] discuss some of the Scala features we use, pattern matching and traits, actors
1930e92 @tjweir Started turning points into prose.
authored Sep 21, 2008
465
Something went wrong with that request. Please try again.