Essential Tools for Starting a Rails App in 2013
petekeen.net
petekeen.net
I could flip a coin on whether SimpleForm is still useful or not. I tend to find myself fighting with its method signatures so I don't really like it.
All in all, Rails has grown since these gems were created. Use the new facilities that Rails provides as well as some OO design to solve problems. It's much better than including fat gems like the three I mention above into your code base.
I guess I view Rails as a tool with which to get things done, and usually rolling my own login or auth system is not within scope of the work I want to get done. I'd rather just use something off the shelf and proceed with the itch I want to scratch. You also get the benefit of lots of eyes on that part of your code base, which means bugs get found and fixed more quickly.
I still don't get why people use these form helper gems. In every single project I've worked on that used them, we've spent more time fighting them in complex cases than we saved in potentially repetitive simple cases.
I still don't get why people use these form helper gems.
We recently rewrote the views for one of our Rails apps and we used SimpleForm with its Bootstrap wrappers. We compared some of the new form views to the old views, and the new views had around 80% less code. we've spent more time fighting them in complex cases
A form builder need not be used for every form. Most of our forms use SimpleForm, but not all of them do.I agree that Devise is heavy and hard to extend but when we're considering such a fundamental like auth, you have to have a pretty good reason to deviate from the time tested popular choices.
Maybe you can write a lighter auth class, but can you write a more secure auth class? If devise has a vulnerability, there are tons of other sites out there "watching your back" and could report the vulnerability. If you roll your own, how are you going to aggressively audit its security?
I was amazed and impressed at the time. Now that same statement would totally set off red flags and he'd be a non-hire (unless I could personally audit the code).
Maybe he provided more syntactic sugar so his implementation was easier to work with? And if that's the case, why not just build on top of the standard implementation? But if he claimed a performance increase, is that for the general case or for some specific case he was coding for?
Deviating from the standard library is a bold claim that has to be backed up by a code audit.
* The better_errors/meta_request/binding_of_caller combo for error pages with in-browser REPL and for Rails Panel chrome dev tools tab
* foreman for launching processes
* pry as a debugging tool
* lograge/quiet_assets for cleaner log files
As the project author, I will not include simplecov here, but I would normally drop that in there too ;)
Asking because I wrote it .. giggle :)
ps. Using Michael Hartl's Ruby on Rails Tutorial [6], and Ryan Bates's RailsCasts, I was able to go from zero knowledge about rails, to implementing CRUD apps [7] in a couple weeks. As a side note, I things these two resources show the power of internet/distance learning.
[1] http://railscasts.com/episodes/209-devise-revised
[2] http://railscasts.com/episodes/358-brakeman
[3] http://railscasts.com/episodes/234-simple-form-revised
[4] http://railscasts.com/episodes/366-sidekiq
[6] http://ruby.railstutorial.org/
[7] http://en.wikipedia.org/wiki/Create,_read,_update_and_delete
Some of my favorites:
figaro[1] Alternative to dotenv, awesome mascot.
rack-mini-profiler[2] Often folks will say to save performance tuning until the end. I find having this around from the get go makes it much easier to do as you move along.
I love sidekiq though. Probably the best on the list. Background queues are essential to most, if not all Rails applications. The goworker post from today looks interesting too.
[1] - https://github.com/vially/fish-config/blob/master/modules/au...
* CanCan for authorization (it also integrates nicely with devise)
* webmock for testing (because sooner or later I always end up with some slow network call in tests)
* exception_notification for email notifications
* state_machine for, well, state machines
* pg_search for simple postgresql searching
* premailer-rails for html emails
* whenever for cron jobs
* backup for a backup dsl, useful with whenever
Bcrypt-ruby and the built in auth stuff because I find Devise too inflexible.
strip_attributes to clean up user inputs
VCR to speed up tests involving 3rd party services
foreman to control processes and automatically support dotenv.
I think it can be hard to accurately judge the value of something as focused as a book that is so specifically targeted.
In particular, I feel like the book gets you to a complete end to end Rails+Stripe.js system much much faster than I could have cobbling everything together myself.