3
votes
2answers
91 views

How to structure a Javascript module better?

There's this Ajax-heavy, JQuery-based site which I'm about to work on. There hasn't been much structure in the JS code so far (lots of functions at global scope, hard-coded in the HTML ...
0
votes
1answer
19 views

javascript: data and vtables vs. objects and methods

I present a bunch of grids of data to the user, and want to sum certain columns in some of the grids. // for one such grid: rows = [{id: 0, name: "Alice", age: "23"}, {id: 1, name: "Bob", ...
1
vote
0answers
38 views

Creating and referencing markup…cloning, etc. efficient system for this plugin

I am pulling multiple feeds from youtube that have a callback function which makes markup from each feed. They add that markup to a documentFragment stored in var data. When all the feeds have ...
7
votes
1answer
216 views

Structure JavaScript code

I am new to JavaScript development, so seeking help in guidelines on how I can better organize my code in a better way. This is what I have for a small app I am working on: var app = app || {}; ...
1
vote
1answer
57 views

Keeping my JS decoupled but still use functionality

In the very simple code below I'm illustrating having a master 'App' object with 'Chat' & 'Posts' modules inside. Now, what I'm asking is, in my conscious effort to keep my components loosely ...
1
vote
0answers
107 views

a little “infile” AMD

I like the modular aspect of AMDs (Asynchronous Module Definition, see this StackOverflow reply) and it's quite neat to structure JS. But I typically compile all my JS files into one JS file. ...
6
votes
1answer
604 views

High level file structure and library structure

I'm working on a DOM-shim project. For a small subset of the DOM4 specification (Actually a subset of the Node interface) I already have 400+ lines of functions. I presume keeping this up will ...