![]() This file contains the libraries that you’ll need (jQuery, Underscore.js, Backbone.js, and Backbone-localStorage.js) and the placeholders for your HTML and JS code. To get started, download this simple HTML file. Each feature implemented is a new commit, so you can easily see what changed in every step. You can follow along with this tutorial’s code in this repository. After working through these two example apps, you’ll see every Backbone module and have a practical understanding of them. The first example is a ‘Hello World’ app in Backbone, and the second is a ‘to do’ app. This is a fat-free walkthrough of Backbone.js, as simple as possible, with all the code in one file for didactical purposes (no hidden magic tricks, all cards are on the table). This is a practical tutorial that I wished I had it when I started learning. It’s made up of the following modules:Īlright! the way we are going to explore all of these modules is through examples. Just enough to get started with Backbone.jsīackbone.js has a hard dependency on underscore.js and a soft dependency on jQuery. It’s also fully used in production for many big companies like Wal-Mart mobile, Groupon, Khan Academy, Pandora, WordPress, Foursquare, etc.Įdit 2021: ReactJS, Vue.js and Angular are very popular nowadays. However, I chose (in 2012) Backbone because it’s one of the most widely used frameworks in its category. Backbone is not the only framework like this in fact, many JS frameworks offer similar benefits, like Ember.js, Angular.js, RectJS, etc. Enters Backbone.js! It provides structure to organize the code and increase maintainability. The lack of structure makes the code hard to maintain. Examples of this kind of web application are Gmail, Pandora, Pinterest, Nokia Maps 3D, etc.Ī common problem with extensive JS web applications developed is that they can become pretty messy quickly. JS allows websites to render only content that changes without reloading the entire page on every request (e.g., AJAX). ![]() Many of the logic/code that used to be on the server-side is now on the client-side. The user doesn’t need to wait between requests and page refreshes. Web applications nowadays require heavy use of JavaScript to generate content on the fly. However, these require extra plugins and are not as ubiquitous as JavaScript. A couple of languages can run in the browsers besides JS, using Web Assembly techniques or using deprecated Java Applets or Flash. However, providing the website with even more responsiveness, speed, and enhanced user interaction requires bringing the page generation closer to the users (in the browser rather than a remote server). That was a considerable improvement, and most of the pages served today use this approach. Later, in web 2.0, developers started using server-side programming languages (like PHP, Ruby, Java, …) to generate HTML pages dynamically based on user input and data stored in a database. In the beginning, web applications were just static HTML pages, which required programmers to change the code (HTML, CSS, JS) to change the content. The web application development process has been evolving over the years. TL DR: You need to use JavaScript heavily in order to make responsive and interactive web applications. Backbone.js for absolute beginners - getting started (part 4: Routers).Backbone.js for absolute beginners - getting started (part 3: CRUD).Backbone.js for absolute beginners - getting started (part 2: Models, Collections and Views).Backbone.js for Absolute Beginners - Getting started (Part 1: Intro) □ you are here.Let’s dive into BackboneJS! And see how this flexible library can bring order to your Javascript! Follow my AngularJS tutorial series for a framework solution. Libraries give you a lot of flexibility, while frameworks have opinionated ways of doing things but can save you from writing boilerplate code. ![]() Using a library, YOU are in control, but there is an inversion of control using a framework: the framework calls you. ![]() Notice that BackboneJS is not a framework but a library. Backbone.js is a JavaScript library, among many others, that is gaining special attention in the web development community because of its ease of use and the structure that it provides to JavaScript applications. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |