AI Content Chat (Beta) logo

Accelerating Your Learning

If you have no prior development experience, one of the worst things you can do when learning Rails is to just dive in. Some of the concepts build on each other, so jumping in would be like signing up for a calculus class before you've learned algebra. Sure, you could muddle through it, but most of your time would be spent trying to figure out why things aren't working.

Another difficulty for a beginner is figuring out what to learn. SQL, XHTML, CSS, XSS, RDF, RDBMS-what should you drink from the fire hose of acronyms? Which topics are worthwhile for a beginner to learn and which are better left for later?

Another mistake is spending too much time mastering a concept when you only need a basic understanding.

Therefore, to accelerate your learning, learn the right things in the right order at the right depth.

The following roadmap will help you do exactly that.

But First Some Ground Rules...

It takes a significant investment of time to learn Rails. It will be months or even years before you are a productive Rails programmer. So don't make the mistake of choosing Rails when you should be learning something else! Before committing to Rails, you should:

  • know the difference between a web site and a web application
  • know the difference between a CMS and a web application
  • know the difference between a programming language and a web framework
  • know that Rails is a web framework (not a CMS, not a programming language) that helps you create web applications

Otherwise, you will waste your time learning Rails when all you really needed was WordPress.

Update: In addition to this roadmap, you should also check out the very nice screencast Getting Started with Rails.

Roadmap for Learning Rails

Here is a roadmap specially designed for a beginner to navigate their way to Rails mastery. Blue boxes represent technologies and green boxes represent intermediate goals. Arrows represent learning dependencies. Below the roadmap I've listed more information about learning each technology.

I've intentionally structured this roadmap so that you can learn one thing at a time. That way, you'll spend more time creating and less time confused.

Ruby is the most important technology to know when learning Rails. Take the time to get comfortable with Ruby. If you have never programmed before, this will take a while. Avoid the temptation to skip ahead without Ruby competence. You will pay for it in the purgatory of awful debugging sessions.

Make sure you fully understand object-oriented programming and that the language constructs are second nature to you. Given a programming problem, you should be able to generate several different solutions and explain the strengths and weaknesses of each. You should know how DSLs work. You don't need to be an expert in Ruby, but you shouldn't be struggling with basic concepts like each, modules and symbols.

There is no such thing as a good Rails programmer who is not a good Ruby programmer. Your Rails skills can only be as good as your Ruby skills.

Key Concepts
The concepts you will be learning are too numerous to list. Suffice to say that you could make an entire roadmap dedicated to learning Ruby.
Tools
You need a text editor with syntax highlighting; TextMate is a good choice for beginners. If this is your first text editor, don't let some evangelist talk you into using vim. You can always learn that later.
References
Learn to Program by Chris Pine is an excellent Ruby book for beginners.
try ruby! is a fun way to jump right into Ruby right now.
The Ruby Programming Language is a great in-depth guide. (By the way, the best programming books are from O'Reilly and The Pragmatic Programmers.)

HTML is a text markup language, not a programming language, which makes it much easier to learn than Ruby. Start by learning HTML 4 and save HTML 5 for later.

Key Concepts
markup, tags, attributes
Tools
The W3C validator can check your HTML for errors.
References
W3Schools has an HTML tutorial as well as an HTML reference.

Now that you know HTML, use CSS to give it some style. Your goal should be to understand the basics. You should know how to add styles to your web page and understand the box model. After you understand the basics, move on. Lack of CSS knowledge won't get in the way of learning other concepts.

Key Concepts
box model, selectors, stylesheets
Tools
There is a W3C validator for CSS.
Use Firefox as your development browser and installFirebug, which is a great tool for debugging HTML and CSS in the browser.
Web Developer is another great Firefox add-on that you should install.
References
W3Schools has a CSS tutorial and reference.

Since your goal is to become a web programmer, you should put something on the web. First, you need to know HTML (and optionally CSS to make it pretty). Then you need to find a web host to host your web page. You can usually find one for free or a few bucks a month. Then you need to buy a domain name from a registrar such as Namecheap. Finally, you need to understand just enough about the Domain Name System (DNS) to point your domain name at your web host. (By the way, registrars often provide hosting as well.)

You really don't need to put something on the web to learn Rails. However, I think it's a great idea to get something on the web as soon as you can so that you gain the experience that can only come from managing real web sites. You can start small. For example, I launched the world's smallest web site at instantzendo.com. Publishing something on the web is a great morale booster, too, so do it as soon as you can.

Key Concepts
DNS, registrars, web hosts

You may notice that JavaScript is shown as a learning dependency for nanoc. This is not quite accurate; you don't need to know JavaScript to learn nanoc. The reason that JavaScript is shown here in the roadmap is that after you've gotten comfortable with HTML and CSS, that's a good time to explore JavaScript.

Your goal should be to learn just the basics. Learn how to load JavaScript files into your web page and how to insert JavaScript directly into your HTML. Learn how you can manipulate the DOM with JavaScript. Learn just enough about JavaScript so that you know what it is and how to use JavaScript that other people have written. That's all you need to know for now. Later, when you are learning Rails, JavaScript will come up now and then but you won't need to write any yourself to learn the basics of Rails.

Key Concepts
functions, scripts, DOM
References
W3Schools has a JavaScript tutorial and reference.

By now you should be competent in Ruby as well as HTML. nanoc combines these by using Ruby as a tool to help you write static web pages.

nanoc is in no way related to Rails, so you can get away with not knowing it. However, it's a great next step in the roadmap since it combines Ruby and HTML without adding a lot of additional concepts. It's also a great tool to have in your toolbox. I use it myself.

The main Rails-related concept you'll learn here is how to embed Ruby inside of HTML.

With Rack, you are officially leaving the world of web sites and entering the world of web apps. No longer are you sending static HTML files to the browser; you are programmatically building HTML on-the-fly to send to the browser.

Rack is a great foundational concept. It forces you to understand HTTP, which is required if you are going to be a good Rails developer. Rack is also the technology that every modern Ruby web framework and web server uses, so time spent learning Rack is time well-spent.

Note that you don't need to know nanoc to learn Rack; Rack is simply a good next step after you know nanoc.

Key Concepts
HTTP, dynamically-generated web pages
Tools
Firebug allows you to see the HTTP conversation between your browser and the web server.
References
I learned Rack from remi's screencasts and would wholeheartedly recommend you do the same.

Git has no learning dependencies, so you can learn it whenever you want. But you need to know it before you use Heroku.

Git is a version control system so it basically helps you keep track of changes to your files. Don't underestimate the learning curve of Git. There are a lot of concepts to learn and some of the commands are counter-intuitive. Take the time to understand Git well; it will pay off later. But don't bother learning everything about Git. Learn what you need to know to manage a typical Git workflow. Note that if you are working by yourself, your workflow will be different than those working in teams.

Key Concepts
version control systems
Tools
If you are on a Mac, GitX is a nice visual interface. But don't use this instead of Git's command line interface; use this to augment the command line interface.
GitHub is the home for the Ruby community's open-source projects.
References
The Git Community Book

Heroku is your friend. They are saving you the trouble of learning how to administer a Linux web server. And they are helping you for free. You should give them a hug.

Now that you know Rack and Git, you are dangerous. Write a Rack app, put it in a Git repository, then push this Git repo to Heroku and they will put it on the web for you. You will have published your first web app. Welcome to the club, fellow web programmer!

Because you haven't learned about databases yet, you will be limited in the kinds of Rack apps you can create. However, you can still write a useful Rack app without a database. My 2rgb.com Rack app (which is hosted on Heroku) is simply a Ruby method wrapped up as a web app. If you're curious, here's the source code.

Heroku is not just good for learning and for Rack apps, it's also good for production Rails apps.

Almost all web apps are backed by a database and most of these databases are RDBMSs that understand SQL. Take the time to learn the basics of SQL: what a relation is, SELECT statements, etc. But don't get too deep-Rails hides the SQL from you so you don't need to know much in order to learn Rails. However, you should become more familiar with SQL later in order to write professional web apps.

You may hear a lot of discussion about NoSQL. Save that for later after you're comfortable with Rails, since most Rails apps still use RDBMSs.

Sinatra is a simple Ruby web framework that is much easier to learn than Rails. The first thing to do is convert a Rack app you wrote into a Sinatra app. Then create a database and use ActiveRecord to interact with your database from within Sinatra.

You don't need to know Sinatra to know Rails. However, it makes it easier to learn Rails since it introduces you to web frameworks without the complexity of Rails. Sinatra is also a nice web framework to know and later on you may prefer Sinatra to Rails for some projects.

It is common to feel disoriented when learning Rails. The framework does so much for you and there is so much magic that it's hard to understand the flow of control and how the different parts of the framework relate. However, if you've followed this roadmap, this shouldn't happen to you.

Key Concepts
Ruby on Rails, MVC
References
Check out the comprehensive Ruby on Rails Tutorial: Learn Rails by Example by Michael Hartl.
Agile Web Development with Rails is a popular Rails tutorial book.
RailsCasts are an excellent way to learn about various Rails topics.

Five More Tips to Accelerate Your Rails Education

Always Be Producing
When you are learning a new technology, always create something with that technology. Are you learning HTML? Make a web page. Learning Rack? Launch a tiny web app. Producing something real keeps you focused on learning the right things. Learn by doing.
Don't Learn Alone
Watch experts as they work. Notice what tools and technologies they use. Pair program.
Know Why It Exists
Every technology was invented to solve a problem. When you learn a new technology, learn who invented it and what problem they were solving. Things will make a lot more sense when you do this.
Follow the Crowd
When you're first starting out, don't make unusual choices, such as learning to program Rails on Windows. One of the strengths of Rails is the community, but if you've made unusual choices, you'll quickly find yourself without much help.
Organize Your Knowledge
As you are learning Rails, you'll encounter an enormous amount of information. Create a system to organize this information so that you can quickly find it later. The act of classifying this information aids your learning.

You can skip to the end and leave a response. Pinging is currently not allowed.

Startup Tools: Web Application Frameworks - Page 41 Startup Tools: Web Application Frameworks Page 40 Page 42