0%

Book Description

Make clones of some of the best applications on the Web using the dynamic and object-oriented features of Ruby

  • Build your own custom social networking, URL shortening, and photo sharing websites using Ruby

  • Deploy and launch your custom high-end web applications

  • Learn what makes popular social networking sites such as Twitter and Facebook tick

  • Understand features of some of the most famous photo sharing and social networking websites

  • A fast-paced tutorial to get you up and running with cloning some of the most impressive applications available on the Web.

  • In Detail

    Most users on the Internet have a few favorite Internet web applications that they use often and cannot do without. These popular applications often provide essential services that we need even while we don’t fully understand its features or how they work. Ruby empowers you to develop your own clones of such applications without much ordeal. Learning how these sites work and describing how they can be implemented enables you to move to the next step of customizing them and enabling your own version of these services.

    This book shows the reader how to clone some of the Internet's most popular applications in Ruby by first identifying their main features, and then showing example Ruby code to replicate this functionality.

    While we understand that it connects us to our friends and people we want to meet up with, what is the common feature of a social network that makes it a social network? And how do these features work? This book is the answer to all these questions. It will provide a step-by-step explanation on how the application is designed and coded, and then how it is deployed to the Heroku cloud platform. This book’s main purpose is to break up popular Internet services such as TinyURL, Twitter, Flickr, and Facebook to understand what makes it tick. Then using Ruby, the book describes how a minimal set of features for these sites can be modeled, built, and deployed on the Internet.

    Break up and rewrite popular social networking and other Internet applications using Ruby

    Table of Contents

    1. Cloning Internet Applications with Ruby
      1. Cloning Internet Applications with Ruby
      2. Credits
      3. About the Author
      4. Acknowledgement
      5. About the Reviewers
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      7. 1. Cloning Internet Applications
        1. Who would find this book useful
        2. Popular Internet applications
        3. Technologies used
          1. Sinatra
            1. Installing
            2. Routes
            3. Splitting a route into multiple files
            4. Redirection
            5. Filters
            6. Static pages
            7. Views
            8. Layouts
            9. Helpers
            10. Error handling
          2. DataMapper
            1. Installing
            2. Connecting to the database
            3. Creating models
            4. Defining associations between models
              1. One-to-one
              2. One-to-many
              3. Many-to-many
            5. Creating the database tables
            6. Finding records
          3. Haml
            1. Installing
            2. Using Haml
            3. Haml and Ruby
        4. How this book works
        5. Caveat
        6. Summary
      8. 2. URL Shorteners — Cloning TinyURL
        1. All about URL shorteners
        2. Main features
        3. Designing the clone
          1. Creating a short URL for each long URL
          2. Automatically redirecting from a short URL to a long URL
          3. Providing a customized short URL
          4. Filtering undesirable words out
            1. Previewing the long URL
            2. Providing statistics
        4. Technologies and platforms used
          1. Sinatra
          2. Haml
          3. DataMapper
          4. Blueprint CSS
          5. Mashups
            1. Google Chart API
            2. HostIP
          6. Heroku
        5. Building the clone
          1. Data model
            1. Url
            2. Link
            3. Visit
          2. Application flow
        6. Deploying the clone
        7. Summary
      9. 3. Microblogs — Cloning Twitter
        1. All about microblogs
          1. Twitter
            1. Why Twitter?
              1. Simple
              2. A means to have public conversation
              3. Fan versus friend
              4. Understanding user behavior
              5. Easy to share through text messaging
              6. Easy to access through multiple devices and applications
        2. Main features
        3. Designing the clone
          1. Posting statuses
          2. Following users
          3. Sending publicly directed messages
          4. Sending privately directed messages
          5. Re-tweeting
          6. Public timeline
          7. API
          8. Authentication, access control, and user management
            1. Third party authentication and access control
            2. Authentication and user management
          9. Scalability and stability
        4. Technologies and platforms used
          1. JSON
          2. Mashups
            1. RPX
            2. Google ClientLogin
            3. Gravatar
            4. TinyURL
          3. Heroku
        5. Building the clone
          1. Modeling the data
            1. User
            2. Status
          2. Building the application flow
            1. Authenticating and managing users
            2. Displaying and updating statuses
            3. Sending and displaying direct messages
            4. Showing and forming relationships
          3. Implementing the API
        6. Deploying the clone
          1. Deploying locally
          2. Deploying to the cloud
        7. Summary
      10. 4. Photo Sharing — Cloning Flickr
        1. All about photo-sharing services
          1. Flickr
        2. Main features
        3. Designing the clone
          1. Authentication, access control, and user management
          2. Albums and photos
          3. Uploading and storing photos
            1. Filesystem
              1. Filesystem
                1. Filesystem
                2. Database
          4. Comments
          5. Annotations
          6. Editing photos
          7. Friendly URLs
          8. Sharing photos
        4. Technologies and platforms used
          1. Mashups
            1. RPX
            2. Gravatar
          2. Pixlr
          3. Amazon Web Services Simple Storage Service (S3)
          4. RightAWS
        5. Building the clone
          1. Configuration
          2. Modeling the data
            1. User
            2. Album
            3. Photo
            4. Annotation
            5. Comment
          3. Building the application flow
            1. Authenticating and managing users
            2. Landing page
            3. Managing albums
            4. Uploading photos
            5. Displaying photos
            6. Annotating photos
            7. Commenting on photos
            8. Editing photos
            9. Sharing photos
        6. Deploying the clone
          1. Deploying on a server
        7. Summary
      11. 5. Social Networking Services — Cloning Facebook 1
        1. All about social networking services
          1. Facebook
        2. Main features
          1. User
          2. Community
          3. Content sharing
        3. Designing the clone
          1. Authentication, access control, and user management
          2. Status updates
          3. User activity feeds and news feeds
          4. Friends list and inviting users to join
          5. Posting to the wall
          6. Sending messages
          7. Attending events
          8. Forming groups
          9. Commenting on and liking content
          10. Sharing photos
          11. Blogging with pages
        4. Technologies and platforms used
          1. Mashups
            1. Facebook Connect
        5. Building the clone
          1. Configuring the clone
          2. Modeling the data
            1. User
            2. Request
              1. Message
              2. Album
              3. Photo
              4. Status
              5. Group
              6. Event
              7. Page
              8. Wall
              9. Activity
              10. Comment
              11. Like
        6. Summary
      12. 6. Social Networking Services — Cloning Facebook 2
        1. Building the application flow
          1. Structure of the application and flow
          2. Authenticating and managing users
          3. Landing page, news feed, and statuses
          4. Inviting friends and friends list
            1. Registering a Facebook application
            2. Creating a cross-domain communication channel file
            3. Writing the code
          5. User page and activity feeds
          6. Posting to a wall
          7. Sharing photos
            1. Managing albums
            2. Uploading photos
            3. Displaying photos
            4. Annotating photos
            5. Viewing friends' photos
          8. Sending messages
          9. Creating events
          10. Forming groups
          11. Sharing content through pages
          12. Commenting and liking
        2. Deploying the clone
          1. Deploying locally
          2. Deploying to the cloud
        3. Summary
    3.139.70.101