Tagged Questions
4
votes
3answers
146 views
Ajax race conditions
Is there a pattern or standard way to handle Ajax race conditions? Take the following example. You have two tables. Clicking a row on table 1 removes the data from DB and then updates table 2 (which ...
3
votes
1answer
104 views
Design Patterns for Coordinating Change Event Listeners
I've been working with the Observer pattern in JavaScript using various popular libraries for a number of years (YUI & jQuery). It's often that I need to observe a set of property value changes ...
1
vote
1answer
181 views
What is the best design pattern for asynchronous message passing in a Chrome extension?
I have a background script that is responsible for getting and setting data to a localStorage database. My content scripts must communicate with the background script to send and receive data.
Right ...
6
votes
3answers
292 views
Advanced JavaScript design patterns [closed]
I'm looking for books, online resources or suggestions about how to structure big projects or build a framework in JavaScript.
I'm not looking for books explaining how inheritance or closures work. ...
9
votes
5answers
759 views
Self-Executing Anonymous Function vs Prototype
In Javascript there are a few clearly prominent techniques for create and manage classes/namespaces in javascript.
I am curious what situations warrant using one technique vs. the other. I want to ...
4
votes
3answers
178 views
What are the disadvantages of unobtrusive script patterns in web applications?
First of all, is there a name for this as a bona-fide design pattern? Currently I've just been referring to it as "unobtrusive javascript". Here is a brief example of what I am talking about:
1.) Use ...
0
votes
1answer
244 views
Organizing large Javascript applications - The view layer
Today Javascript application of a relevant size become more and more common, and as the need arises, certain patterns are identified to manage the code complexity.
I try to follow good advice, but I ...
2
votes
2answers
313 views
Examples of MVVM adoption outside the Microsoft community?
IS MVVM getting any kind of traction outside the Microsoft community? Within Silverlight this is a non-issue, but for other technologies, like JavaScript it surely is: For instance Knockout.js is a ...
8
votes
1answer
309 views
Patterns for ajax-heavy web applications
Up until now, I've been a great fan of the MVC pattern for developing web applications. For the web, I've developed mostly in PHP (with the Kohana and CodeIgniter frameworks) and Ruby (RoR).
As my ...
1
vote
2answers
141 views
Difference between templates in JavaScript and design patterns
What is the difference between templates and design patterns in JavaScript?
I read about the template method design pattern and now I wonder how it relates to JavaScript templates (if at all).
22
votes
3answers
1k views
The importance of Design Patterns with Javascript, NodeJs et al
With Javascript appearing to be the ubiquitous programming language of the web over the next few years, new frameworks popping up every five minutes and event driven programming taking a lead both ...
8
votes
3answers
223 views
Using CSS classes as decorators - a good pattern?
I've been building a web-app with a fairly complex GUI - many small elements alongside eachother and within other elements that need various behaviours (dragging, clicking, but context-sensitive).
My ...
26
votes
7answers
706 views
Design Patterns for Javascript
A lot of web frameworks have a MVC-style layout to code and approaching problems. What are some good similar paradigms for JavaScript? I'm already using a framework (jQuery) and unobtrusive js, but ...