
At a Glance
448 Pages
23.5 x 19.05 x 2.31
Paperback
RRP $64.99
$63.50
or 4 interest-free payments of $15.88 with
orAims to ship in 7 to 10 business days
When will this arrive by?
Enter delivery postcode to estimate
the complete development cycle of a social networking
community web site. The project develops first as a
simple content management system, after which author Alan
Bradburne progressively adds features in order to build a
full Web 2.0&emdash; enabled community-based social
networking site using Ruby on Rails. You will learn how
to make the best use of the Ruby on Rails framework
within a large project and how to implement and adapt
features specific to a community. The book offers
practical advice and tips for developing and testing,
along with guidance on how to take your site live, as
well as optimize and maintain it. The book also explores
how to integrate with other community sites such as
Flickr and Google Maps, and how to make good use of Rails
Ajax features. You will also learn how to optimize and
adapt your site to work well on mobile browsers.
About the Author | p. xvii |
About the Technical Reviewer | p. xix |
Acknowledgments | p. xxi |
Introduction | p. xxiii |
Ruby, Ruby on Rails, and the RailsCoders Project | p. 1 |
The RailsCoders Project | p. 1 |
Ruby and Ruby on Rails | p. 2 |
A Brief History of Ruby | p. 3 |
What Is Ruby on Rails? | p. 4 |
Software Required to Build RailsCoders | p. 7 |
Upgrading Rails | p. 8 |
Installing Ruby, Rails, and MySQL | p. 8 |
Installing on Windows | p. 9 |
Mac OS X | p. 11 |
Linux | p. 12 |
Creating the Skeleton of the Rails Application | p. 14 |
Watching the Rails Logfiles | p. 16 |
Setting up the Database | p. 17 |
Creating the Database | p. 18 |
Configuring Rails to Use the Database | p. 18 |
Testing the Database | p. 19 |
Summary | p. 20 |
Developing a Content Management System | p. 21 |
Specifying the Feature Requirements | p. 21 |
Rails, Routing, and REST | p. 21 |
Traditional Rails Routes | p. 22 |
RESTful Rails Routes | p. 22 |
Creating a Site Layout | p. 23 |
Designing the Pages and Page Editor | p. 26 |
The Page Model | p. 26 |
The Page Controller | p. 27 |
Creating the Page Model | p. 28 |
Migrations | p. 28 |
Creating the Model | p. 29 |
Creating the Controller | p. 33 |
Setting Up a Default Page | p. 41 |
Adding a Link from the Sidebar Menu | p. 41 |
Testing | p. 42 |
Creating the Testing Database | p. 42 |
Developing Unit Tests for the Page Model | p. 42 |
Extending the Content Management System | p. 44 |
Summary | p. 45 |
Adding Users and Groups | p. 47 |
Specifying the Feature Requirements | p. 47 |
Defining the User Model | p. 47 |
The Role Model and Join Table | p. 48 |
The Controllers | p. 49 |
Sessions and Cookies | p. 50 |
Creating the User Model | p. 51 |
The Session-Handling Library | p. 53 |
Creating the Controllers | p. 55 |
The Users Controller | p. 55 |
The Account Controller | p. 57 |
Creating the User Account Views | p. 58 |
The New User View | p. 58 |
The Login View | p. 61 |
The Show User View | p. 62 |
Adding Administration Views | p. 63 |
Listing All Users in the Index View | p. 64 |
Editing a User with edit.rhtml | p. 66 |
Testing | p. 67 |
Unit Testing | p. 67 |
Functional Testing | p. 68 |
Adding Roles | p. 72 |
Creating the Role Model and Join Table | p. 72 |
Checking a User's Roles | p. 74 |
Administering Roles | p. 76 |
Testing the Roles Functionality | p. 79 |
Extending the User Management System | p. 81 |
Summary | p. 81 |
Building a News Blog with RSS Feeds and an API | p. 83 |
Specifying the Feature Requirements | p. 83 |
Textile Markup | p. 83 |
The Article Model | p. 84 |
Defining the Category Model | p. 85 |
The Editor Role | p. 85 |
The Articles Controller | p. 86 |
The Categories Controller | p. 86 |
Installing the RedCloth Gem | p. 86 |
Creating the Article and Category Models | p. 87 |
Writing the Database Migrations | p. 87 |
Defining the Relationships Among Models | p. 88 |
Defining the Validations | p. 89 |
Automatically Nullifying category_id on Deletion | p. 89 |
Automatically Updating the published_at Field | p. 89 |
Adding the Editor Role | p. 90 |
Creating the Articles Controller and Views | p. 91 |
Mapping the REST Resources | p. 91 |
The Articles Controller | p. 92 |
The Article Views | p. 98 |
Using the Articles Feature | p. 101 |
Testing the XML API | p. 101 |
Adding HTTP Authentication for the API | p. 103 |
Testing the API Authentication | p. 104 |
Creating the Categories' Controller and Views | p. 105 |
The Categories Controller | p. 105 |
The Category Views | p. 108 |
Adding a Link from the Sidebar Menu | p. 109 |
Manually Testing the News Blog System | p. 110 |
Testing the News Blog | p. 110 |
Functional Tests | p. 112 |
Integration Tests | p. 114 |
Further Development of the News System | p. 115 |
Summary | p. 116 |
Building a Discussion Forum | p. 117 |
Specifying the Discussion Forum Requirements | p. 117 |
Defining the Forum Model | p. 118 |
Defining the Topic Model | p. 118 |
Defining the Post Model | p. 119 |
The Moderator Role | p. 119 |
The Forum, Topic, and Post Controllers | p. 119 |
Building the Forum | p. 120 |
Building the Forum, Topic, and Post Models | p. 120 |
Checking a User's Roles for Moderator Rights | p. 126 |
Adding the Nested Resource Route Mappings | p. 126 |
Modifying the Layout Template and Style Sheet | p. 126 |
The Forums Controllet and Views | p. 127 |
The Topics Controller and Views | p. 131 |
The Posts Controller and Views | p. 136 |
Adding a Link to the Sidebar Menu | p. 141 |
Testing the Topics and Posts | p. 141 |
Restricting Actions to Moderators | p. 142 |
Testing the Forum | p. 143 |
Creating Test Fixtures | p. 143 |
Creating the Functional Tests | p. 144 |
Further Development of the Discussion Forum | p. 150 |
Summary | p. 151 |
Building a Blogging Engine with Web Services Support | p. 153 |
Specifying the Blog Engine Requirements | p. 153 |
The Entry Model | p. 153 |
The Comment Model | p. 154 |
The User Model | p. 154 |
The Entries Controller | p. 155 |
The Comments Controller | p. 155 |
The Blogs Controller | p. 155 |
Blogging APIs | p. 155 |
Building the Blogging System | p. 156 |
Generating the Blogging Scaffolding Code | p. 156 |
Writing the Migrations | p. 158 |
The Models' Relationships and Validations | p. 160 |
Creating the Resource Mapping | p. 161 |
The Blog Name Helper Method | p. 161 |
Adding the Blog Title to the Edit User Profile Page | p. 162 |
The Controllers and Views | p. 163 |
Testing the Entries Controller | p. 171 |
Creating and Testing the Comments Controller | p. 173 |
Adding the Latest Blog Entries to User Profiles | p. 177 |
The Blogs Controller | p. 178 |
Creating an XML-RPC Blogging Interface | p. 180 |
Action Web Service | p. 181 |
Generating the Web Service Code | p. 181 |
Defining the API Method Calls | p. 182 |
Writing the Blogging API Method Code | p. 184 |
Testing the Web Services | p. 188 |
Testing Using a Desktop Blogging Client | p. 186 |
Automated Testing of the Blogging API | p. 188 |
Further Development of the Blogging System | p. 189 |
Summary | p. 189 |
Building a Photo Gallery | p. 191 |
Working with Uploaded Files | p. 191 |
The attachment_fu Plug-in | p. 192 |
The Photo Gallery Requirements | p. 194 |
Defining the Photo Model | p. 195 |
The Photos Controllers | p. 195 |
Installing ImageMagick, RMagick, and attachment_fu | p. 195 |
Installing on Windows | p. 196 |
Installing on OS X | p. 196 |
Installing on Linux | p. 196 |
Installing the attachment_fu Plug-in | p. 196 |
Building the Photo Gallery | p. 197 |
Generating the Scaffolding Code | p. 197 |
Writing the Migration | p. 198 |
Creating the Photo Model and Its Relationships | p. 199 |
Mapping the Photos Resource | p. 200 |
The Photos and User Photos Controllers | p. 200 |
The Photo Views | p. 203 |
Manually Testing the Gallery | p. 208 |
Writing the Test Cases | p. 210 |
Creating the Photo Fixtures | p. 210 |
Unit Testing | p. 210 |
Functional Tests | p. 212 |
Further Development of the Photo Gallery | p. 215 |
Summary | p. 215 |
Sending E-mail and Building a Newsletter Mailing List | p. 217 |
Using ActionMailer | p. 217 |
Configuring ActionMailer | p. 217 |
Specifying the E-mail Feature Requirements | p. 218 |
E-mail Notifications of New Comments | p. 219 |
E-mail Newsletters | p. 219 |
Building the New Comment Notifier | p. 220 |
Creating the Mailer | p. 220 |
Manually Testing E-mail Creation | p. 223 |
Calling the Mailer from the Comments Controller | p. 226 |
Testing the Mailer from Within the Application | p. 227 |
Automating the Mailer Tests | p. 228 |
Building the Newsletter Feature | p. 230 |
Installing ar_mailer | p. 230 |
Creating the Skeleton Resource | p. 232 |
Mapping the Newsletter Resource | p. 233 |
The Newsletter Model | p. 234 |
Writing the Newsletter Controller and Views | p. 234 |
Creating the Newsletter Mailer | p. 241 |
Add the Newsletters to the Sidebar | p. 241 |
Testing the Newsletter Mailer | p. 242 |
Further Development of the E-mail System | p. 244 |
Summary | p. 244 |
Adding Friends with XFN Details | p. 247 |
Microformats and XFN | p. 247 |
The Friends Feature Requirements | p. 249 |
The Friends Resource | p. 249 |
Showing Users' Latest Activities | p. 251 |
Building the Friends Resource | p. 251 |
Creating the Database Migrations | p. 251 |
Building the Friends Resource | p. 254 |
Updating the User's Latest Activity | p. 257 |
The Friends Controller and Views | p. 258 |
Adding Friends Links to the Sidebar Menu | p. 267 |
Styling the Friends List | p. 269 |
Testing | p. 272 |
Further Development of the Friendship Feature | p. 274 |
Summary | p. 275 |
Adding Tags to the Photo Gallery | p. 277 |
The Gallery Tagging Requirements | p. 277 |
Tagging with Rails | p. 278 |
The acts_as_taggable_on_steroids Plug-in | p. 279 |
Building the Photo Tagging Feature | p. 282 |
Installing the acts_as_taggable_on_steroids Plug-in | p. 282 |
Creating the Database Tables | p. 283 |
Updating the Models | p. 284 |
Creating the Controllers | p. 285 |
Adding the Resource Mappings | p. 285 |
Writing the Controllers and Views | p. 286 |
Adding Tags to a Photo | p. 290 |
Linking to the Tag Browser | p. 295 |
Manually Testing | p. 296 |
Further Development of the Tagging System | p. 298 |
Summary | p. 299 |
Creating Mashups and Integrating with Web 2.0 | p. 301 |
Integrating the Google Maps API | p. 301 |
The Mapping Feature Requirements | p. 302 |
Building the Mapping Feature | p. 303 |
Integrating the Flickr API | p. 316 |
The Flickr Feature Requirements | p. 317 |
Building the Flickr Integration Feature | p. 317 |
Further Development Using Mashups | p. 326 |
Summary | p. 327 |
Adding User-Created Themes to the Blogging Engine | p. 329 |
The Blog Template Requirements | p. 329 |
Liquid Templates | p. 330 |
The Liquid API | p. 331 |
Liquid Markup | p. 331 |
Installing Liquid | p. 332 |
Building the Blog Templates Feature | p. 333 |
Creating the Liquid Drops | p. 333 |
Creating the Liquid Filters | p. 336 |
The Usertemplate Model | p. 337 |
The Usertemplates Controller | p. 338 |
The Usertemplate Views | p. 340 |
Rendering Liquid Templates | p. 342 |
Manual Testing | p. 343 |
Testing the Usertemplates Controller | p. 346 |
Further Development of the User Templates | p. 348 |
Summary | p. 349 |
Adding a Mobile Interface | p. 351 |
The Mobile Web | p. 351 |
The RailsCoders Mobile Site Requirements | p. 352 |
The Layout | p. 353 |
User Profiles | p. 354 |
Accounts | p. 354 |
Pages | p. 354 |
News Articles | p. 354 |
Forums | p. 354 |
Blogs | p. 354 |
Photo Gallery | p. 355 |
Developing Mobile RailsCoders | p. 355 |
Structure of the Mobile Application | p. 355 |
Creating the Mobile Layout and Style Sheet | p. 356 |
The Resource Mappings | p. 357 |
The Mobile Controllers and Views | p. 360 |
Manual Testing | p. 375 |
Testing the Mobile Site | p. 375 |
Further Development of the Mobile Site | p. 377 |
Summary | p. 377 |
Deploying, Optimizing, and Scaling the Application | p. 379 |
Deploying RailsCoders | p. 379 |
Development Mode vs. Production Mode | p. 379 |
Session Storage | p. 380 |
Choosing a Host | p. 381 |
Choosing a Web Server | p. 382 |
Automating Deployment with Capistrano and Deprec | p. 383 |
Optimizing and Scaling RailsCoders | p. 392 |
Watching the Log Files | p. 392 |
Caching | p. 393 |
Benchmarking | p. 395 |
Summary | p. 396 |
Index | p. 397 |
Table of Contents provided by Ingram. All Rights Reserved. |
ISBN: 9781590598412
ISBN-10: 1590598415
Series: Expert's Voice
Published: 1st June 2007
Format: Paperback
Language: English
Number of Pages: 448
Audience: General Adult
Publisher: Springer Nature B.V.
Country of Publication: US
Dimensions (cm): 23.5 x 19.05 x 2.31
Weight (kg): 0.72
Shipping
Standard Shipping | Express Shipping | |
---|---|---|
Metro postcodes: | $9.99 | $14.95 |
Regional postcodes: | $9.99 | $14.95 |
Rural postcodes: | $9.99 | $14.95 |
How to return your order
At Booktopia, we offer hassle-free returns in accordance with our returns policy. If you wish to return an item, please get in touch with Booktopia Customer Care.
Additional postage charges may be applicable.
Defective items
If there is a problem with any of the items received for your order then the Booktopia Customer Care team is ready to assist you.
For more info please visit our Help Centre.
You Can Find This Book In

Accelerate
The Science of Lean Software and DevOps: Building and Scaling High Performing Technology Organizations
Paperback
RRP $44.99
$37.25
OFF

Architecture Patterns with Python
Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
Paperback
RRP $125.50
$60.90
OFF
This product is categorised by
- Non-FictionComputing & I.T.Graphical & Digital Media ApplicationsWeb Graphics & Design
- Non-FictionComputing & I.T.Computer Programming & Software DevelopmentProgramming & Scripting Languages
- Non-FictionComputing & I.T.Digital Lifestyle & Online World: Consumer & User GuidesInternet Guides & Online Services
- Non-FictionComputing & I.T.Computer Programming & Software DevelopmentSoftware Engineering
- Non-FictionComputing & I.T.Computer Networking & Communications
- Non-FictionComputing & I.T.Computer Programming & Software DevelopmentWeb Programming
- Non-FictionSociology & Anthropology