Wow. Such asynchronous. Many angles.
Well, it's been a while Tumblandia. It feels good to be back wielding doge memes. Â
For a while I’ve been wondering how the hell so many sites these days feel so quick and smooth. I think I finally found the answer: JavaScript frameworks.
 What is a JavaScript framework you ask? Let me explain…
When I first began learning about how websites work, I kept hearing the terms Model, View, Control. MVC, MVC, MVC. The way that these things work together in a traditional server-based application is an interesting process that took me quite a while to fully understand. Basically the idea of the MVC is to separate your bulky data from the flow of your route requests from the view that your users ultimately get to see. Your Model(s), often existing in their own files in a folder called “lib” are prototypes of all the data entities that you have in your database. They communicate between your database and the language you’re writing your app in (Ruby, Python, etc…) and ultimately hand stuff over to the Controller, which exists in a separate file. The controller then possibly does some stuff with that data (although not too much stuff because, well, putting a ton of logic in your controller is just bad practice) and then hands that data to the View (usually in ANOTHER file in another folder), which is HTML in which you can embed the data that you are handing to it.
A lot of handing off, eh? What this results in is an application that allows you to communicate with your server using HTTP requests. These are like handshakes that your browser has to make every time you want to see a new page on a website. It’s often the equivalent of clicking on a link on a page that leads to your browser to another page on the same website.
 JavaScript can often be used to make this way of navigating a server-heavy application a bit easier using things like AJAX, which make requests to a server asynchronously. This means that content can be loaded to a page without that page ever having to refresh.
But what if there was a world in which navigating through your application never required making any of these clumsy requests? What if when you search for something on a website, the content you were searching for appeared below dynamically (like the suggestions that google gives you whenever you google something). THIS is where a JavaScript framework like Angular.js can come in handy.
 Angular.js works in such a way that your Models and your Views are no longer separated.
 Here is a super useful diagram of how this scoping with ng attributes might work.
 Using other Angular.js HTML tags, you can iterate over your models by declaring ng-repeat on any element that you want to be made for every object in your model that you want to display to the view.
Using only attributes on the elements of a DOM and some nifty JavaScript, you can make an entire MVC layout. Pretty amazing huh?Â











