Traditionally,
the model section is where the majority of your business logic code would be; the view is where
your user interface code would be, and the controller code primarily deals with the communication
between the model and view. Rails MVC implementation is a little bit different. With Rails,
the model section is generally your Active Record classes and other data-descriptive or datacommunication
code. The view section remains primarily for the user interface, which tends
to be a heavy dose of HTML in most Rails applications. The controller also handles the communication
between the models and the views; however, it also tends to host a larger part of
the business logic than traditional MVC systems might.
Since we are focusing on Active Record and not Rails throughout this book, we won??™t spend
too much time on MVC concepts or details. From strictly an Active Record developer??™s point of
view, it doesn??™t really matter where our code is located or how it??™s sectioned off. But the MVC
design is worth knowing about when you plan to build programs of any serious size.
Pages:
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55