Ruby in Practice

Book description

Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale environments. A cookbook-style reference, it gives you concrete examples of systems integration, messaging, web development, and databases, all in a clear problem/ solution format.

Part 1 of the book concentrates on the Ruby way of developing software, especially how to use Ruby as a tool for integration. Part 2 talks about REST, Web services, asynchronous messaging, and deployment. In the last part, you'll discover how to manage all forms of data—from manipulating structured documents to identity management. Along the way you'll learn how to use Ruby to build new applications, solve more problems with less effort, integrate with your existing applications, and give new life to your legacy systems.



About the Technology


About the Book


What's Inside
  • Using Rails to build REST services
  • Automate communication between components and systems
  • Securely store and authenticate passwords
  • Index and query any set of documents
  • Generate scheduled reports in Ruport


About the Reader


About the Authors

A consultant, speaker, and author, Jeremy McAnally is a Ruby developer at entp. A co-founder and CTO of Intalio, Assaf Arkin is an open source advocate passionate about building business applications that just work.



Quotes
A treasure trove of ideas.
- Christopher Haupt, LearningRails podcast co-host

Extremely practical working examples.
- Doug Warren, Java Web Services

Stunning examples of how Ruby can be used to save the world from chaos and damnation.
- Mark Ryall, ThoughtWorks

A must-read for every Ruby programmer.
- Patrick Dennis, Management Dynamics Inc.

Excellent real world examples - not just for practice!
- Sheldon Kotyk, TruthMedia Internet Group

Table of contents

  1. Copyright
  2. Brief Table of Contents
  3. Table of Contents
  4. List of Figures
  5. List of Tables
  6. List of Listings
  7. Preface
  8. Acknowledgments
  9. About this Book
  10. Part 1. Ruby techniques
    1. Chapter 1. Ruby under the microscope
      1. 1.1. Why Ruby now?
      2. 1.2. Ruby by example
      3. 1.3. Facets of Ruby
      4. 1.4. Metaprogramming
      5. 1.5. Summary
    2. Chapter 2. Testing Ruby
      1. 2.1. Testing principles
      2. 2.2. Test-driven development with Ruby
      3. 2.3. Behavior-driven development with RSpec
      4. 2.4. A testing environment
      5. 2.5. Testing your tests
      6. 2.6. Summary
    3. Chapter 3. Scripting with Ruby
      1. 3.1. Scripting with Ruby
      2. 3.2. Automating with OLE and OSA
      3. 3.3. Using Rake
      4. 3.4. Summary
  11. Part 2. Integration and communication
    1. Chapter 4. Ruby on Rails techniques
      1. 4.1. Extending Rails
      2. 4.2. Rails performance
      3. 4.3. Summary
    2. Chapter 5. Web services
      1. 5.1. Using HTTP
      2. 5.2. REST with Rails
      3. 5.3. SOAP services
      4. 5.4. Summary
    3. Chapter 6. Automating communication
      1. 6.1. Automating email
      2. 6.2. Automating instant communication
      3. 6.3. Summary
    4. Chapter 7. Asynchronous messaging
      1. 7.1. Open source messaging servers
      2. 7.2. WebSphere MQ
      3. 7.3. Summary
    5. Chapter 8. Deployment
      1. 8.1. Creating deployable packages with RubyGems
      2. 8.2. Deploying web applications
      3. 8.3. Monitoring with God.rb
      4. 8.4. Summary
  12. Part 3. Data and document techniques
    1. Chapter 9. Database facilities and techniques
      1. 9.1. Using plain-text files for data persistence
      2. 9.2. Using the (g)dbm API
      3. 9.3. The MySQL driver
      4. 9.4. Using DBI
      5. 9.5. Summary
    2. Chapter 10. Structured documents
      1. 10.1. XML in practice
      2. 10.2. Parsing HTML and XHTML with Hpricot
      3. 10.3. Writing configuration data: revisited
      4. 10.4. Reading RSS feeds
      5. 10.5. Creating your own feed
      6. 10.6. Using YAML for data storage
      7. 10.7. Summary
    3. Chapter 11. Identity and authentication
      1. 11.1. Securely storing a password
      2. 11.2. Authenticating against Active Directory
      3. 11.3. Adding authentication to your Rails application
      4. 11.4. Semi-private, personalized feeds
      5. 11.5. HTTP Basic Authentication
      6. 11.6. Integrating OpenID into your application
      7. 11.7. Summary
    4. Chapter 12. Searching and indexing
      1. 12.1. The principles of searching
      2. 12.2. Standalone and high-performance searching
      3. 12.3. Integrating search with other technologies
      4. 12.4. Summary
    5. Chapter 13. Document processing and reporting
      1. 13.1. Processing CSV data
      2. 13.2. Generating and emailing daily reports
      3. 13.3. Comparing text reports to well-formed data
      4. 13.4. Creating customized documents for printing
      5. 13.5. Reporting against large datasets
      6. 13.6. Summary
  13. Appendix A. Installing Ruby
    1. A.1. Installing on Windows
    2. A.2. Installing on Mac OS X
    3. A.3. Installing on Linux
    4. A.4. More tips
  14. Appendix B. JRuby
    1. B.1. Installing and using JRuby
    2. B.2. JRuby and Ruby side by side
    3. B.3. Mixing Ruby and Java
    4. B.4. Scripting with Ruby
    5. B.5. Deploying web applications
  15. Appendix C. Deploying web apps
    1. C.1. An overview of deployment options
    2. C.2. Reverse proxying
    3. C.3. Setting up Thin
    4. C.4. Setting up Apache load balancing
    5. C.5. Summary
  16. Index
    1. SYMBOL
    2. A
    3. B
    4. C
    5. D
    6. E
    7. F
    8. G
    9. H
    10. I
    11. J
    12. K
    13. L
    14. M
    15. N
    16. O
    17. P
    18. Q
    19. R
    20. S
    21. T
    22. U
    23. V
    24. W
    25. X
    26. Y

Product information

  • Title: Ruby in Practice
  • Author(s): Jeremy McAnally, Assaf Arkin
  • Release date: February 2009
  • Publisher(s): Manning Publications
  • ISBN: 9781933988474