JavaScriptMVC News

3.2 $.Controller - Templated Event Binding

Monday 17 October, 2011 by justinbmeyer

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 reading

Deferreds and 3.1

Wednesday 12 October, 2011 by moschel

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 reading

jQuery Resize Event

Monday 23 May, 2011 by justinbmeyer

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 reading

Having your Cake and Eating it without Getting Fat

Wednesday 04 May, 2011 by justinbmeyer

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 reading

Knock JavaScriptMVC's Back Out

Wednesday 30 March, 2011 by justinbmeyer

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 reading

JavaScriptMVC and List Performance

Saturday 08 January, 2011 by justinbmeyer

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 reading

JavaScriptMVC Cheat Sheet

Monday 20 December, 2010 by mihael

Here's a helpful JavaScriptMVC cheat sheet:

Continue reading

Creating a JavaScriptMVC Slider

Sunday 12 December, 2010 by justinbmeyer

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 reading

JavaScriptMVC 3.0: Good To Go!

Monday 06 December, 2010 by justinbmeyer

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 reading

FuncUnit Infographic

Tuesday 30 November, 2010 by justinbmeyer

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 reading

jQuery.View - Client Side Templates for jQuery

Friday 12 November, 2010 by justinbmeyer

Everyone loves client side templates. They are a great way to create html which is something JavaScript apps do all the time.

Continue reading

Organizing A jQuery Application

Thursday 11 November, 2010 by moschel

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 reading

Skyscrapers and Cranes

Wednesday 27 October, 2010 by moschel

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 reading

jQuery Boston Conference 2010: Moving up the stack

Wednesday 20 October, 2010 by moschel

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 reading

jQuery.Model - A jQuery Model Layer

Wednesday 13 October, 2010 by justinbmeyer

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 reading

A crash course in how DOM events work

Friday 01 October, 2010 by moschel

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 reading

An Open Letter to You and Alex Russell

Wednesday 22 September, 2010 by moschel

DISCLAIMER: This is a pipe-dream, random, 3 AM thought.  Do not take seriously.

Continue reading

JavaScriptMVC Features

Tuesday 24 August, 2010 by justinbmeyer

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 reading

jQuery's Object Literal Coding Conventions

Saturday 21 August, 2010 by agomes

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 reading

Why jQuery Needs JavaScriptMVC Part 2

Friday 13 August, 2010 by justinbmeyer

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 reading

Ben Alman is Awesome

Thursday 12 August, 2010 by agomes

Ben Alman is Awesome. Here's why:

Continue reading

Why jQuery needs the Enterprise

Tuesday 10 August, 2010 by moschel

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 reading

Why jQuery needs JavaScriptMVC

Monday 09 August, 2010 by moschel

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 reading

Organize jQuery Widgets with jQuery.Controller

Thursday 17 June, 2010 by justinbmeyer

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 reading

A Simple, Powerful, Lightweight Class for jQuery

Tuesday 15 June, 2010 by justinbmeyer

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 reading

Set inner/outer width/height with jQuery Dimensions.Etc Plugin

Thursday 10 June, 2010 by justinbmeyer

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 reading

Get Multiple Computed Styles FAST with the curStyles jQuery Plugin

Wednesday 09 June, 2010 by justinbmeyer

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 reading

Convert Form Elements to JavaScript Object Literals with jQuery formParams Plugin

Tuesday 08 June, 2010 by justinbmeyer

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 reading

compareDocumentPosition plugin for jQuery

Thursday 03 June, 2010 by moschel

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 reading

Ajax Fixtures Plugin for jQuery

Wednesday 02 June, 2010 by justinbmeyer

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 reading

jQuery Default Events

Wednesday 02 June, 2010 by justinbmeyer

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.

Continue reading

Delegate-able Hover Events for jQuery

Thursday 27 May, 2010 by justinbmeyer

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 reading

Delegate-able Drag-Drop Events for jQuery

Wednesday 26 May, 2010 by justinbmeyer

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 reading

Element Destroyed (a jQuery Special Event)

Tuesday 25 May, 2010 by justinbmeyer

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 reading

Too Enterprisey?

Monday 17 May, 2010 by justinbmeyer

A criticism often leveled against JavaScriptMVC is that it is too enterprisey. Here's how Wikipedia describes the term:

Continue reading

Activate, Select and UI Design Patterns

Saturday 27 March, 2010 by justinbmeyer

When building a widget in the web, we are used to thinking of just one event:

Continue reading

SAU, Window.Name, JSON-RPC

Tuesday 23 March, 2010 by moschel

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 reading

Phui Grid and Paginator Widget

Friday 19 March, 2010 by moschel

I just put together a Grid and Paginator widget for Phui that supports the following features in a scant 200 lines of code:

Continue reading

Talkin JavaScriptMVC is Hard

Wednesday 03 February, 2010 by moschel

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 reading