![]() With Backbone views, JavaScript takes a data and displays it onto a web page. Backbone also uses views to display the data. Models will contain all the information about this group. So in this course we'll be creating a web application that stores data about a group of flowers. Where MVC has three distinct decoupled components, Backbone has six. Speaking of components, this brings up the second difference that Backbone has from traditional MVC. For this version, the older controller functionality has been moved to other Backbone components. It did in earlier versions, but not in the version that I'm using for this recording. First, Backbone doesn't have a separated out controller component, like MVC does. Backbone is based on MVC, but it doesn't follow the strict definition we just discussed, and differs from traditional MVC in two important ways. The decoupled MVC pattern helps us avoid all these problems and instead allows us to create a nice, tidy code base. Which leads to not only inefficient, slow-performing code, but also code that's almost impossible for someone else to read and understand, if they need to make changes to it themselves. It's very easy to create one long file of sloppy code all mixed together in a huge mess. As we can see, MVC breaks code out into three distinctive parts, with each part having a distinct responsibility, a process commonly referred to as decoupling. Its job is to transport model data over to the view. And the C stands for controller, which is the bridge between the model and the view. The V stands for view, which displays model data on whatever graphical user interface is available, like a computer screen. The M stands for model which is a part of the code that contains the applications data. With MVC, code is broken down into three separate components. But, that's a lot to say, so it's commonly referred to as MVC. It does this by basing itself on what's known as the Model View Controller design pattern. Backbone is a lightweight JavaScript library that lets you organize your code in a neat, clean and efficient manner. But there really is one word that describes it perfectly. MVC, getting your truth out of the dom and spa, just to name a few. When people talk about backbone, they use a lot of different words and phrases to describe it.
0 Comments
Leave a Reply. |