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.
15c43b9d84557e8547eea759ee3ba016?d=identicon&s=25 Victor Fan (victorfan)
on 2006-05-26 16: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
15c43b9d84557e8547eea759ee3ba016?d=identicon&s=25 Victor Fan (victorfan)
on 2006-05-26 17: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
56493a3c223a155bbe2b44bdf55ef184?d=identicon&s=25 Mike Oligny (Guest)
on 2006-05-26 17:18
(Received via mailing list)
On 26-May-06, at 9:50 AM, Victor Fan 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
15c43b9d84557e8547eea759ee3ba016?d=identicon&s=25 Victor Fan (victorfan)
on 2006-05-26 17:29
Mike Oligny 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 Development with Rails right now but
kindda confused about it.

Victor
56493a3c223a155bbe2b44bdf55ef184?d=identicon&s=25 Mike Oligny (Guest)
on 2006-05-26 17:33
(Received via mailing list)
On 26-May-06, at 10:29 AM, Victor Fan wrote:

> In fact, I am reading Agile Web Development 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".  (:
15c43b9d84557e8547eea759ee3ba016?d=identicon&s=25 Victor Fan (victorfan)
on 2006-05-26 17:38
Mike Oligny 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
Db9dcf7ca8674191cb626f1079d64914?d=identicon&s=25 Mike Oligny (Guest)
on 2006-05-26 17:43
(Received via mailing list)
On 26-May-06, at 10:31 AM, Mike Oligny 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
15c43b9d84557e8547eea759ee3ba016?d=identicon&s=25 Victor Fan (victorfan)
on 2006-05-26 17:47
Mike Oligny 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
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (Guest)
on 2006-05-26 20: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.