** Day 14 of Calendar Planning 2020 ** It's been about 3 months since I started studying programming, so I will leave a note of what I learned in the article as an output. I would be happy if I could help anyone entering the world of programming. Please let me know if there are any words that are wrong, wrong, or misunderstood ^^ I'm sorry if it's hard to read the words for a long time. I will do my best to get used to it little by little.
Ruby on Rails is based on the idea of MVC
.
M: Model
V: View
C: Controller
It makes it easier to maintain the program by dividing the roles into each, and it is less likely to affect when working with multiple people.
Model
Where to handle application data. It plays a role in processing such as registering, acquiring, updating, and deleting data in the database.
For example I think it's an image of managing a huge warehouse called a database. It feels like it retrieves and stores the information you need when you need it.
View
This is the part related to the screen of the personal computer. This is what the user sees. A place to assemble HTML to be displayed in the browser.
For example Is it the image of a deliveryman? Feeling of delivering what you ordered to the customer We will not deliver what the customer does not ask for
Controller
A place where Model and View are controlled in an integrated manner. When the user clicks the page he wants to see, the Controller first receives it, works with the Model to pull out the necessary information from the database, and controls the flow of displaying it using the View.
For example Image like a command tower Feeling like receiving an order from a customer and instructing the huge warehouse to work smoothly, or instructing a delivery person to deliver other ordered items from the warehouse to the appropriate place next time
I intended to explain while conveying the image, but it was difficult ^^; One thing I can say is that the role is clear, so it's good that it doesn't get complicated. What's not working when I'm writing an application and stumbling? Where is it stuck? It's easy to discover if you understand this structure!
Click here for some of the sites that are illustrated Reference site 1 Reference site 2
Recommended Posts