CSC/ECE 517 Fall 2009/wiki1b 13 Resources For Rails: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(78 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Introduction =  
= About this Page =  


This page is a resource for more information regarding the Rails platform.  Consider it an index page for Rails resouces that also has definitions and added information a user will find helpful when they investigate the resource.  Our target audience are Rails users that have experience with the Ruby language.  We do not cover information regarding IDE's for Rails.  We determined the following topics are relevant to a new user:
This page is a resource for more information regarding the Rails application framework.  Consider it an index page for Rails resouces that also has definitions and extra information a user will find helpful before they go to the resource.  Ruby programmers that want to get started with Rails are the target audience.  We do not cover information regarding IDE's.  We chose the following topics as they are relevant to the target audience:


# General
# Tutorials
# Tutorials
# Testing
# Testing
# Debugging
# Debugging
# Platform Issues THIS IS AN EDIT


An introduction for each of the topics convey the coverage provided by the resource.  Definitions of terms that are provided to familiriaze user with terms before they investigate a resource.  Since information is usually made more clear through examples, we let you know when a resouces provides them.  Actually, we also summarize everything provided in the resourceYou can spot these by looking for:
Each section starts with an introduction to convey the coverage provided by that topic.  Since information is usually made more clear through examples, we point out when resources provide them.  You can see this information in our reviewsA review the following fields:


<code><pre>
<hr>
Summary info for resource. 
<hr>
</pre></code>
<b>Title:</b><br>
<b>Type:</b> <br>
<b>Examples:</b> <br>
<b>Summary:</b> <br>
<b>Rating:</b> <br>
<b>Reason for Rating:</b> <br>
<b>Link:</b> <br>
<hr>
<hr>


This gives users information about what they might expect in the resource before they start.    
The reviews give you information about what you might expect in the resource. Ratings are out of 5 stars.  5 stars is the highest rating.


This page is not meant to be a source of completely new information regarding the Rails platform.  Rather, it is meant to be used as a starting point for someone interested in more resources for Rails.  We hope you find the information helpful!
This page is not meant to be a source of completely new information regarding the Rails platform.  The new and unique content is our intro and reviews.  We also provide a list of definitions at the end of the page.  This page is meant to be used as a starting point for someone interested in more resources for Rails.  We hope you find the information helpful!


For feedback please contact handles: objectoriented or cybo on the NCSU Expertiza system.
For feedback please contact handles: objectoriented or cybo on the NCSU Expertiza system.


= Resources for Rails =  
= Resources for Rails =  
== Tutorials ==
== Testing ==
=== Introduction ===


This section provides links to pages which describe resources that can be used by Ruby on Rails to conduct testing.  Some of them are tutorials and some are just information that you need to know. This page also provides some definitions used by the links. In most cases the text in those links is intuitive however if you don’t understand something  you can refer to the definition section. This page was written and the links were provided under the assumption that the reader has intermediate knowledge of Ruby (after all rails is a framework for Ruby not the actual language).
== General ==


=== Definitions ===
Below are general Ruby on Rails resources.  They fall into three categories:  rails documentation, platform issues, popularity.   


XP – extreme programming. Here is the Wikipedia definition.  Basically it means that at least one pair of eyes should look at your code, say a fellow developer. (S)he might be able to find errors that you are not able to. Say you wrote a method and it doesn’t the way you wanted it to. Let you programmer friend take a look at itFrequent testing is also a part of this methodology.
<hr>
<hr>
<b>Title:</b> Ruby on Rails Main Site<br>
<b>Type:</b> Installation Instruction, Documentation<br>
<b>Examples:</b> Yes<br>
<b>Summary:</b> This is the main site where you can download Ruby on Rails, see examples, and read documentation.<br>
<b>Rating:</b> *****<br>
<b>Reason for Rating:</b> As a new web platform, Ruby on Rails has been enormously successful in large part because of the resources for the quick install and short time it takes to learn to be productiveThis is due to the main resource, rubyonrails.org<br>
<b>Link:</b> http://rubyonrails.org/ <br>
<hr>


BDD – behavior driven development. Here is the Wikipedia definition. But in plain English it means that when you work on a project you define its behavior, not the technical details of its implementationSay you work with a customer on a webcatalog. You shouldn’t bore him/her with the technical detail of how you are going to do it. Just say that catalog will probably have administrators who can edit it, users who can view it, a shopping cart so that the product could be checked out, login and logout pages etc. That will define what this webcatalog can do (its behavior).
<hr>
<b>Title:</b> Wikipedia - Ruby on Rails<br>
<b>Type:</b> Reference<br>
<b>Examples:</b> No<br>
<b>Summary:</b> This is a very brief description of Ruby on RailsThe resource itself is brief but there are many links to other topics and references.<br>
<b>Rating:</b> ***<br>
<b>Reason for Rating:</b> This is a very brief introduction.  It does not go into any depth or provide good breadth.<br>
<b>Link:</b> http://en.wikipedia.org/wiki/Ruby_on_Rails<br>
<hr>


TDD – test driven development. Here is the Wikipedia definitionIn other words you write a test before you write your codeSay you know that you have to write a method named do_something. Before writing it you will write a test for it, test_do_something and only then do_something. This methodology helps you to 1) define what your method should do exactly, since before you wrote it you already have a test for it so in some sense you already know what you expect your method to do 2)verify if you defined your method the way you wanted, because if you didn’t then your test will most likely fail
<hr>
<b>Title:</b>Ruby on Rails Documentation<br>
<b>Type:</b> Documentation<br>
<b>Examples:</b> Yes<br>
<b>Summary:</b> This is the main documentation site for Ruby on RailsIt provides the API, guides, books, how-to's, and snippets <br>
<b>Rating:</b> ****<br>
<b>Reason for Rating:</b> This site is very easy to read and full of informationAlmost everything you need to know about the rails platform is covered in the documentation.  The only drawbacks are that it is a large amount of material and there are no criticisms or descriptions regarding the shortfalls of the platform.<br>
<b>Link:</b> http://rubyonrails.org/documentation<br>
<hr>


ZenTest – a set of tools that are used for testing in Ruby on Rails. Also it is a name of the tools in the ZenTest tool package. It should be installed separately. To install use:  gem install ZenTest (Windows)  or sudo gem install ZenTest (Linux)
<hr>
<b>Title:</b> Ruby on Rails vulnerability affects Twitter; IE8 immune<br>
<b>Type:</b> Article<br>
<b>Examples:</b> No<br>
<b>Summary:</b> This article describes the cross site scripting vulnerability that was recently patched.<br>
<b>Rating:</b> **<br>
<b>Reason for Rating:</b> The article does not provide much information other than describing the problem and giving a status update on the resolution.<br>
<b>Link:</b> http://arstechnica.com/security/news/2009/09/ruby-on-rails-vulnerability-affects-twitter-ie8-immune.ars<br>
<hr>


RoR – abbreviation for Ruby on Rails
<hr>
<b>Title:</b> Planet Ruby on Rails<br>
<b>Type:</b> Reference Index to Rails Resources (similar to this page)<br>
<b>Examples:</b> Not directly.  Some of the resources have examples.<br>
<b>Summary:</b> This site is a good place to get read Rails tips.  It is very informative and will keep you up to date.<br>
<b>Rating:</b> ***<br>
<b>Reason for Rating:</b> Most of the content is good quality.  There are no summaries or ratings for the resources.<br>
<b>Link:</b> http://www.planetrubyonrails.org/<br>
<hr>


rake – ruby make utility
<hr>
<b>Title:</b> XSS Vulnerability in Ruby on Rails<br>
<b>Type:</b> Short Article<br>
<b>Examples:</b> No<br>
<b>Summary:</b> This is a very short description of the XSS vulnerability.<br>
<b>Rating:</b> *<br>
<b>Reason for Rating:</b> Provides some information regarding the vulnerability.<br>
<b>Link:</b> http://weblog.rubyonrails.org/2009/9/4/xss-vulnerability-in-ruby-on-rails<br>
<hr>


=== Resources ===
<hr>
<b>Title: Twitter Said to be Abandoning Ruby on Rails</b><br>
<b>Type:</b> Article<br>
<b>Examples:</b> No<br>
<b>Summary:</b> A short article regarding the news twitter is abandoning Ruby on Rails.<br>
<b>Rating:</b> ***<br>
<b>Reason for Rating:</b> This is a very brief article.<br>
<b>Link:</b> http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/<br>
<hr>


http://www.scribd.com/doc/3499573/TestFirst-Programming-With-Ruby
<hr>
I think this a good tutorial on how to do testing. It uses Test::Unit, how to set it up a test, and run it. It also introduces you to ZenTest. I’d say you should go through this tutorial first.
<b>Title:</b> Top 100 Rails Sites<br>
<b>Type:</b> Ranking Site<br>
<b>Examples:</b> No<br>
<b>Summary:</b> This site is very comprehensive and has several Rails rankings.<br>
<b>Rating:</b> *****<br>
<b>Reason for Rating:</b> Very good resource learning about the popularity of Rails.<br>
<b>Link:</b> http://rails100.pbworks.com/<br>
<hr>
<hr>


http://guides.rubyonrails.org/testing.html
== Tutorials ==
This is a decent guide/tutorial on testing. It provides you with introduction on testing in RoR, how to test your models, function tests of the controllers, how to use rake for testing  etc. It also contains links to other guides on other testing approaches.


http://ph7spot.com/articles/getting_started_with_autotest
Below are resources for tutorials. Some are specific for particular environments or serve a particular purpose such as giving information about a specific feature of Rails.
This is a sort of a tutorial on how to use autotest utility from the ZenTest gem. I say sort of since you should use this tutorial on a already written code.  


http://zentest.rubyforge.org/ZenTest
<hr>
This page contains documentation on ZenTest package. There are no examples of any kind just very dry documentation. You should use this as a reference when you become experienced with testing.
<hr>
<b>Title:</b>  Rolling with Ruby on Rails<br>
<b>Type:</b>  Getting Started Tutorial<br>
<b>Examples:</b>  The Rails cookbook application.<br>
<b>Summary:</b>  This is a good starting point for someone new to Ruby and Rails. It starts assuming you don't have Ruby installed. At the end of the tutorial, a user should have a fully functioning Rails environment and a sample application.  The second part of the extends the cookbook example while describing more features of Rails.  At the end of the tutorial there are Rails success stories and even more info about features of Rails such as caching, validation callbacks, and transactions. <br>
<b>Rating:</b>  ****<br>
<b>Reason for Rating:</b>  This is great starting point. The drawbacks are: 1 - tutorial assumes you are installing on Windows 2 - tutorial is not up to date with the latest Rails framework. <br>
<b>Link:</b> http://oreilly.com/ruby/archive/rails.html, http://oreilly.com/ruby/archive/rails2.html<br>
<hr>


== Debuging ==
<hr>
<b>Title:</b>  Four Days on Rails<br>
<b>Type:</b>  Tutorial or Documentation for Rails beginners<br>
<b>Examples:</b>  Yes.  To do list application.<br>
<b>Summary:</b>  This resource splits the tutorial into 4 session, thus 'Four Days on Rails.'  The tasks are simple and it is actually possible to complete them all in one day.  The tutorial refers back to documentation where needed.  This gives the user a chance to get more in-depth information where needed. <br>
<b>Rating:</b> ***<br>
<b>Reason for Rating:</b>  Four Days on Rails is written in a very causal manner.  There tone is not very professional but the content is good for getting started.<br>
<b>Link:</b>  http://rails.homelinux.org/<br>


<hr>
<b>Title:</b>  Really Getting Started in Rails<br>
<b>Type:</b> Blog<br>
<b>Examples:</b>  No  <br>
<b>Summary:</b>  This blog inspired by the 'Rolling with Ruby on Rails' article.  The author briefly covers some topics not covered by the tutorial.<br>
<b>Rating:</b> **<br>
<b>Reason for Rating:</b>  This is a very informal post without much substance.  It is interesting reading after someone has completed a tutorial such as 'Rolling with Ruby on Rails.'<br>
<b>Link:</b>  http://www.slash7.com/articles/2005/01/24/really-getting-started-in-rails<br>
<hr>


Outline:
<hr>
<b>Title:</b> Fast-track your Web apps with Ruby on Rails<br>
<b>Type:</b> Tutorial<br>
<b>Examples:  </b> Yes<br>
<b>Summary:</b> This is a very good technical introduction to the rails platform.  It covers important topics briefly.<br>
<b>Rating:</b> ****<br>
<b>Reason for Rating:</b> This is simple tutorial that shows what you can do with the Rails platform.<br>
<b>Link:</b>  http://www.ibm.com/developerworks/linux/library/l-rubyrails/<br>
<hr>


CoverageDescribe the scope of this page.
<hr>
<b>Title:</b> Ajax on Rails<br>
<b>Type:</b> Article<br>
<b>Examples</b> Yes<br>
<b>Summary:</b> This article highlights the ajax abilities in Rails.<br>
<b>Rating:</b> ****<br>
<b>Reason for Rating:</b> This article introduces the topic of ajax well.  It also gives information about how it is integrated with Rails.<br>
<b>Link:</b>  http://onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html<br>
<hr>


For each section:
<hr>
<b>Title:</b> Many to Many Tutorial for Rails<br>
<b>Type:</b> Tutorial<br>
<b>Examples:  </b> Yes<br>
<b>Summary:</b> This tutorial is very specific for learning about how to implement many-to-many relationships in Rails.<br>
<b>Rating:</b> ***<br>
<b>Reason for Rating:</b> This is a very good tutorial for learning this topic.  I like that it is very focused.<br>
<b>Link:</b>  http://jrhicks.net/Projects/rails/has_many_and_belongs_to_many.pdf<br>
<hr>


Intro - what this set of resources is for.
<hr>
<b>Title:</b> Distributing Rails Applications<br>
<b>Type:</b> Tutorial<br>
<b>Examples:  </b> Yes<br>
<b>Summary:</b> The author provides good information about deploying Rails applications.<br>
<b>Rating:</b> **<br>
<b>Reason for Rating:</b> The tutorial has a disclaimer that this is not for production deployment.  This leaves the reader wanting more information<br>
<b>Link:</b>  http://www.erikveen.dds.nl/distributingrubyapplications/rails.html<br>
<hr>


Definition - look through resources and create a list of definitions for each.   
<hr>
<b>Title:</b> Installing Ruby on Rails with Lighttpd and MySQL on Fedora Core 4<br>
<b>Type:</b> Tutorial<br>
<b>Examples:  </b> Yes<br>
<b>Summary:</b> This article describes how to install all the pieces to have a fully deployable environment for Rails on Fedora Core.<br>
<b>Rating:</b> ****<br>
<b>Reason for Rating:</b> This is a great article.  It is a good resource for anyone that wants to stand up a server to run Rails.<br>
<b>Link:</b> http://digitalmediaminute.com/howto/fc4rails/<br>
<hr>
<hr>


Examples -  describe an example similar to what is in the resource.
== Testing ==


Links - organize by subtopic and crossrefereance with definitions and examples.   
Below are reviews that describe resources that can be used by Ruby on Rails to conduct testing.  Some of them are tutorials and some are just information that you need to know. This page also provides some definitions used by the links. In most cases the text in those links is intuitive however if you don’t understand something you can refer to the definition section.


Resources
<hr>
<hr>
<b>Title:</b>  Test-First Programming With Ruby<br>
<b>Type:</b>  tutorial<br>
<b>Examples Provided:</b>  Yes<br>
<b>Summary:</b> Teaches how to use Test::Unit, specifically how it works, how to set it up and run it, explains the difference between error and failure, explains how to do test refactoring and introduces to a new tool called ZenTest<br>
<b>Rating:</b>  *****<br>
<b>Reason for Rating:</b>  This is great starting point for people who never done unit testing. <br>
<b>Link:</b> http://www.scribd.com/doc/3499573/TestFirst-Programming-With-Ruby<br>
<hr>


General
<hr>
<b>Title:</b> A Guide to Testing Rails Applications<br>
<b>Type:</b>  guide<br>
<b>Examples:</b> Yes<br>
<b>Summary:</b> This guide gives instructions on unit model testing, functional controller testing, test integration, rake tasks to run the tests, test setup and teardown, testing routes and mailer testing. The reader should note that this is a guide not a tutorial. Therefore the user must be familiar with Test::Unit framework already in order to use knowledge from this resource.<br>
<b>Rating:</b>  ****<br>
<b>Reason for Rating:</b>  No source code for examples is provided.<br>
<b>Link:</b> http://guides.rubyonrails.org/testing.html<br>
<hr>


http://rubyonrails.org/
<hr>
<b>Title:</b> Getting Started with Autotest<br>
<b>Type:</b>  tutorial<br>
<b>Examples:</b> No<br>
<b>Summary:</b> This tutorial gives reasons to why autotest utility was created and teaches how to use it. Specifically it covers the following topics: why autotest, install autotest, run autotest, configure plugins. This is a fairly good tutorial and needs to be used by people who are tired of rerunning their tests after a change to their code was made. In order to complete this tutorial it is required that the user would have a code and a series of tests to test it since source code for this tutorial is not provided.<br>
<b>Rating:</b>  ****<br>
<b>Reason for Rating:</b>  It would be easier to learn the material if source code was provided.<br>
<b>Link:</b> http://ph7spot.com/articles/getting_started_with_autotest<br>
<hr>


http://en.wikipedia.org/wiki/Ruby_on_Rails
<hr>
<b>Title:</b> ZenTest Documentation<br>
<b>Type:</b>  Documentation<br>
<b>Examples:</b> Yes, but they are not sufficient.<br>
<b>Summary:</b> This documentation covers the use of the ZenTest package (there is nothing more to expect from the documentation). This package should be used by people who want to speed up their test facility creation and overall testing process. In order to use the resource to the full advantage the reader should have some source code written prior to use of information provided by this resource.<br>
<b>Rating:</b>  ****<br>
<b>Reason for Rating:</b>  Documentation could use more examples, and it should provide source code for those examples.<br>
<b>Link:</b> http://ph7spot.com/articles/getting_started_with_autotest<br>
<hr>
<hr>


http://rubyonrails.org/documentation
== Debuging ==
 
http://arstechnica.com/security/news/2009/09/ruby-on-rails-vulnerability-affects-twitter-ie8-immune.ars
 
http://www.planetrubyonrails.org/
 
http://weblog.rubyonrails.org/2009/9/4/xss-vulnerability-in-ruby-on-rails
 
http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/
 
http://rails100.pbworks.com/


Tutorials
Below are reviews to resources that provide the user with useful (and sometimes maybe not so useful) links to pages that contain material on debugging in Rails environment. When the search of these links was conducted it was noted that the most popular debugger was ruby-debug, and 2 loggers, Logger and Log4r. Hence the links provided in these section will be given for those packages. It is assumed that the reader has intermediate knowledge of working with Ruby on Rails and has written some applications.


http://oreilly.com/ruby/archive/rails.html
<hr>
<hr>
<b>Title:</b>  Basics of use of ruby-debug<br>
<b>Type:</b>  tutorial, vodeocast, fibonacci method<br>
<b>Examples:</b>  Yes<br>
<b>Summary:</b>  Assumes that a user hasn't installed the gem and explains how to do it. It contains explanation of basic commands such as how to view current context, step through the code and set breakpoints. It is a very simple and easy tutorial and provides an excellent good starting point<br>
<b>Rating:</b>  *****<br>
<b>Reason for Rating:</b>  This is great starting point.<br>
<b>Link:</b> http://cardero.textdrive.com/~eventualbuddha/ruby-debug-1-basics.mov<br>
<hr>


http://oreilly.com/ruby/archive/rails2.html
<hr>
<b>Title:</b>  Basics of use of ruby-debug in Rails<br>
<b>Type:</b>  tutorial, vodeocast<br>
<b>Examples:</b>  Yes, To Do List<br>
<b>Summary:</b>  Assumes that a user hasn't installed the gem and explains how to do it. It contains explanation of basic commands such as how to view current context, step through the code, breakpoints and and how to change variable values while debuggin. It is a very simple and easy tutorial and provides a good starting point<br>
<b>Rating:</b>  ****<br>
<b>Reason for Rating:</b>  No link for the source code of the example was provided<br>
<b>Link:</b> http://media.railscasts.com/videos/054_debugging_rails.mov<br>
<hr>


http://rails.homelinux.org/
<hr>
<b>Title:</b>  Basics of Reading of a Stack Trace<br>
<b>Type:</b>  tutorial, vodeocast<br>
<b>Examples:</b> Yes<br>
<b>Summary:</b>  Demonstrates how to read and use a stack trace. <br>
<b>Rating:</b>  ****<br>
<b>Reason for Rating:</b>  No link for the source code of the example was provided, could use more than one example.<br>
<b>Link:</b> http://media.railscasts.com/videos/024_the_stack_trace.mov<br>
<hr>


http://www.slash7.com/articles/2005/01/24/really-getting-started-in-rails
<hr>
<b>Title:</b>  ruby-debug Documentation<br>
<b>Type:</b>  tutorial/documenation<br>
<b>Examples:</b>  Yes<br>
<b>Summary:</b>  Goes over all of the documentation of ruby-debug using examples. Despite that it is a documentation (which is usually hard to read) it is a fairly decent document.<br>
<b>Rating:</b>  ****<br>
<b>Reason for Rating:</b>  Nor source code for examples is provided.<br>
<b>Link:</b> http://bashdb.sourceforge.net/ruby-debug.html<br>
<hr>


http://www.ibm.com/developerworks/linux/library/l-rubyrails/
<hr>
<b>Title:</b>  Basics of Logger Use<br>
<b>Type:</b>  videocast/tutorial<br>
<b>Examples:</b>  Yes<br>
<b>Summary:</b>  Teaches how to do write custom messages to the log, use the logger for custom classes, customize the severity of messages and logger customization. <br>
<b>Rating:</b>  ****<br>
<b>Reason for Rating:</b>  No source code for the example is provided<br>
<b>Link:</b> http://media.railscasts.com/videos/056_the_logger.mov<br>
<hr>


http://onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html
<hr>
<b>Title:</b>  Logger Documentation<br>
<b>Type:</b>  documentation<br>
<b>Examples: </b> No<br>
<b>Summary:</b>  Hard cold documentation. Provides you with the description of methods and variables.<br>
<b>Rating:</b>  ***<br>
<b>Reason for Rating:</b>  No examples and documentations are always hard to read. <br>
<b>Link:</b> http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc<br>
<hr>


http://jrhicks.net/Projects/rails/has_many_and_belongs_to_many.pdf
<hr>
<b>Title:</b>  Log4r Documentation<br>
<b>Type:</b>  Documentation<br>
<b>Examples:</b>  Yes, they are included in the examples folder after the gem is installed<br>
<b>Summary:</b>  A thorough Log4r documentation on the usage of Log4r.<br>
<b>Rating:</b> ****<br>
<b>Reason for Rating:</b>  Documentations are always a hard read, not much fun there.<br>
<b>Link:</b> http://log4r.sourceforge.net/manual.html<br>
<hr>
<hr>


http://www.erikveen.dds.nl/distributingrubyapplications/rails.html
= Definitions =


http://digitalmediaminute.com/howto/fc4rails/
'''BDD''' – [http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia definition]. Behavior Driven Development.  In plain English it means that when you work on a project you define its behavior, not the technical details of its implementation.  Say you work with a customer on a webcatalog. You shouldn’t bore him/her with the technical detail of how you are going to do it. Just say that catalog will probably have administrators who can edit it, users who can view it, a shopping cart so that the product could be checked out, login and logout pages etc. That will define what this webcatalog can do (its behavior).


Testing
'''Core dump''' - [http://en.wikipedia.org/wiki/Core_dump Wikipedia definition]. In simpler terms it is the record of the state of the computer when it crashed, i.e. contents of registers, contents of memory (not all of it, just parts that are related to the program that was executing)


http://guides.rubyonrails.org/testing.html
'''Post-mortem debugging''' - the act of debugging the core dump of a process


http://weblogs.java.net/blog/bleonard/archive/2008/01/testing_rails_a.html
'''rake''' – ruby make utility


http://www.oreillynet.com/pub/a/ruby/2007/06/07/rails-testing-not-just-for-the-paranoid.html
'''RoR''' – [http://en.wikipedia.org/wiki/Ruby_on_Rails Wikipedia definition].  Abbreviation for Ruby on Rails


Debugging
'''TDD''' – [http://en.wikipedia.org/wiki/Test-driven_development Wikipedia definition].  Test Driven Development.  In other words you write a test before you write your code.  Say you know that you have to write a method named do_something. Before writing it you will write a test for it, test_do_something and only then do_something. This methodology helps you to 1) define what your method should do exactly, since before you wrote it you already have a test for it so in some sense you already know what you expect your method to do 2)verify if you defined your method the way you wanted, because if you didn’t then your test will most likely fail


http://guides.rails.info/debugging_rails_applications.html
'''XP''' – [http://en.wikipedia.org/wiki/Windows_XP Wikipedia definition].  Extreme Programming.  A key concept is that at least one pair of eyes should look at your code, say a fellow developer.  They might be able to find errors that you are not able to. Say you wrote a method and it doesn’t the way you wanted it to. Let your programmer friend take a look at it.  Frequent testing is also a part of this methodology.


http://www.sitepoint.com/print/debug-rails-app-ruby-debug/
'''ZenTest''' – a set of tools that are used for testing in Ruby on Rails. Also it is a name of the tools in the ZenTest tool package. It should be installed separately. To install use:  gem install ZenTest (Windows)  or sudo gem install ZenTest (Linux)

Latest revision as of 02:20, 22 September 2009

About this Page

This page is a resource for more information regarding the Rails application framework. Consider it an index page for Rails resouces that also has definitions and extra information a user will find helpful before they go to the resource. Ruby programmers that want to get started with Rails are the target audience. We do not cover information regarding IDE's. We chose the following topics as they are relevant to the target audience:

  1. General
  2. Tutorials
  3. Testing
  4. Debugging

Each section starts with an introduction to convey the coverage provided by that topic. Since information is usually made more clear through examples, we point out when resources provide them. You can see this information in our reviews. A review the following fields:



Title:
Type:
Examples:
Summary:
Rating:
Reason for Rating:
Link:



The reviews give you information about what you might expect in the resource. Ratings are out of 5 stars. 5 stars is the highest rating.

This page is not meant to be a source of completely new information regarding the Rails platform. The new and unique content is our intro and reviews. We also provide a list of definitions at the end of the page. This page is meant to be used as a starting point for someone interested in more resources for Rails. We hope you find the information helpful!

For feedback please contact handles: objectoriented or cybo on the NCSU Expertiza system.

Resources for Rails

General

Below are general Ruby on Rails resources. They fall into three categories: rails documentation, platform issues, popularity.



Title: Ruby on Rails Main Site
Type: Installation Instruction, Documentation
Examples: Yes
Summary: This is the main site where you can download Ruby on Rails, see examples, and read documentation.
Rating: *****
Reason for Rating: As a new web platform, Ruby on Rails has been enormously successful in large part because of the resources for the quick install and short time it takes to learn to be productive. This is due to the main resource, rubyonrails.org
Link: http://rubyonrails.org/



Title: Wikipedia - Ruby on Rails
Type: Reference
Examples: No
Summary: This is a very brief description of Ruby on Rails. The resource itself is brief but there are many links to other topics and references.
Rating: ***
Reason for Rating: This is a very brief introduction. It does not go into any depth or provide good breadth.
Link: http://en.wikipedia.org/wiki/Ruby_on_Rails



Title:Ruby on Rails Documentation
Type: Documentation
Examples: Yes
Summary: This is the main documentation site for Ruby on Rails. It provides the API, guides, books, how-to's, and snippets
Rating: ****
Reason for Rating: This site is very easy to read and full of information. Almost everything you need to know about the rails platform is covered in the documentation. The only drawbacks are that it is a large amount of material and there are no criticisms or descriptions regarding the shortfalls of the platform.
Link: http://rubyonrails.org/documentation



Title: Ruby on Rails vulnerability affects Twitter; IE8 immune
Type: Article
Examples: No
Summary: This article describes the cross site scripting vulnerability that was recently patched.
Rating: **
Reason for Rating: The article does not provide much information other than describing the problem and giving a status update on the resolution.
Link: http://arstechnica.com/security/news/2009/09/ruby-on-rails-vulnerability-affects-twitter-ie8-immune.ars



Title: Planet Ruby on Rails
Type: Reference Index to Rails Resources (similar to this page)
Examples: Not directly. Some of the resources have examples.
Summary: This site is a good place to get read Rails tips. It is very informative and will keep you up to date.
Rating: ***
Reason for Rating: Most of the content is good quality. There are no summaries or ratings for the resources.
Link: http://www.planetrubyonrails.org/



Title: XSS Vulnerability in Ruby on Rails
Type: Short Article
Examples: No
Summary: This is a very short description of the XSS vulnerability.
Rating: *
Reason for Rating: Provides some information regarding the vulnerability.
Link: http://weblog.rubyonrails.org/2009/9/4/xss-vulnerability-in-ruby-on-rails



Title: Twitter Said to be Abandoning Ruby on Rails
Type: Article
Examples: No
Summary: A short article regarding the news twitter is abandoning Ruby on Rails.
Rating: ***
Reason for Rating: This is a very brief article.
Link: http://www.techcrunch.com/2008/05/01/twitter-said-to-be-abandoning-ruby-on-rails/



Title: Top 100 Rails Sites
Type: Ranking Site
Examples: No
Summary: This site is very comprehensive and has several Rails rankings.
Rating: *****
Reason for Rating: Very good resource learning about the popularity of Rails.
Link: http://rails100.pbworks.com/



Tutorials

Below are resources for tutorials. Some are specific for particular environments or serve a particular purpose such as giving information about a specific feature of Rails.



Title: Rolling with Ruby on Rails
Type: Getting Started Tutorial
Examples: The Rails cookbook application.
Summary: This is a good starting point for someone new to Ruby and Rails. It starts assuming you don't have Ruby installed. At the end of the tutorial, a user should have a fully functioning Rails environment and a sample application. The second part of the extends the cookbook example while describing more features of Rails. At the end of the tutorial there are Rails success stories and even more info about features of Rails such as caching, validation callbacks, and transactions.
Rating: ****
Reason for Rating: This is great starting point. The drawbacks are: 1 - tutorial assumes you are installing on Windows 2 - tutorial is not up to date with the latest Rails framework.
Link: http://oreilly.com/ruby/archive/rails.html, http://oreilly.com/ruby/archive/rails2.html



Title: Four Days on Rails
Type: Tutorial or Documentation for Rails beginners
Examples: Yes. To do list application.
Summary: This resource splits the tutorial into 4 session, thus 'Four Days on Rails.' The tasks are simple and it is actually possible to complete them all in one day. The tutorial refers back to documentation where needed. This gives the user a chance to get more in-depth information where needed.
Rating: ***
Reason for Rating: Four Days on Rails is written in a very causal manner. There tone is not very professional but the content is good for getting started.
Link: http://rails.homelinux.org/


Title: Really Getting Started in Rails
Type: Blog
Examples: No
Summary: This blog inspired by the 'Rolling with Ruby on Rails' article. The author briefly covers some topics not covered by the tutorial.
Rating: **
Reason for Rating: This is a very informal post without much substance. It is interesting reading after someone has completed a tutorial such as 'Rolling with Ruby on Rails.'
Link: http://www.slash7.com/articles/2005/01/24/really-getting-started-in-rails



Title: Fast-track your Web apps with Ruby on Rails
Type: Tutorial
Examples: Yes
Summary: This is a very good technical introduction to the rails platform. It covers important topics briefly.
Rating: ****
Reason for Rating: This is simple tutorial that shows what you can do with the Rails platform.
Link: http://www.ibm.com/developerworks/linux/library/l-rubyrails/



Title: Ajax on Rails
Type: Article
Examples: Yes
Summary: This article highlights the ajax abilities in Rails.
Rating: ****
Reason for Rating: This article introduces the topic of ajax well. It also gives information about how it is integrated with Rails.
Link: http://onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html



Title: Many to Many Tutorial for Rails
Type: Tutorial
Examples: Yes
Summary: This tutorial is very specific for learning about how to implement many-to-many relationships in Rails.
Rating: ***
Reason for Rating: This is a very good tutorial for learning this topic. I like that it is very focused.
Link: http://jrhicks.net/Projects/rails/has_many_and_belongs_to_many.pdf



Title: Distributing Rails Applications
Type: Tutorial
Examples: Yes
Summary: The author provides good information about deploying Rails applications.
Rating: **
Reason for Rating: The tutorial has a disclaimer that this is not for production deployment. This leaves the reader wanting more information
Link: http://www.erikveen.dds.nl/distributingrubyapplications/rails.html



Title: Installing Ruby on Rails with Lighttpd and MySQL on Fedora Core 4
Type: Tutorial
Examples: Yes
Summary: This article describes how to install all the pieces to have a fully deployable environment for Rails on Fedora Core.
Rating: ****
Reason for Rating: This is a great article. It is a good resource for anyone that wants to stand up a server to run Rails.
Link: http://digitalmediaminute.com/howto/fc4rails/



Testing

Below are reviews that describe resources that can be used by Ruby on Rails to conduct testing. Some of them are tutorials and some are just information that you need to know. This page also provides some definitions used by the links. In most cases the text in those links is intuitive however if you don’t understand something you can refer to the definition section.



Title: Test-First Programming With Ruby
Type: tutorial
Examples Provided: Yes
Summary: Teaches how to use Test::Unit, specifically how it works, how to set it up and run it, explains the difference between error and failure, explains how to do test refactoring and introduces to a new tool called ZenTest
Rating: *****
Reason for Rating: This is great starting point for people who never done unit testing.
Link: http://www.scribd.com/doc/3499573/TestFirst-Programming-With-Ruby



Title: A Guide to Testing Rails Applications
Type: guide
Examples: Yes
Summary: This guide gives instructions on unit model testing, functional controller testing, test integration, rake tasks to run the tests, test setup and teardown, testing routes and mailer testing. The reader should note that this is a guide not a tutorial. Therefore the user must be familiar with Test::Unit framework already in order to use knowledge from this resource.
Rating: ****
Reason for Rating: No source code for examples is provided.
Link: http://guides.rubyonrails.org/testing.html



Title: Getting Started with Autotest
Type: tutorial
Examples: No
Summary: This tutorial gives reasons to why autotest utility was created and teaches how to use it. Specifically it covers the following topics: why autotest, install autotest, run autotest, configure plugins. This is a fairly good tutorial and needs to be used by people who are tired of rerunning their tests after a change to their code was made. In order to complete this tutorial it is required that the user would have a code and a series of tests to test it since source code for this tutorial is not provided.
Rating: ****
Reason for Rating: It would be easier to learn the material if source code was provided.
Link: http://ph7spot.com/articles/getting_started_with_autotest



Title: ZenTest Documentation
Type: Documentation
Examples: Yes, but they are not sufficient.
Summary: This documentation covers the use of the ZenTest package (there is nothing more to expect from the documentation). This package should be used by people who want to speed up their test facility creation and overall testing process. In order to use the resource to the full advantage the reader should have some source code written prior to use of information provided by this resource.
Rating: ****
Reason for Rating: Documentation could use more examples, and it should provide source code for those examples.
Link: http://ph7spot.com/articles/getting_started_with_autotest



Debuging

Below are reviews to resources that provide the user with useful (and sometimes maybe not so useful) links to pages that contain material on debugging in Rails environment. When the search of these links was conducted it was noted that the most popular debugger was ruby-debug, and 2 loggers, Logger and Log4r. Hence the links provided in these section will be given for those packages. It is assumed that the reader has intermediate knowledge of working with Ruby on Rails and has written some applications.



Title: Basics of use of ruby-debug
Type: tutorial, vodeocast, fibonacci method
Examples: Yes
Summary: Assumes that a user hasn't installed the gem and explains how to do it. It contains explanation of basic commands such as how to view current context, step through the code and set breakpoints. It is a very simple and easy tutorial and provides an excellent good starting point
Rating: *****
Reason for Rating: This is great starting point.
Link: http://cardero.textdrive.com/~eventualbuddha/ruby-debug-1-basics.mov



Title: Basics of use of ruby-debug in Rails
Type: tutorial, vodeocast
Examples: Yes, To Do List
Summary: Assumes that a user hasn't installed the gem and explains how to do it. It contains explanation of basic commands such as how to view current context, step through the code, breakpoints and and how to change variable values while debuggin. It is a very simple and easy tutorial and provides a good starting point
Rating: ****
Reason for Rating: No link for the source code of the example was provided
Link: http://media.railscasts.com/videos/054_debugging_rails.mov



Title: Basics of Reading of a Stack Trace
Type: tutorial, vodeocast
Examples: Yes
Summary: Demonstrates how to read and use a stack trace.
Rating: ****
Reason for Rating: No link for the source code of the example was provided, could use more than one example.
Link: http://media.railscasts.com/videos/024_the_stack_trace.mov



Title: ruby-debug Documentation
Type: tutorial/documenation
Examples: Yes
Summary: Goes over all of the documentation of ruby-debug using examples. Despite that it is a documentation (which is usually hard to read) it is a fairly decent document.
Rating: ****
Reason for Rating: Nor source code for examples is provided.
Link: http://bashdb.sourceforge.net/ruby-debug.html



Title: Basics of Logger Use
Type: videocast/tutorial
Examples: Yes
Summary: Teaches how to do write custom messages to the log, use the logger for custom classes, customize the severity of messages and logger customization.
Rating: ****
Reason for Rating: No source code for the example is provided
Link: http://media.railscasts.com/videos/056_the_logger.mov



Title: Logger Documentation
Type: documentation
Examples: No
Summary: Hard cold documentation. Provides you with the description of methods and variables.
Rating: ***
Reason for Rating: No examples and documentations are always hard to read.
Link: http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc



Title: Log4r Documentation
Type: Documentation
Examples: Yes, they are included in the examples folder after the gem is installed
Summary: A thorough Log4r documentation on the usage of Log4r.
Rating: ****
Reason for Rating: Documentations are always a hard read, not much fun there.
Link: http://log4r.sourceforge.net/manual.html



Definitions

BDDWikipedia definition. Behavior Driven Development. In plain English it means that when you work on a project you define its behavior, not the technical details of its implementation. Say you work with a customer on a webcatalog. You shouldn’t bore him/her with the technical detail of how you are going to do it. Just say that catalog will probably have administrators who can edit it, users who can view it, a shopping cart so that the product could be checked out, login and logout pages etc. That will define what this webcatalog can do (its behavior).

Core dump - Wikipedia definition. In simpler terms it is the record of the state of the computer when it crashed, i.e. contents of registers, contents of memory (not all of it, just parts that are related to the program that was executing)

Post-mortem debugging - the act of debugging the core dump of a process

rake – ruby make utility

RoRWikipedia definition. Abbreviation for Ruby on Rails

TDDWikipedia definition. Test Driven Development. In other words you write a test before you write your code. Say you know that you have to write a method named do_something. Before writing it you will write a test for it, test_do_something and only then do_something. This methodology helps you to 1) define what your method should do exactly, since before you wrote it you already have a test for it so in some sense you already know what you expect your method to do 2)verify if you defined your method the way you wanted, because if you didn’t then your test will most likely fail

XPWikipedia definition. Extreme Programming. A key concept is that at least one pair of eyes should look at your code, say a fellow developer. They might be able to find errors that you are not able to. Say you wrote a method and it doesn’t the way you wanted it to. Let your programmer friend take a look at it. Frequent testing is also a part of this methodology.

ZenTest – a set of tools that are used for testing in Ruby on Rails. Also it is a name of the tools in the ZenTest tool package. It should be installed separately. To install use: gem install ZenTest (Windows) or sudo gem install ZenTest (Linux)