All you really need to get started is to get your first scaffold
created.

As already mentioned the ruby on rails guides are absolutely
excellent.  Congrats to those who wrote them by the way.

If you follow through the getting started guide

http://guides.rubyonrails.org/getting_started.html

Once you have your first scaffolded resource, you are good to go.
Tweak it and try different things:

You can decide where to start tweaking.  The most visible place to
start is to adjust the views to checkout your ability to create good
html.  Make sure you have a reasonable understanding of html and css
etc.

Then go into applying some changes into the model and controller to
effect some differences.  You might like to set up pagination etc.

Once you have done some tweaking, you can then go on and create your
own scaffolded resource.

One of the things that took a while before the penny dropped, was
using the api.  Initially these look a bit heavy, and not very
appealing.  Initially it seems like you may never find your way
around.  But you will soon get a feel for the key classes that contain
the main stuff you need.

The other things that took a while to twig, were
 - identify the difference between Ruby and Rails.  Ruby is very
object oriented and as such is very extensible.  Rails therefore is
made up of Ruby classes, and you will be using a combination of basic
Ruby methods along with those provided by Rails.  Often I would find
something in an example in a forum or tutorial, but couldn't find it
documented.  This was because I was looking in the rails api when I
should have been looking in the Ruby api and vice versa.
- some of the methods you are using may also be in gems or plugins so
you may need to look at the specific gem or plugin docs too.  All this
seems obvious when stated, but was hard when I started.

You will find lots of discussions about the "Right" way to to do
things particularly in the area of keeping your business logic in the
model and not polluting the controller with lots of code.  Another
area that gets lots of debate is the Restful routing.

My advice about these things is to be aware of them, but don't get too
hung up on them in the early stages.  Just get on and make things
work.  When I started I put loads of code into the controller because
I hadn't worked out how to build it into the model.   It soon becomes
apparent thought that this is not the best way to do things and when
you start to move that code into the model it is extremely
satisfying.  Later you will find code that you put into the model that
maybe didn't belong there and you can find other places to put it.

The great thing about Ruby and Rails though is that it is a very
forgiving language.  If something works - it works and that is great.
As you get more experienced you will look back and see better ways of
doing things.  For a period, I started to find when I added
functionality to my early code, I actually ended up with less code
than I started with even with the enhancement included.

For me, the this forum itself has been and continues to be an
extremely valuable resource.  There is virtually no question that you
might have that wont have been answered here already.  Since the
search is a google style search in the forum, it is usually easy to
find what you are looking for.  What I do is just type my whole
question such as "how do I ......." into the search and very often get
the answer I want.

Reading books is great, and I come from a prehistoric era where
computer time was so limited that you took the manuals home and read
them cover to cover, but that day really has passed.  The amount of
information needed means you cannot just read it all.  The way to go
is to do it and then delve into things you need or don't understand.
The web has really changed things.  I have helped two people get
started with rails, and just doing it is the best way, so start with a
book that will help you do that.   Having said that, I do have a
selection of the books mentioned and they are indeed worthwhile.  You
just have to decide which you need to get started.

hth
Tonypm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to