Ruby on Rails Programming II
with Mike and Nicole Clark
Advance To The Next Level!
In our Rails 1 course, you built and deployed your first Rails app. Now you're ready to advance to the next level and take your app up a notch!
This second-level course picks up where you left off at the end of the first course. Using the same project-based approach, you'll round out the app with features including user accounts, authentication and authorization, many-to-many relationships, custom routes, and other pro-level design facets.
By popular demand, we're in the process of making this course available online with everything you've come to expect from our online courses: professionally-produced videos, practical hands-on exercises, and lots of example code.
What Will I Learn?
How to advance your app and broaden your skills. This course takes a very pragmatic, project-based approach focusing on three major facets found in most Rails apps. We'll take a deep dive into the following:
User Account Management
You sign up, sign in, and sign out of web apps every day. It's so routine that it's easy to take account management features for granted. But the reality is there's a lot going on behind the scenes. And managing your users' accounts isn't an area of your app that should be a black box. Every Rails developer should know how their authentication system works.
To properly implement account management in your app requires a solid understanding of sessions, cookies, filters, security concerns, and Rails conventions for authentication and authorization. Whether you choose to build your own system from scratch or use a gem, it's critical to know how everything fits together. That way you'll be in a better position to adapt, customize, and troubleshoot the code. We'll break it all down and show you how to:
- Design a solid User model and securely store passwords
- Sign up new users
- Display user profile pages
- Edit account information
- Sign in authenticated users and remember them with sessions
- Restrict access to specific actions based on signed-in status
- Allow special "admin" users to perform admin-only tasks
- Send emails to users from inside your app
- Sign out users
In the Rails I course, you learned how to connect models using one-to-many associations. More sophisticated apps also have many-to-many relationships between models. For example, users of a movie review app might have many favorite movies. And movies will conversely have many users who fave them. Because these sorts of relationships are so common, Rails has conventions to help you manage them.
But the conventions alone only take you so far. It's up to you to design the associations with the full stack in mind: from the database tables through to the user interface. In the context of a movie review app, you'll learn how to apply many-to-many associations to two use cases:
- Create a simple many-to-many association that lets users "fave" multiple movies
- Design a rich many-to-many association that ties users to their movie reviews using a join model
- Run queries across the relationships to list the movies a user has reviewed and faved
- Highlight recent favs for a movie in the sidebar
- Name associations to make your code more expressive
- Set up through associations for efficient querying
Custom Routing and URL Techniques
URLs are the user interface of the web. We tweet and email them. We bookmark pages we want to return to later. We use embedded links to connect across web apps. As part of your app's user interface, it's critical that your URLs are both expressive and friendly. And well-designed URLs might also end up driving more search traffic to your site!
The default resource URLs are a good start, but the Rails router gives us a lot of flexibility when it comes to customizing URLs. You'll learn several techniques that take advantage of the power in the Rails router:
- Generate friendly URLs for better SEO, bookmarking, and curb appeal!
- Declare named, composable queries using scopes (bonus: use Ruby lambdas)
- Automatically run code at certain points in the model's lifecycle using callbacks
- Customize routes to handle scenarios beyond the basic resource routes
Best Practices, Tips, Tricks, and Techniques
As always, throughout the course you'll learn how to write good, clean code that follows tried-and-true practices used by veteran Rails developers. You'll also pick up tips, tricks, and techniques to cut down development time and get the most out of Rails!
Who's It For?
Rails Programmers who want to learn more Rails features. This online training course picks where our first online Ruby on Rails course leaves off.
This course will be a good fit for you if:
- You have experience with fundamental Rails concepts.
- You're comfortable with object-oriented programming in the Ruby language. If you're new to the Ruby programming language, we strongly recommend taking our online Ruby Programming course prior to this course.
- You've taken our introductory online Ruby on Rails course or you're familiar with the fundamental topics taught in that course.
Watch, Read, Practice… Learn! This online multi-media course helps you learn Rails in a variety of ways:
HD-Quality and DRM-free Videos
Your time is valuable, so in each video we get right to the point and focus on a particular aspect of Rails. The videos are a combination of personal instruction, live-coding, and animated visuals to deepen your understanding of Rails. You'll see exactly how we incrementally build each feature. You can stop, rewind, and rewatch each video as often as you like and at your own pace.
Each video is only 10-20 minutes so you can work through the course in small increments. Watch the videos in the browser for an integrated learning experience, or download them for offline viewing. (The videos also look great on an iPad or iPhone!) All the videos are licensed for individual use, DRM-free, and available in full 1280x720 HD resolution. Watch them when and where it's convenient for you!
In addition to the videos, you get access to an online companion workbook that leads you through incrementally designing each feature step-by-step. The workbook isn't an afterthought—it's a core part of the course. To really learn Rails, you need to practice writing Rails code. So, we designed the workbook to go hand-in-hand with the videos.
Each video has a corresponding chapter in the workbook. This is your opportunity to practice what you learned in the video by writing, reading, and refactoring Rails code. Each chapter builds on the previous, with a high-level objective you can work through on your own, and step-by-step instructions to guide you through to a solution. You'll complete the exercises directly on your own computer—the same familiar environment where you'll actually write your own Rails app.
In the end you'll have created a full-featured Rails app similar to the app we create in the videos. Along the way there are explanations, hints, discussions on design principles, tips and tricks, recommended resources, and of course all the solutions (with tests!).
Example Code and Solutions
It's been our experience that developers don't want the practice code in the workbook to be exactly like the example code we write in the videos. So instead, in the workbook exercises you'll build a different, yet similiar, app to the one we build in the videos. That not only makes it more fun for you, but also engages your brain more as you think through how to apply what you learned in a slightly different context. As an added bonus, at the end of the course you can draw from the code of two full-featured Rails apps!
Have questions during the course? No problem! You'll get access to a mailing list exclusively for participants of this course. We're there to help answer questions so you never get bogged down. Participating on the mailing list is also a great way to share insights and discuss Rails topics with other folks taking the course. In fact, students of our courses have said the alumni mailing lists are some of the best resources on the web.
Your access to this course never expires. You can revisit the course whenever you want. It's the perfect environment for learning at your own pace, on your own time.
Proof of Completion
Showcase your achievement in learning Rails! When you're done, share the link to your alumni page to show off your accomplishment.
Discounts on Future Courses
By purchasing this course you become a Pragmatic Studio Alumni which entitles you to the discounted alumni price on all future courses.
What Do I Need?
A Computer and a 'Net Connection. Yes, it really is that easy to take this course. No airline tickets, hotel reservations, or scheduling conflicts. Instead, you'll simply need your favorite coffee mug, comfy slippers, and the following additional necessities of any good programmer:
Mac, Windows, or Linux Computer
Rails runs great in all these environments, so any computer you're comfortable using will do. We'll help you get everything installed on your system so you'll learn in the same environment where you'll actually write your own Rails apps.
Up-to-date Web Browser
We designed the online experience to take advantage of some of the latest web standards, so you'll need the latest version of Safari, Chrome, Firefox, or IE 8 (or higher).
The videos in this course can be watched either in your browser (in which case you'll need a reasonably fast 'net connection) or you can download them to your computer and watch them offline. The workbook and exercises are only available online.
Who Teaches This Course?
Mike and Nicole Clark run The Pragmatic Studio, an acclaimed source of software developer training. Over the last seven years, we've helped over 2,500 developers improve their craft through public, private, and (now) online courses. In this course, we hope to help more folks in their pursuit to build web apps for their company, club or organization, or hobby turned exciting new venture.
Mike helped build one of the first production Rails apps way back in 2005, lead the initial development of the Pragmatic Bookshelf site, and continues to develop the Rails apps that power our online training business. He's also the author of Advanced Rails Recipes and co-author of Agile Web Development with Rails.