Cloning Internet Applications with Ruby


Cloning Internet Applications with Ruby
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$20.40
save 15%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
$60.39
save 6%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • 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.

Book Details

Language : English
Paperback : 336 pages [ 235mm x 191mm ]
Release Date : August 2010
ISBN : 1849511063
ISBN 13 : 9781849511063
Author(s) : Chang Sau Sheong
Topics and Technologies : All Books, Web Development, Open Source


Table of Contents

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

Chang Sau Sheong

Chang Sau Sheong has more than 12 years experience in software application development and has spent much of his career in web and Internet-based applications. He has a wide range of experience in banking payment-related as well as Internet-based e-commerce software. Currently he is the Director of Software Development of a 50+ strong software development team in Welcome Real-time, a multi-national payment/loyalty software company based in France and Singapore.

Sau Sheong hails from tropical Malaysia but has spent most of his adult and working life in sunny Singapore, where he shares his spare time between enthusiastically writing software and equally enthusiastically playing Nintendo Wii with his wife and son.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 2 submitted: last submission 02 Aug 2013

Errata type: Typo | Page numbers: 18

In the sample code for 'class User'... property :description, TExt TExt should be Text

 

Errata type: Typo | Page numbers: 19

class Account
  include DataMapper::Resource
  property :id, Serial
  belongs_to, :user
end
"belongs_to, :user" should not have a comma and should read "belongs_to :user"

 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Cloning Internet Applications with Ruby +    WS-BPEL 2.0 for SOA Composite Applications with IBM WebSphere 7 =
50% Off
the second eBook
Price for both: $47.70

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Discover in depth the major features of TinyURL, Twitter, Flickr, and Facebook and what makes them work
  • Discover how each of these popular Internet services can be modeled with DataMapper
  • Create clones of these Internet services using Rack and Sinatra
  • Use third-party authentication providers with OpenID
  • Deploy the cloned Internet services to the cloud using Heroku
  • Use Amazon S3 to store data for your clones

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

Approach

This is a hands-on book with plenty of well-explained code. Each chapter has a standalone project in which a complete web application with specific features of a social networking site is emphasized. The final chapter of the book is a project that has a complete and fully developed social networking site. Each chapter begins with a brief description of the features of the Internet service and the market it is within. After extracting the main features of the service, the chapter goes into explaining how a clone of the service can be designed, followed by a short description of the technologies and platforms being used. The bulk of the chapter goes into describing how the clone is built, with step-by-step explanations and code examples. Finally, the chapter shows how the finished clone can be deployed on the Internet.

Who this book is for

This book is written for web application programmers with an intermediate knowledge of Ruby. You should also know how web applications work and you have used at least some of the cloned Internet services before. If you are a trying to find out exactly how can you make your very own customized applications such as TinyURL, Twitter, Flickr, or Facebook, this book is for you. Programmers who want to include features of these Internet services into their own web applications will also find this book interesting.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software