Category Archives: JQuery

Wrapping $.ajax In A Thin “Command” Framework For Backbone Apps

A large number of my recent client applications, built on Backbone, have been using straight jQuery AJAX calls. Sometimes its in combination with Backbone’s persistence method, but other times I end up using AJAX calls in place of Backbone calls. … Continue reading 

Also posted in AJAX, Backbone, Semantics, Underscore | 6 Comments

Managing A Modal Dialog With Backbone And Marionette

My current client project is using Twitter Bootstrap, and I have to say I’m loving it. It provides a simple way to get started with common layout and design elements, and includes a handful of UI widgets and features that … Continue reading 

Also posted in Backbone, DOM, Javascript, Marionette, Twitter Bootstrap | 29 Comments

JavaScript Performance: Pre-Compiling And Caching HTML Templates

If you’re using HTML templates with a JavaScript application, you need to be caching the template’s raw text and/or pre-compiled version of the template. All of this spawned from a fun thread of discussion on a StackOverflow question. DOM Selection … Continue reading 

Also posted in Backbone, DOM, Javascript, Marionette, Performance | 7 Comments

Composite Views: Tree Structures, Tables, And More

One of the more recent features that I added to my Backbone.Marionette framework is the CompositeView. It’s actually been in the code for a while now, but in a recent version I extracted it out of the CollectionView and in … Continue reading 

Also posted in Backbone, Composite Apps, Design Patterns, Javascript, JSFiddle, Marionette | 23 Comments

Providing Synchronous / Asynchronous Flexibility With jQuery.when

I’ve quickly become a fan of jQuery’s Deferred / Promise features. They’ve been around for a little bit now, but I only recent started using them and they’ve helped me solve a number of problems with my asynchronous JavaScript code. … Continue reading 

Also posted in Async, Backbone, Javascript, Marionette | 8 Comments

TrafficCop: A jQuery Plugin To Limit AJAX Requests For A Resource

A while back, I wrote about asynchronous template loading for Backbone applications. At the bottom of that post, I showed some code that I wrote which would limit the number of AJAX calls that are made to the server, to … Continue reading 

Also posted in Async, Javascript | 4 Comments

Resizing KendoUI Splitter To Fill Screen Vertically

I dropped the jQuery.Layout plugin in favor of KendoUI’s Splitter control yesterday. Kendo’s Splitter is just so much easier to use and more flexible. It was a no-brainer for me, really. But I ran in to a problem: how to … Continue reading 

Also posted in Javascript, JSFiddle, KendoUI | 1 Comment

Handling DOM Events With EmberJS Views And Controllers

Hot on the heels of picking up Ember and starting to learn it, I think I’ve actually learned something useful! I certainly hope I have, at least. Otherwise, I’m going to be in trouble soon. In my EmberCloneMail app, I … Continue reading 

Also posted in DOM, Ember, Javascript, Model-View-Controller, Model-View-Presenter | 9 Comments

Using jQuery, Plugins and UI Controls With Backbone

Most Backbone applications either use jQuery or Zepto as their DOM manipulation of choice. I tend to use jQuery as it’s supported across more browsers and has more features – though it is a little heavier in terms of download … Continue reading 

Also posted in Backbone, DOM, HTML5, Javascript, KendoUI, Marionette, Telerik, Tools and Vendors | 8 Comments

Asynchronously Load HTML Templates For Backbone Views

UPDATE: It turns out this is a really bad idea. Don’t async fetch individual templates. In the end, having done asynchronous fetching of individual templates on a few productions apps, it’s a really bad idea. The network latency and multiple … Continue reading 

Also posted in Async, Backbone, Javascript, Marionette, Principles and Patterns, User Experience | 29 Comments