O'Reilly logo

Cloning Internet Applications with Ruby by Chang Sau Sheong

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building the clone

Now that we are done with the discussions on Twitter, its features and also the design of the clone, let's roll up our sleeves and get into the act of building it.

Modeling the data

The data model for Tweetclone is quite simple; it consists of two major classes—User and Status, and two minor classes that describe the relationships—Relationship and Mention.

Modeling the data

The Relationship class defines the many-to-many relationship between users, that is it defines who follows whom. The Mention class defines the many-to-many relationship between users and statuses (aka tweets). Each status can mention one or more users and each user can be mentioned ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required