Best resources for learning TDD with Rails [closed] - ruby-on-rails

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've finally gotten a handle on rails, and feel comfortable enough with it to start learning best practices, with the first on my list being TDD principles. What are the best resources to learn about TDD with Rails? Books, tutorials, anything. I'm hungry to learn!

If you want to buy a book, I would suggest you to look at pragmatic rails test prescriptions . It's not stuck with an implementation as the rspec book is and will more probably let you choose the tools YOU want.
I feel it is also better to read this book than million posts where pro/con BDD/TDD are spinning around ;)

Have a look at this one: http://pragprog.com/titles/achbd/the-rspec-book

My usual answer involving Rails and learning usually ends up at Railscasts. Check out the testing section. While there's not one specifically on TDD, most of them touch on the subject. Especially Cucumber, etc.

I would suggest you focus on the basics here! Don't fall in love with any specific way of doing TDD like rspec, shoulda or similar. Wait with that part until you understand the basics of rails TDD - THEN you can go out and add testing tools to your toolbox.
Start by writing a simple test for some part of your app where the logic does something else than CRUD work, some place where you handle some kind of math, or weird user behavior and try to write a test for that case - but make sure you have the time for it, because it will require much more time than expected the first time.
Once you have that test case running and working - and you fully understand why, then your ready to expand and start to play with all the wonderful testing tools out there.

Related

Is the Rails for Zombies course usefull? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is the Rails for Zombies course on CodeSchool useful?
I am thinking weather it is worth my time, taking it and if it really provides useful resources?
I haven't done any other CodeSchool courses till now. What do you think about the platform? Is it worth paying for other payed courses?
Are there any high quality free online web development courses?
It's meant just to get you excited with the awesome Rails features :)
It will give you the very basics of Ruby and Rails and nothing more.
Actually the framework is much more complicated and time consuming. If you really would like to work with it, that course might be a showcase of some of it's best features.
Anyway it's worth checking it out if you are Ruby or Rails beginner.
The best thing about the current ruby/rails eco-system is there are a multitude of learning resource options out there, and it should't be too hard for anyone to find the ones suited to their needs/aptitude/...
Try out the Rails For Zombies course and a few other CodeSchool courses for free, and decide for yourself if you like them, and want to go for the paid courses.
I am partial to Ruby on Rails Tutorial as the best free resource to learn web development with Rails. The book available for free online. It provides the best introduction to all the concepts & tools involved while working with ruby/rails to build web applications.
RailsCasts - both the free version & the premium version - would be my next recommendation in building up skills.
Take a look at the answers for Best online (free) resources for learning Ruby on Rails? to learn about more alternatives, and pick what works for you.
Quite a few people in the ruby community rave about Why's poignant guide to ruby as one of the best resources to learn ruby, but it didn't work for me. After spending a little time on it, I moved on to Learn to program which turned out to be a perfect fit for my style :-)

Which web development framework is the right one for me? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm a college student trying to make a web community with friends. Although we are not experienced developers by any means, we have taken courses on JAVA and some web programming languages (PHP, JAVASCRIPT, CSS, HTML).
At this point, we need to decide on a web framework and begin learning. I have narrowed down my list to Ruby on Rails and Codeigniter, but I am really not sure why I should pick one over the other.
Thanks in advance.
Pick the one you want to learn and go with it.
I will personally recommend Rails because:
it teaches you a lot of best practices if you do things the Rails Way™
Ruby is a fun, easy-to-learn, expressive language
the community is really big, enthusiastic, and very helpful
there's great books and tutorials available all over the internet
There is nothing like the good framework. It highly depends on, in no particular order :
your skills
your tastes (Yes, it does matter a lot)
your willingness to learn
technical constraints. Your hosting company may support only Ruby or only PHP
...
I personally had the occasion to develop with CodeIgniter and I pretty much enjoyed it. It is light, well documented and leaves you with a lot of freedom.
I also have a good friend for whom Ruby On Rails is the only framework deserving the name of "framework".
If your project is ambitious, a good idea to make your point could be to make a trivial application like a TODO list with both framework and then pick the one that fits your need.
Hope this helps.
If there is no time constraint (as you need to learn both ruby lang and rails framework) and want to know the best practices, i would recommend RubyonRails.
If you have time constraint, then go ahead with Codeigniter. It is easy to learn and well documented.

Ruby or PHP or Php Framework? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I am starting a website and am wondering if I should go with PHP, a php framework, or ruby on rails? I want to make a website fast, easiest and without a big learning curve. I already know a little bit of php and a little ruby on rails...But which would be best?
OK so to clarify more on the topic of what my site will be, It's basically a Classified Ads website that needs to have a user login, ability to post classifieds, and categorizing, and basically anything else a classified website has.
I would put my vote in for Rails. It's easy to get started building a website that requires persistence in a database, and there are many websites that host the framework. I agree with #Squeegy that PHP is great for sprinkling dynamic content into an otherwise static page, but it sounds to me that you want something more involved, so I would go with Rails.
Start with anything you know better.
PHP is great for sprinkling bits of dynamic content into a website. Given your requirements "fast, easiest and without a big learning curve" I think PHP would be ideal.
Now a large and more complex site, that would be much better suited to a framework. But with any framework also comes steep learning curve.
Codeigniter.com, try it out, it rocks.

Ruby on Rails 3 best practices example open source application [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Please advice me some really great Ruby on Rails 3 application which i can use like example of best practices in Rails 3. The idea is i want to have the app on my hdd which i can use like reference when i have any questions how to implement some feature. It could be any blog engine, or app like Redmine does not matter but it should have almost all elements/functionality which is used to have any web application. And it should be done by using best practices from Ruby and Rails 3 point of view.
There are definitely many apps on github to learn from. However a lot of solutions are very unique for particular contexts and everyone is always at some stage in their learning. Even in the best apps you should be able to find plenty to disagree with.
Here's a list of a few notable ones.
This is rubygems.org, strong community effort, has a lot of neat practices: https://github.com/rubygems/gemcutter
This project isn't necessarily best practices, but it's so loud and has so many people involved in working out all kinds of initially-written crap, that it may shape into something interesting: https://github.com/diaspora/diaspora
This is a popular e-commerce rails app for you to build upon. Haven't read the code, but again, it's pretty popular, which means, well supported by community: https://github.com/railsdog/spree
For more check out awesome github's explore page: https://github.com/explore.
P.S. Bucketwise is a Rails2 app created by Jamis Buck (of 37signals and Rails core). It's still worth watching even if you're looking for Rails 3 insights.
I like the Getting Started with Rails guides. They're not really a complete app, but they are good examples of how things should be done and should be current.
You can also search on Github for Rails apps. The source code should be viewable, and if you have an account you can watch the various projects and see what's new.
Opinions of "best practices" vary widely. I would just read a ton of rails 3 code on github, and then read a ton more! By reading code, you will learn what is common in the rails world and develop your own best practices.
rails3-devise-mongoid is a good one
as is ror_ecommerce

Getting Started with IronRuby on Rails [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Can somebody point me to a tutorial and/or Getting Started document to get IronRuby running Rails? I'm particularly interested in a detailed, step-by-step reference, not general guidelines.
IronRuby already 'runs' Rails today. We demo'd it running Rails back at RailsConf 08. That said, we have a lot of fit and finish work to do on IronRuby to get it to a state where it can run Rails well.
Where we're lacking right now is:
Startup speed - this is critical for a decent experience when working with Rails - especially if you're running unit tests. Right now it takes 26s to startup Rails.
Working set - we're currently at 100MB for a 'hello world' Rails app vs. 30MB for MRI.
We're actually doing fine on throughput - once we're compiled things run reasonably well.
We're moving towards an adaptive compilation strategy where we interpret by default and compile the hot spots that we find. This will make the developer experience much better. We will also have an ahead-of-time compilation mode (perhaps in conjunction with NGEN and intelligent caching) down the road which may be better than the adaptive compilation strategy.
Looks like there finally is one:
http://www.ironruby.net/Documentation/Rails
Sorry to disappoint but I think you'll have to write the tutorial yourself. Unless I've missed something, IronRuby doesn't run Rails yet, although they've demonstrated some aspects running.
According to the IronRuby home page they're at about 71% complete on the RubySpecs core package, which is probably still some way from enough to go from rails <projectName right through to ironruby script/server
When IR runs Rails, I think we may hear about it. Or rather, we may have to shut ourselves in isolation chambers to avoid hearing about it...
Here are a couple of nice "step by step", for beginners: http://www.ironruby.net/Samples_and_tutorials

Resources