What is the different between Scaffold / Controller / Model

Hi everyone

I am learning RoR now and got a question.
What is the different between using ruby script/generate


Scaffold / Controller / Model?

Thank you

Victor

In my understanding,

Calling ruby script/generate scaffold will generate the controller,
model and the view automatically.

Then the different between controller and model is that controller is
responsible to interact with the user, and the model is using to store
the state of the application.

Is this the correct interpretation?

Thank you very much

Victor

On 26-May-06, at 9:50 AM, Victor F. wrote:

Hi everyone

I am learning RoR now and got a question.
What is the different between using ruby script/generate


Scaffold / Controller / Model?

There are entire books dedicated to answering this question.

Have you tried following one of the many online Rails tutorials?

http://rubyonrails.org/docs

On 26-May-06, at 10:29 AM, Victor F. wrote:

In fact, I am reading Agile Web D. with Rails right now but
kindda confused about it.

Have you followed through making the sample Depot application in that
book?

Try and forge ahead even if it doesn’t all make sense immediately - I
assure you it will eventually “click”. (:

Mike O. wrote:

Have you followed through making the sample Depot application in that
book?

Try and forge ahead even if it doesn’t all make sense immediately - I
assure you it will eventually “click”. (:

Thankz Mike, I will continue the tutorial in the book then. :slight_smile:

Victor

On 26-May-06, at 10:31 AM, Mike O. wrote:

Have you followed through making the sample Depot application in
that book?

Try and forge ahead even if it doesn’t all make sense immediately -
I assure you it will eventually “click”. (:

By the way, I’m not trying to discourage you from asking questions
here - it’s just that your question was very broad and a lot of
people have already taken the time to write out very detailed
explanations / tutorials on Rails fundamentals. If the Agile book
isn’t doing it for you, take a break and try a different source
maybe, or work out some specific questions to ask here.

Wikipedia has a fairly concise description of Model / View /
Controller that might help you:

http://en.wikipedia.org/wiki/Ruby_on_rails

Mike O. wrote:

There are entire books dedicated to answering this question.

Have you tried following one of the many online Rails tutorials?

http://rubyonrails.org/docs

Thank you Mike

In fact, I am reading Agile Web D. with Rails right now but
kindda confused about it.

Victor

A scaffold in the RoR sense is a minimal framework created by RoR (if
you
choose) for you to expand upon. it gives you basic CRUD (create, read,
update, delete) abilities.

you can’t really understand controller and model without understanding
the
MVC pattern, which is model-view-controller.

Mike O. wrote:

By the way, I’m not trying to discourage you from asking questions
here - it’s just that your question was very broad and a lot of
people have already taken the time to write out very detailed
explanations / tutorials on Rails fundamentals. If the Agile book
isn’t doing it for you, take a break and try a different source
maybe, or work out some specific questions to ask here.

Wikipedia has a fairly concise description of Model / View /
Controller that might help you:

Ruby on Rails - Wikipedia

Cool! That’s exactly what I need!

Thankz again :slight_smile:

Victor