David, that’s a very insightful and well worded response. I like the
carpentry analogy.
Stuart/Dark A.,
I have pretty much a similar background as David (does that make us
average?), and it took me about two months from installing Rails for the
first time to getting a small app into production. But at least a week
or so of that time was spent dealing with things not directly related to
the Rails framework like getting my web host configured properly and
getting an SSL cert installed correctly, and some more time was spent
working with the customer to gather requirements.
I think the people who love Rails the most, the people who are always
raving about how great it is, are folks with a lot of experience working
with similar types of frameworks in other OO languages like Java and
C#. Those are the people who have been doing the same thing but doing
it the hard way, and using Rails is like a breath of fresh air. To
these folks, a lot of the magic in Rails (like automatic loading of
attributes into model classes, for instance) is a big relief because
before they were having to manage a lot of this stuff themselves, or
relying on complex tools to do it for them. They understand what Rails
is doing at a conceptual level. I think these folks can get to the
point where t hey can write “good” apps in Rails very quickly (“good”
meaning bug-free, easily maintainable, cleanly designed code).
Then there are the folks who are coming from the other direction, who
are taking a step up from procedural programming (like PHP 4) or just
getting into web development for the first time, and Rails is attractive
because they can create a lot of things very quickly. But a lot of the
magic may initially be a stumbling block because there are so many
things that just happen automatically and there are a lot of
conventions, and it’s not so easy just to look at the source code and
understand what’s going on. I am guessing this is where you are right
now. I think you will just have to keep plugging away until you get all
that stuff into your head, but it may take a while.
Something that I think many people are not prepared for when jumping
into Rails (and Ruby) is that is that it does some rather sophisticated
things that are new even to many experienced OO developers. Learning
how to put together an app in Rails is relatively simple, but I think
there’s a steep learning curve to really understanding what is going on
behind the scenes. (When things go wrong, knowing what goes on behind
the scenes will make all the difference).
A good analogy is understanding how sessions work (whether in PHP or
Rails or whatever). You can tell a new web developer that they can just
stuff something into a session and it will be there in the next request,
but they won’t REALLY get it until they understand that HTTP is
stateless, and that there are things called cookies stored in the
browser, that sometimes you can use URL rewriting or hidden fields, and
that sessions are an abstraction on top of all that stuff.
To get to the point where you can grok all the magic behind Rails, you
really have to first spend a lot of time doing homework and really
understanding OOP at a deep conceptual level. I don’t think it will
happen from just writing apps using Rails. If you want to dig in and
really make the most of Rails, I’d say first pick up a good book on OOP
and learn the mechanics of OO (objects, inheritance, polymorphism,
abstract classes and interfaces), then learn how to “think in objects”.
Applying UML and Patterns by Craig Larman is supposedly one of the
best books for this. Then pick up Agile Software Development:
Principles, Patterns, and Practices by Robert C. Martin and
Refactoring by Martin F… If you really understand the contents
of these two books inside and out, then you can try out for your first
degree black belt in OOP.
Sorry about the long-winded response. I hope it is helpful.
Ken