Development on Va...
Follow
Find tag "Backbone.js"
9.3K views | +7 today
Development on Various Platforms
Your new post is loading...
Your new post is loading...
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Single Page Application performing database CRUD operations using Backbone and ASP.NET WebAPI

Single Page Application performing database CRUD operations using Backbone and ASP.NET WebAPI | Development on Various Platforms | Scoop.it

This tutorial is about creating a Single Page Application using Backbone and performing database CRUD (Create, Read, Update and Delete) operations using ASP.NET Web API as a RESTful service.

Contents list of this article:

Short description of Single Page Application.Short description of Backbone.Short description of ASP.NET Web API.Sample Single Page Application using Backbone and Web API.
Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Prerender - AngularJS SEO, BackboneJS SEO, or EmberJS SEO

Prerender - AngularJS SEO, BackboneJS SEO, or EmberJS SEO | Development on Various Platforms | Scoop.it

Allow your AngularJS, BackboneJS, or EmberJS apps to be crawled perfectly by search engines.

How it works:
* The Rails or Node middleware inspects the user agent of each request to your app
* If a search engine crawler is detected, the middleware makes a GET request to the Prerender service
* The Prerender service makes a call to your app for the same exact page that the crawler is requesting
* The Prerender service renders the page with all of the javascript using phantomjs
* The HTML of that rendered page is sent back to the middleware in your app
* The middleware then returns that HTML to the crawler


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Building a single-page app, one page at time

Building a single-page app, one page at time | Development on Various Platforms | Scoop.it

In addition to requiring that music is continuously playable, we also must provide server-rendered versions of our public pages – this makes our content accessible to search engines and screen readers, simplifies linking and sharing, and results in faster load times through our cache system. This requirement is a large part why of we avoided earlier solutions like hashbang URLs or iframes, and waited for HTML5 history to be widely available. We also wanted a transition path that didn’t require a full rewrite or a big launch to inaugurate the new version. Building a second version of the app in parallel to maintaining the first was just not an option for our four-person dev team.

These requirements pushed us toward more adaptable technologies and newer libraries. Over the course of several months we began using Backbone.js to manage our models and view logic, Require.js to handle dependencies, and several flavors of Mustache for templating, keeping these updates in the production codebase without radically changing the application or UI. These updates readied us for futher abstraction into a single-page application.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

API-based Web Application with Backbone, Require.js and Slim framework

API-based Web Application with Backbone, Require.js and Slim framework | Development on Various Platforms | Scoop.it

A single-page application (SPA) was something I’ve been exploring for the last few months. I always liked the idea of moving certain responsibilities to the client’s side. After all, why would you like to waste server’s RAM/CPU to buil a HTML page (and pay for a transfer to deliver it) when a web browser is perfectly capable of doing that on its own? You will not only save money but also provide a better user experience. In addition to the performance, moving the presentation layer to the web browser gives a clearer division between back-end and front-end code.

 I used an extremely useful boilerplate for Backbone.js created by Thomas Davis as a foundation to create an example App which talks to a PHP back-end.

The back-end could be a plain PHP but instead I went for the Slim micro framework. It’s fast, very easy to learn and will enforce a better code structure. After all, this is one of the best use cases for a micro framework.



Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Video: Evolving your JavaScript with Backbone.js

Video: Evolving your JavaScript with Backbone.js | Development on Various Platforms | Scoop.it

This presentation looks at several ways to integrate Backbone.js into your WordPress themes and plugins, including a step-by-step demonstration of how Backbone improves the quality of your existing jQuery code. It also walks through other exciting ways to use Backbone alongside WordPress, including how to make a standalone Backbone application that only uses WordPress for its data.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Accessors vs Dirty-checking in Javascript Frameworks

Accessors vs Dirty-checking in Javascript Frameworks | Development on Various Platforms | Scoop.it

One of the many ways in which EmberJS, AngularJS, and BackboneJS differ is in how they treat their models. AngularJS uses dirty checking on Plain Old Javascript Objects (POJSO); whereas EmberJS and BackboneJS both use accessors (getters and setters) on wrapped objects.

We will be exploring the ways in which these two approaches differ, and the implications these differences have when it comes to choosing which Javascript framework we we should write our single page apps in.

Most Javascript frameworks for front end user interfaces used to build single page applications (SPAs) use MV* architectures, and a feature that most of them have in common is the ability for the View to update the Model, and for the Model to update the View.

 

For this to happen, there needs to be to be a means to “listen” for these changes, and then trigger some code to respond to that change. One call this “Two-way Data Binding”.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Refactoring to Backbone.js

Refactoring to Backbone.js | Development on Various Platforms | Scoop.it

Deciding mid-stride to adopt a JavaScript application framework exposes many difficult decisions. What should be targeted first? How does one deal with untested, legacy code? It can make transitions a scary, tedious process.

At Viget, we've found Backbone to be a great tool for bolstering existing code with greater structure and functionality. With an active community and a number of superset frameworks (such as Thorax and Marionette), it gives us flexible tools to tackle current problems with an outlet for more elegant solutions down the road.

We've started to trend towards a series of steps that help to translate code over in a safer, more testable way.

* PULL HTML CONSTRUCTION INTO A TEMPLATE
* BREAK OUT DATA PROCESSING
* FINISHING THINGS UP WITH BACKBONE.VIEWS


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Why I Chose Ember.js

I have finally made the plunge to really dig into Ember.js. But, if you are familiar with the vast landscape of Javascript frameworks, you may wonder why I chose Ember.js. This isn't a light decision and Ember.js is thought to have quite a steep learning curve. However, I think that there are some reasons behind this that I will cover in a later post.

So to start, let's look at the various frameworks and my own relations to them in my track to eventually set upon Ember.js.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Backbone and Ember

Backbone and Ember | Development on Various Platforms | Scoop.it

Ember and Backbone are both promising JavaScript frameworks but have completely different philosophies. In this post, I'll compare the two, both from a practical and philosophical perspective. I'll defer to real world experience with Backbone and SproutCore (Ember's predecessor), as well as basic experiments with Ember (full disclosure: haven't built a large Ember app yet).

So we have a roughly apples-to-apples comparison. Let me dive in and talk about some philosophical differences:..


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Complex Single Page Application Architecture with Backbone

Complex Single Page Application Architecture with Backbone | Development on Various Platforms | Scoop.it

Over the past few months we've been developing the 2nd (and much improved) generation of the SOOMLA dashboard.  Though we use myriad front-side technologies, the jewel in the crown is Backbone.js.  Much has been written about Backbone, though still I find that most articles focus on HOW-TOs of models, views and events.  In this post, I’ll describe our dashboard’s Backbone architecture, with an attempt to zoom out a bit and understand the fundamentals of building complex, heavy single page applications (hereinafter SPA) with Backbone.  Disclaimer: this post is not about code, but about architecture concepts.  Therefore, the code examples won't be detailed to the bits and bytes, but they are all documented sufficiently to understand the idea.

We use:
* Require.js for dependency management and modular code.
* Backbone.js - for basic application structure and separation of concerns.
* Marionette.js - for composite application architecture and saving lots of Backbone boilerplate.
* underscore.js for general object, array and function utilities.
* undescore.string for extended string manipulation functionality.
* Handlebars.js - for client side templating.
* jQuery for DOM manipulation, AJAX, promises, and much more.
* These jQuery plugins: Qtip, SlimScroll, Isotope, jQuery UI sortable and jQuery validations.
* imagesloaded - for capturing and synchronizing image load events.
* Less - for CSS pre-processing.
* grunt.js - for build automation (tasks like pre-compilation, minifying and concatenating code).

 


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Scaling Isomorphic Javascript Code

Scaling Isomorphic Javascript Code | Development on Various Platforms | Scoop.it

Design patterns are the bread and butter of application development. They encapsulate and outline the concerns of the application and the environment of the in which it exists. Between the browser and the server these concerns can vary widely:
* Is the view ephemeral (e.g. on the server) or long-lived (e.g. in the browser)?
* Is the view reusable across different use-cases or scenarios?
* Should the view be annotated with application-specific tags or markup?
* Where should the bulk of the business logic reside? (in the model? in the controller?)
* How is the application state persisted or accessed?
Lets explore some of the existing patterns and how they answer these questions:
* Model-View-Controller
* Model2
* Model-View Presenter and Model-View-ViewModel
* Modern Javascript Implementations
* Real-time Implications
* tl;dr? Introducing Resource-View-Presenter
* Conclusion


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

The wondrous world of JavaScript

The wondrous world of JavaScript | Development on Various Platforms | Scoop.it

If you’re following the latest trends in the web development world, you might have noticed that the last years the popularity of JavaScript increased a lot. Lots of frameworks became popular like Google’sAngularJS, ember.js and of course Backbone.js.

One of the first of these “big” frameworks was Backbone.js. JavaScript code before that time was usually unstructured, contained a lot of spaghetti code and was hard to maintain.
Backbone.js gave you the possibility to follow the MVC (Model-view-controller) design paradigm, or in their case, MVP (Model-view-presenter).

Backbone.js gave you the possibility to divide your application in logical parts andprovided data binding. Only that wasn’t enough of course, because applications needed more components like:
* A module system
* Templating
* Data binding
* Data synchronisation
* Widgets
* Testing framework

And so, other frameworks were born, like: RequireJS, CommonJS, Component, AngularJS, Twitter Bootstrap, Flight, Hogan.js, QUnit, Jasmine, … (and I can probably go on for another hour).


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Why Angular, Ember, or Backbone don't work for us

Why Angular, Ember, or Backbone don't work for us | Development on Various Platforms | Scoop.it

Moot is a special discussion platform with ambitious goals. While the server side is fanatically optimized for performance, the client has its own goals: simple API, small size, and quick release cycle. The code is written from scratch and is split into more than 50 files. A client side framework such as Angular or Ember were out of the question.

Here's why.

* API first
* Small size
* Full control
* Special needs
* Technology lock-in
* Why not Angular?
* Why not Ember.js?
* Why not Backbone.js?
* But jQuery leads to spaghetti, right?
* The results


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

OJ - A JavaScript library to build websites with objects.

OJ - A JavaScript library to build websites with objects. | Development on Various Platforms | Scoop.it

OJ is a JavaScript library with the goal to make objects that create and live edit the web.

When making a website you have to keep in mind HTML, CSS, and JavaScript code. In OJ, all three parts are unified into objects. OJ can render to HTML and CSS as well as bind JavaScript events.

The benefit is that OJ objects have no dependencies. There is no need to read the docs to be sure the HTML is correct, or see if the CSS is included. Everything just works.

* Abstracts the web into view objects that create and change websites
* Unifies templating of HTML, CSS and JS
* A library written entirely in JavaScript
* Backbone support built-in with two-way model and collection binding
* Includes the simple smart objects: List, Table, Button, and form elements
* A growing collection of plugins: VimeoVideo, AceEditor, and more!
* DOM manipulation client-side
* HTML and CSS creation server-side
* Node server-side support (in progress)

 

 


Via Jan Hesse
more...
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Part 2: Backbone.js Deconstructed

Part 2: Backbone.js Deconstructed | Development on Various Platforms | Scoop.it

In part 2 of Backbone.js Deconstructed, we will be examining the meat of Backbone. The meat being Backbone, views, models, and collections. Equipped with the knowledge conveyed in part 1, you should be adequately prepared to get intimate withBackbone.View, Backbone.Model and Backbone.Collection constructors and corresponding object instances. Before we begin, I am going to lay out my strategy for discussing the meat.

While it is common that most efforts to teach Backbone start with learning about models, I actually think this prohibits learning. I believe once the peripheral parts are understood, the easiest path for grokking Backbone starts with the view. I strongly suggest a mastery of views before you attempt to populate a view with data (i.e. models or collections of models) and eventing the view to stay in sync with the data. The plan is to first examine views, then models, then collections in that order. Once each of these parts are understood, we will take this knowledge and use it to examine a small and contrived contact's application. Don't be afraid to examine the application first, In fact I recommend it, as it will give some a helpful context before reading sections 2, 3, and 4.

1 - Article Overview
2 - Backbone.View
3 - Backbone.Model
4 - Backbone.Collection
5 - Building A Simple Contacts Application
6 - Conclusion


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Structuring Applications with JavaScript, Backbone and WordPress

Structuring Applications with JavaScript, Backbone and WordPress | Development on Various Platforms | Scoop.it
A talk on using Backbone to structure your JavaScript code within WordPress themes and plugins, delivered at WordCamp Chicago in June 2013

Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Rendering A Filtered Backbone.Collection

Rendering A Filtered Backbone.Collection | Development on Various Platforms | Scoop.it

Displaying a list of items is one of the most common tasks in any application - and JavaScript and Backbone.js apps are no exception.

Backbone generally makes these two tasks easy. It provides the concept of a Collection to manage a list of items, and you can assign a collection to a View instance for display. But what happens when you need to filter that collection, and only display a subset of what it contains? And what if that sub-set changes when a user selects certain options or types something new in to a search box?

Filtering an in-memory collection is simple, sure. The collection has built in methods to do this. But filtering a collection and then rendering the results can create some unexpected challenges. The journey to find simple and clean code can be unexpectedly difficult.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Unsuck your backbone // Speaker Deck

Unsuck your backbone // Speaker Deck | Development on Various Platforms | Scoop.it

Backbone.js is a popular, super lightweight JavaScript framework which helps you structure your code MVC style. If you're building JavaScript applications of any reasonable size, you might have heard of it and you might have even given it a try. But if you have used it in anger, then you may have found that a backbone only gets you so far. As your application gets bigger, so does the complexity of your boilerplate code and structure. Let's kick this complexity to the curb, and string up our backbone on a marionette(.js).


Via Jan Hesse
more...
No comment yet.