Posts

Showing posts with the label controller

CRUD Basics

Image
Greetings of the day!!! In this article,   you will see several concepts   which are important for the design of Rails applications.   These concepts will affect the way that we work with URLs,   how we write controller code,   and how our controllers manage our models and database data.   We're gonna start by talking about the concept of CRUD.   Let's begin with reviewing the MVC web architecture diagram.   You must learned how to use controllers and views   to create dynamic pages and return them back to the browser.   Next, learned to interact   with the database by creating models and associations. MVC Architecture And worked with those, not from a browser,   but via the Rails console would be feasible.   Now, we need to put the two together   and learn how to work with the models   inside our controllers.   Then we'll be able to manipulate   our database data from the browser, ...

MVC Architechture

Image
Understanding MVC Architecture The Ruby On Rails Framework   uses an MVC Architecture.   It's a fundamental part of how the framework is structured   and it is designed to help us not repeat ourselves.   MVC is a fundamental aspect of rails,   which is important to understand right from the start.   M, V, and C.   The 'M' stand for  Model ,   the 'V' stands for  View ,   and the 'C' stands for  Controller .   The Model refers to the data objects that we use.  It's the object-oriented approach to design. Many things can be objects in our models   but the data in our Database   will be the most common type of object   that we'll put there.   The View is the presentation layer .   It's what the user sees and interacts with.   The web pages, the HTML, the CSS, the JavaScript.   The  Controller processes and response   to user events .   Such as clicking on links and...