Lift Cookbook. Recipes from the Community for Building Web Applications with Scala - Helion
ISBN: 978-14-493-6506-6
stron: 256, Format: ebook
Data wydania: 2013-06-24
Księgarnia: Helion
Cena książki: 29,90 zł (poprzednio: 99,67 zł)
Oszczędzasz: 70% (-69,77 zł)
If you need help building web applications with the Lift framework, this cookbook provides scores of concise, ready-to-use code solutions. You’ll find recipes for everything from setting up a coding environment to creating REST web services and deploying your application to production.
Built on top of the Scala JVM programming language, Lift takes a different—yet ultimately easier—approach to development than MVC frameworks such as Rails. Each recipe in this book includes a discussion of how and why each solution works, not only to help you complete the task at hand, but also to illustrate how Lift works.
- Set up an environment and run your first Lift application
- Generate HTML, using Lift’s View First approach
- Submit forms and work with form elements
- Build REST web services with the framework’s RestHelper trait
- Take advantage of Lift’s support for Ajax and Comet
- Get examples for modifying Lift’s request pipeline
- Convert Scala classes into tables, rows, and columns in a relational database
- Send email, call URLs, and schedule tasks from your application
- Package and deploy your application to various hosted services
Osoby które kupowały "Lift Cookbook. Recipes from the Community for Building Web Applications with Scala", wybierały także:
- Cisco CCNA 200-301. Kurs video. Administrowanie bezpieczeństwem sieci. Część 3 665,00 zł, (39,90 zł -94%)
- Cisco CCNA 200-301. Kurs video. Administrowanie urządzeniami Cisco. Część 2 665,00 zł, (39,90 zł -94%)
- Cisco CCNA 200-301. Kurs video. Podstawy sieci komputerowych i konfiguracji. Część 1 665,00 zł, (39,90 zł -94%)
- Impact of P2P and Free Distribution on Book Sales 427,14 zł, (29,90 zł -93%)
- Cisco CCNP Enterprise 350-401 ENCOR. Kurs video. Programowanie i automatyzacja sieci 443,33 zł, (39,90 zł -91%)
Spis treści
Lift Cookbook. Recipes from the Community for Building Web Applications with Scala eBook -- spis treści
- Lift Cookbook
- Preface
- Contributors
- Source
- Updates
- Software Versions
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgments
- 1. Installing and Running Lift
- Downloading and Running Lift
- Problem
- Solution
- For Mac and Linux
- For Windows
- Expected result
- Discussion
- Simple Build Tool
- Running your application
- Source code
- See Also
- Creating a Lift Project from Scratch Using SBT
- Problem
- Solution
- Discussion
- See Also
- Developing Using a Text Editor
- Problem
- Solution
- Discussion
- See Also
- Incorporating JRebel
- Problem
- Solutions
- Discussion
- Purchased licenses
- See Also
- Developing Using Eclipse
- Problem
- Solution
- Discussion
- See Also
- Developing Using IntelliJ IDEA
- Problem
- Solution
- Discussion
- See Also
- Viewing the lift_proto H2 Database
- Problem
- Solution
- Discussion
- See Also
- Using the Latest Lift Build
- Problem
- Solution
- Discussion
- See Also
- Using a New Version of Scala
- Problem
- Solution
- Discussion
- See Also
- Downloading and Running Lift
- 2. HTML
- Testing and Debugging CSS Selectors
- Problem
- Solution
- Discussion
- See Also
- Sequencing CSS Selector Operations
- Problem
- Solution
- Discussion
- See Also
- Setting Meta Tag Contents
- Problem
- Solution
- Discussion
- Appending to a class attribute
- See Also
- Setting the Page Title
- Problem
- Solution
- Discussion
- See Also
- HTML Conditional Comments
- Problem
- Solution
- Discussion
- See Also
- Returning Snippet Markup Unchanged
- Problem
- Solution
- Discussion
- Snippet Not Found When Using HTML5
- Problem
- Solution
- Discussion
- See Also
- Avoiding CSS and JavaScript Caching
- Problem
- Solution
- Discussion
- See Also
- Adding to the Head of a Page
- Problem
- Solution
- Discussion
- See Also
- Custom 404 Page
- Problem
- Solution
- Discussion
- See Also
- Other Custom Status Pages
- Problem
- Solution
- Discussion
- See Also
- Links in Notices
- Problem
- Solution
- Discussion
- See Also
- Link to Download Data
- Problem
- Solution
- Discussion
- See Also
- Test on a Req
- Problem
- Solution
- Discussion
- Data table
- See Also
- Rendering Textile Markup
- Problem
- Solution
- Discussion
- See Also
- Testing and Debugging CSS Selectors
- 3. Forms Processing in Lift
- Plain Old Form Processing
- Problem
- Solution
- Discussion
- See Also
- Ajax Form Processing
- Problem
- Solution
- Discussion
- Submit styling
- See Also
- Ajax JSON Form Processing
- Problem
- Solution
- Discussion
- Additional commands
- See Also
- Use a Date Picker for Input
- Problem
- Solution
- Discussion
- HTML5 date pickers
- See Also
- Making Suggestions with Autocomplete
- Problem
- Solution
- Discussion
- Submitting new values
- Alternative autocomplete JavaScript
- See Also
- Offering Choices with Radio Buttons
- Problem
- Solution
- Discussion
- Customising the HTML
- String values
- Conditionally Disable a Checkbox
- Problem
- Solution
- Discussion
- See Also
- Use a Select Box with Multiple Options
- Problem
- Solution
- Discussion
- Selecting no options
- Type-safe options
- Enumerations
- See Also
- File Upload
- Problem
- Solution
- Discussion
- See Also
- Plain Old Form Processing
- 4. REST
- DRY URLs
- Problem
- Solution
- Discussion
- See Also
- Missing File Suffix
- Problem
- Solution
- Discussion
- See Also
- Missing .com from Email Addresses
- Solution
- Discussion
- See Also
- Failing to Match on a File Suffix
- Problem
- Solution
- Discussion
- See Also
- Accept Binary Data in a REST Service
- Problem
- Solution
- Discussion
- See Also
- Returning JSON
- Problem
- Solution
- Discussion
- See Also
- Google Sitemap
- Problem
- Solution
- Discussion
- See Also
- Calling REST Service from a Native iOS Application
- Problem
- Solution
- Discussion
- See Also
- DRY URLs
- 5. JavaScript, Ajax, and Comet
- Trigger Server-Side Code from a Button
- Problem
- Solution
- Discussion
- onEvent: receiving the value of a DOM element
- ajaxCall: receiving an arbitrary client-side string
- jsonCall: receiving a JSON value
- See Also
- Call Server When Select Option Changes
- Problem
- Solution
- Discussion
- Collecting the value on form submission
- See Also
- Creating Client-Side Actions in Your Scala Code
- Problem
- Solution
- Discussion
- See Also
- Focus on a Field on Page Load
- Problem
- Solution
- Discussion
- See Also
- Add a CSS Class to an Ajax Form
- Problem
- Solution
- Discussion
- See Also
- Running a Template via JavaScript
- Problem
- Solution
- Discussion
- See Also
- Move JavaScript to End of Page
- Problem
- Solution
- Discussion
- See Also
- Run JavaScript on Comet Session Loss
- Problem
- Solution
- Discussion
- See Also
- Ajax File Upload
- Problem
- Solution
- Discussion
- See Also
- Format a Wired Cell
- Problem
- Solution
- Discussion
- See Also
- Trigger Server-Side Code from a Button
- 6. Request Pipeline
- Debugging a Request
- Problem
- Solution
- Discussion
- See Also
- Running Code When Sessions Are Created (or Destroyed)
- Problem
- Solution
- Discussion
- See Also
- Run Code When Lift Shuts Down
- Problem
- Solution
- Discussion
- See Also
- Running Stateless
- Problem
- Solution
- Discussion
- See Also
- Catch Any Exception
- Problem
- Solution
- Discussion
- See Also
- Streaming Content
- Problem
- Solution
- Discussion
- InMemoryResponse
- StreamingResponse
- See Also
- Serving a File with Access Control
- Problem
- Solution
- Discussion
- See Also
- Access Restriction by HTTP Header
- Problem
- Solution
- Discussion
- See Also
- Accessing HttpServletRequest
- Problem
- Solution
- Discussion
- Force HTTPS Requests
- Problem
- Solution
- Discussion
- Amazon Load Balancer
- Debugging a Request
- 7. Relational Database Persistence with Record and Squeryl
- Configuring Squeryl and Record
- Problem
- Solution
- Discussion
- See Also
- Using a JNDI DataSource
- Problem
- Solution
- Discussion
- See Also
- One-to-Many Relationship
- Problem
- Solution
- Discussion
- See Also
- Many-to-Many Relationship
- Problem
- Solution
- Discussion
- See Also
- Adding Validation to a Field
- Problem
- Solution
- Discussion
- See Also
- Custom Validation Logic
- Problem
- Solution
- Discussion
- See Also
- Modify a Field Value Before It Is Set
- Problem
- Solution
- Discussion
- See Also
- Testing with Specs
- Problem
- Solution
- Discussion
- See Also
- Store a Random Value in a Column
- Problem
- Solution
- Discussion
- See Also
- Automatic Created and Updated Timestamps
- Problem
- Solution
- Discussion
- See Also
- Logging SQL
- Problem
- Solution
- Discussion
- See Also
- Model a Column with MySQL MEDIUMTEXT
- Problem
- Solution
- Discussion
- See Also
- MySQL Character Set Encoding
- Problem
- Solution
- Discussion
- See Also
- Configuring Squeryl and Record
- 8. MongoDB Persistence with Record
- Connecting to a MongoDB Database
- Problem
- Solution
- Discussion
- See Also
- Storing a Hash Map in a MongoDB Record
- Problem
- Solution
- Discussion
- What a MongoMapField can contain
- See Also
- Storing an Enumeration in MongoDB
- Problem
- Solution
- Discussion
- See Also
- Embedding a Document Inside a MongoDB Record
- Problem
- Solution
- Discussion
- See Also
- Linking Between MongoDB Records
- Problem
- Solution
- Discussion
- Querying by reference
- Updating and deleting
- Types of link
- See Also
- Using Rogue
- Problem
- Solution
- Discussion
- See Also
- Storing Geospatial Values
- Problem
- Solution
- Discussion
- Querying
- See Also
- Running Queries from the Scala Console
- Problem
- Solution
- Discussion
- See Also
- Unit Testing Record with MongoDB
- Problem
- Solution
- Discussion
- Database cleanup
- Parallel tests
- Running tests in IDEs
- See Also
- Connecting to a MongoDB Database
- 9. Around Lift
- Sending Plain-Text Email
- Problem
- Solution
- Discussion
- See Also
- Logging Email Rather than Sending
- Problem
- Solution
- Discussion
- See Also
- SMTP Authentication
- Problem
- Solution
- Discussion
- See Also
- Sending Authenticated Email
- Problem
- Solution
- Discussion
- See Also
- Sending Email with Attachments
- Problem
- Solution
- Discussion
- See Also
- Run a Task Later
- Problem
- Solution
- Discussion
- See Also
- Run Tasks Periodically
- Problem
- Solution
- Discussion
- See Also
- Fetching URLs
- Problem
- Solution
- Discussion
- See Also
- Sending Plain-Text Email
- 10. Production Deployment
- Deploying to CloudBees
- Problem
- Solution
- Discussion
- RDBMS configuration
- Host IP and port number
- Java version
- Container version
- ClickStarts
- See Also
- Deploying to Amazon Elastic Beanstalk
- Problem
- Solution
- Discussion
- Multiple instances
- Working with a database
- See Also
- Deploying to Heroku
- Problem
- Solution
- Discussion
- Database access in Heroku
- See Also
- Distributing Comet Across Multiple Servers
- Problem
- Solution
- Discussion
- See Also
- Deploying to CloudBees
- 11. Contributing, Bug Reports, and Getting Help
- Youd Like Some Help
- Problem
- Solution
- Discussion
- See Also
- How to Report Bugs
- Problem
- Solution
- Discussion
- See Also
- Contributing Small Code Changes and ScalaDoc
- Problem
- Solution
- Discussion
- See Also
- Contributing Documentation
- Problem
- Solution
- Discussion
- See Also
- How to Add a New Recipe to This Cookbook
- Problem
- Solution
- Discussion
- Licensing
- See Also
- Sharing Code in Modules
- Problem
- Solution
- Discussion
- Making your module available
- Debugging your module
- See Also
- Youd Like Some Help
- Index
- About the Author
- Colophon
- Copyright