3.2 $.Controller - Templated Event Binding
JavaScriptMVC 3.2 brings a lot of great features and enhancements. So many features that changes to $.Controller didn't make the cut for our upcoming 3.2 article. This article reviews 3.2's $.Controller and talks about templated event binding (something we neglected to write up for 3.1).
Continue readingDeferreds and 3.1
jQuery 1.6 brought Deferred support. They are a great feature that promise to make a lot of asynchronous functionality easier to write and manage. But many people struggle with uses other than 'waiting for a bunch of Ajax requests to complete'. For JavaScriptMVC 3.1, we identified an extremely common but annoying practice that becomes a one-liner with deferreds: loading data and a template and rendering the result into an element.
Continue readingjQuery Resize Event
When building web applications, it can be tricky to get pages to layout correctly, especially when layout can't be done with CSS. Widgets that can dynamically change the layout only complicate matters. JavaScriptMVC 3.1 packs a new resize event that greatly simplifies these layouts.
Continue readingHaving your Cake and Eating it without Getting Fat
On stack overflow, someone asked what are the pros and cons of using JavaScriptMVC. Believe it or not, there no cons for using JavaScriptMVC.
Continue readingKnock JavaScriptMVC's Back Out
I've read a lot of articles and tweets comparing JavaScriptMVC, BackboneJS, and KnockoutJS. A lot of good things can be said about these frameworks. Backbone is largely similar to JavaScriptMVC's MVC components, and Knockout has a really amazing observable system.
Continue readingJavaScriptMVC and List Performance
Most applications center around displaying and interacting with lists and individual pieces of data. Consider applications like GMail, Grooveshark, Twitter, Facebook, and Hulu. Each of these applications displays a list of items where a user can drill down into a single item. In many cases, the user can edit a single item while in the list view.
Continue readingCreating a JavaScriptMVC Slider
JavaScriptMVC makes it easy to write and organize copious amounts of JavaScript code. And although this usually means working among its Model-View-Controller layers to create something amazing, often, you'll find yourself wanting to make a lightweight, reusable UI widget. This demo walks you through creating a basic slider widget.
Continue readingJavaScriptMVC 3.0: Good To Go!
For the past year and a half, we've been pouring our heart into JavaScriptMVC 3.0. So it's with great excitement that we're ready to announce 3.0 is here to solve your JavaScript headaches. With over 1800 commits, the new version is faster, easier to use, and more powerful.
Continue readingFuncUnit Infographic
FuncUnit is pretty awesome. But it might not be clear how it works in Browser vs Command (Selenium) mode. To help, I put together 2 quick illustrations that highlight what's going on.
Continue readingjQuery.View - Client Side Templates for jQuery
Everyone loves client side templates. They are a great way to create html which is something JavaScript apps do all the time.
Continue readingOrganizing A jQuery Application
Earlier this week, I realized that every organizing-a-jQuery-application blog, article, and conference talk misses the most important lesson on how to organize a jQuery app.
Continue readingSkyscrapers and Cranes
For the jQuery Conference, we designed an advertisement for JavaScriptMVC and Jupiter. It was printed on the center page of the conference program. I'm pleased with how it turned out (click the image to see the full size version):
Continue readingjQuery Boston Conference 2010: Moving up the stack
This weekend, we had a ton of fun attending the annual jQuery Conference in Boston. Brian, Alex and I had a fantastic time hanging out with some of the most well-known members of the community. We learned about the latest releases and trends, and heard a lot of interesting opinions. While there was no officially designated theme for the conference, there was a very noticeable trend amongst most of the talks.
Continue readingjQuery.Model - A jQuery Model Layer
Complex JavaScript applications are mostly about making it easy to create, read, update, and delete (CRUD) data. But being so close to the UI, most JavaScript developers ignore the data layer and focus on making animated drag-drop effects.
Continue readingA crash course in how DOM events work
DOM events are something that web developers often take for granted, especially with libraries like jQuery. The complexity and low-level mechanics of events are abstracted away. As far we're concerned, snippets like the following:
Continue readingAn Open Letter to You and Alex Russell
DISCLAIMER: This is a pipe-dream, random, 3 AM thought. Do not take seriously.
Continue readingJavaScriptMVC Features
I spent a lot of time the last few weeks arguing why jQuery needs the Enterprise, and why it needs JavaScriptMVC (part 2). But, I should have been explaining why YOU need JavaScriptMVC. So I put together a list of what JavaScriptMVC provides.
Continue readingjQuery's Object Literal Coding Conventions
jQuery has internal coding conventions. It uses tabs over spaces. It uses lots of white paces and you can always find a {} around if/else statements. I'm adopting these conventions for JavaScriptMVC. JavaScriptMVC had notoriously flexible (ie bad) coding conventions. We were more concerned with adding features, tests, etc than making our code look nice. But, for the 3.0 release, the features have stabilized. We're paying more attention to things like documentation and even coding conventions.
Continue readingWhy jQuery Needs JavaScriptMVC Part 2
After writing my previous article on Why jQuery Needs JavaScript, I feel like I didn't communicate why JavaScriptMVC is important for jQuery developers. Here's a much more succinct way of saying it.
Continue readingWhy jQuery needs the Enterprise
Yesterday, I wrote why jQuery needs JavaScriptMVC. This morning, Rey Bango and I were chatting on the problem points of enterprise JavaScript and it prompted me to think about the following question:
Continue readingWhy jQuery needs JavaScriptMVC
More than a year and a half ago, I begged the jQuery community to start taking seriously the challenges of large scale JavaScript development on the jQuery forum. The response - jQuery handles most of the challenges. I disagree! But today, Rebecca Murphey, someone infinitely better at communicating than myself, echoed the call. I suspect it will create all kinds of commotion. So, I will try again to outline why jQuery needs a project like JavaScriptMVC and hope that attitudes have changed.
Continue readingOrganize jQuery Widgets with jQuery.Controller
Do you like organized code and hate nested functions that are impossible to reuse? Want to be able to extend plugins and widgets? Do you want these widgets to clean themselves up after they are removed? Great! JavaScriptMVC-extracted jQuery.Controller is the easiest and most robust way to build jQuery widgets.
Continue readingA Simple, Powerful, Lightweight Class for jQuery
jQuery's functional programming style is downright elegant for manipulating the DOM. But it lacks the structure and code reuse patterns that professional scripters need. John Resig's Simple Class inspired, jQuery.Class is a lightweight, but powerful class-like system that bridges the gap between jQuery's functional programming style and Object Oriented Programming.
Continue readingSet inner/outer width/height with jQuery Dimensions.Etc Plugin
You often want to animate or set an object to be a specific width or height on the page. But if that element has padding, border, or margin, it will probably take up more space than you expect. The jquery.dimensions.etc.js plugin lets you set and animate the outerWidth, outerHeight, innerWidth and innerHeight of DOM elements.
Continue readingGet Multiple Computed Styles FAST with the curStyles jQuery Plugin
Do you use jQuery's css or curCSS functions to get multiple styles on the same element? Don't you know this is slow? The JavaScriptMVC extracted curStyles plugin boosts performance when reading multiple computed styles on a single element.
Continue readingConvert Form Elements to JavaScript Object Literals with jQuery formParams Plugin
Want to quickly extract form data to a more usable format? Of course you do! We use JavaScriptMVC's formParams plugin constantly to turn form data into much easier to manipulate JavaScript Objects. We're releasing formParams standalone so everyone can save a little time on this extremely common task.
Continue readingcompareDocumentPosition plugin for jQuery
Being able to quickly compare two elements' positions in the browser is extremely useful for a variety of tasks. The DOM Level 3 specification describes the compareDocumentPosition method. It returns a bitmask with a whole bunch of useful information. But not all browsers support it :(
Continue readingAjax Fixtures Plugin for jQuery
Are you developing jQuery hotness so fast that the slow-poke server team can't supply you AJAX services fast enough? If so, you might be interested in the JavaScriptMVC-extracted jQuery.Fixture plugin. Fixtures simulate AJAX responses so you can keep developing JavaScript functionality even if the server's services aren't working. The fixture plugin is easy to setup and remove once the services are online.
Continue readingjQuery Default Events
Event Oriented Architectures (EOAs) are an emerging best practice when designing reusable JavaScript widgets. jQuery's trigger, triggerHandler, and jQuery.event.special[EVENT]._default methods have enabled widget authors to easily expose custom events to developers. However, these methods lack the scalability or expressiveness to enable powerful EOAs.
Delegate-able Hover Events for jQuery
Want to use live and delegate with hover events? Now you can! We are releasing JavaScriptMVC's delegate-able hover plugin. This plugin only works for the current 1.4.3 nightly release.
Continue readingDelegate-able Drag-Drop Events for jQuery
Have you ever wanted to use live and delegate with drag-drop events? Now you can! We are releasing JavaScriptMVC's delegate-able drag/drop plugins and extensions. These plugins only work for the current 1.4.3 nightly release.
Continue readingElement Destroyed (a jQuery Special Event)
When building jQuery plugins, it's a best practice to provide some way for the user to teardown the plugin, remove any event handlers, and set things back to a good state. Most plugins can get away with waiting for the element to be removed, but more complex plugins listen for events on elements outside the plugin's element (such as the document or window). For these, it's important to know if an element has been removed and to clean up the plugins leftovers.
Continue readingToo Enterprisey?
A criticism often leveled against JavaScriptMVC is that it is too enterprisey. Here's how Wikipedia describes the term:
Continue readingActivate, Select and UI Design Patterns
When building a widget in the web, we are used to thinking of just one event:
Continue readingSAU, Window.Name, JSON-RPC
A few weeks ago, I went out to Chattanooga to give 3 days of JavaScriptMVC training to Southern Adventist University. I was blown away by the university's technology expertise. To my shame, I wasn't expecting a small college to have such sophisticated engineers. But, it wasn't that small! There are 66 sister school associated with SAU. SAU's problem was that each of those sister schools had their own way of doing things. There was almost no reuse. SAU's challenge was to create an architecture that would pave the way for reuse, where one school could leverage the application of another.
Continue readingPhui Grid and Paginator Widget
I just put together a Grid and Paginator widget for Phui that supports the following features in a scant 200 lines of code:
Continue readingTalkin JavaScriptMVC is Hard
Today, I gave a talk at jQueryConf about JavaScriptMVC. It didn't go great. One tactless audience member even asked me to fast forward my presentation - ouch. I consider myself a very good presenter / speaker. I spoke at a Dreamweaver meetup the week before and got rave reviews. Speaking at every JS.Chi, I've also had a ton of practice. However, this didn't go as well, and I've come up with a few reasons:
Continue readingAbout JavaScriptMVC
JavaScriptMVC is an open-source framework containing the best ideas in enterprise JavaScript development. It guides you to successfully completed projects by promoting best practices, maintainability, and convention over configuration.
About Jupiter
Jupiter is dedicated to making JavaScript an easy and enjoyable place to develop kick ass apps. We open-source everything and provide expert web application development, support, and training.
JavaScript development, design, and consulting.
