Forum: Ruby on Rails What is the different between Scaffold / Controller / Model

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Victor F. (Guest)
on 2006-05-26 18:50
Hi everyone

I am learning RoR now and got a question.
What is the different between using ruby script/generate <Table>
Scaffold / Controller / Model?

Thank you

Victor
Victor F. (Guest)
on 2006-05-26 19:10
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
Mike O. (Guest)
on 2006-05-26 19:18
(Received via mailing list)
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 <Table>
> 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
Victor F. (Guest)
on 2006-05-26 19:29
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
Mike O. (Guest)
on 2006-05-26 19:33
(Received via mailing list)
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".  (:
Victor F. (Guest)
on 2006-05-26 19:38
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.  :)

Victor
Mike O. (Guest)
on 2006-05-26 19:43
(Received via mailing list)
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
Victor F. (Guest)
on 2006-05-26 19:47
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:
>
> 	http://en.wikipedia.org/wiki/Ruby_on_rails

Cool! That's exactly what I need!

Thankz again :)

Victor
Chris H. (Guest)
on 2006-05-26 22:16
(Received via mailing list)
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.

http://en.wikipedia.org/wiki/Model-view-controller
This topic is locked and can not be replied to.