JavaScript is the original and common name applied towards most flavors of a scripting language that originated on NetScape Navigator. Use this tag for questions regarding common implementations of ECMAScript, JavaScript, JScript, etc. JS does not typically refer to its ECMA-cousin, ActionScript.

learn more… | top users | synonyms

2
votes
1answer
180 views

How can I keep Web services requests in a DAO layer without tying the code to the DOM?

I'm working on a single page application on the node-webkit desktop app platform, which means 99.9% of all of the logic is written in JavaScript. Since this is a reboot of a project we're working on, ...
2
votes
1answer
359 views

Client side authentication through signatures instead of passwords

I want to save some user-generated data with some signature of the user that generated it (let's say that the user has to fill some forms with some data and I want him to sign the written data). The ...
1
vote
1answer
69 views

Web Application: Combining View Layer Between PHP and Javascript-AJAX

I'm developing web application using PHP with CodeIgniter MVC framework with a huge real time client-side functionality needs. This is my first time to build large scale of client-side app. So I ...
1
vote
1answer
368 views

Are there any benefits to removing unused script files in a web site/project?

VS Web sites/projects come loaded with several .js files, most of which I don't use (e.g., I use a CDN for newer versions of jQuery and jQuery-UI). I know it's safe to remove these unneeded .js files ...
0
votes
1answer
28 views

Creating a voting platform for submissions during timeperiod

I have a site where stories are submitted at any time by users. The staff would like the ability to create a voting period at any time. For example, they can choose to open up voting from today until ...
2
votes
0answers
45 views

Managing setTimeouts and setInterval in a distributed environment

I am building a turnbased game on nodejs using socket.io and redis as the datastore. I am planning on hosting the game on AWS opsworks with the ability to scale by adding more nodes. How should I ...
2
votes
0answers
82 views

Local Updates in Persistent/Immutable Data Structures

I'm getting into ReactJS and am intrigued but also confused about persistent data structures. I love the idea, but I'm not sure how to take my MV*, Mutable, Observable Bindings experience in designing ...
2
votes
0answers
72 views

Set of specific values implementation vs. using some sort of generic set with advanced checks

I am working on a set implementation in JavaScript currently. This should kind of simulate generics as known from Java or C#. I need a mutable version of that (allows for adding/removing set values) ...
2
votes
0answers
238 views

How best to implement HTML5 support for my validation library

I have created an annotation-based validation library called regula. There seems to be some amount of interest around the framework and the next thing I'd like to do is to support HTML5 validation. ...
1
vote
0answers
156 views

Efficient development process for Golang (or any backend) and JavaScript?

I am developing a web application. The frontend is a mix between JavaScript and server-side generated html. The backend is written in Golang. Might not be very important, but if somebody made a ...
1
vote
0answers
30 views

How do I differentiate between old and new data in backbone collections?

A common pattern I come across is a backbone collection which is initially seeded from a database. However, the user can also add to the collection. When the user does add to the collection, these ...
1
vote
0answers
36 views

Range searching with WebGL

Is it possible to use somehow WebGL to fasten up 1d range searching? I need to find overlapping date intervals, and I thought that 3d games usually have a very similar problem by rendering frames... ...
1
vote
0answers
54 views

Should I use SignalR to synchronize & cache CRUD data to a mobile app?

I'm considering using SignalR to send data to a mobile app, but need to have a way to synchronize data while it's closed or pending updates. Is it a good idea to use Backbone.js <--> SignalR to ...
1
vote
0answers
75 views

Methods for structuring JavaScript SDKs

I've built a REST API and have been using Backbone models throughout a couple different applications to communicate to it. I would really like to build a single JS SDK that can be used in any ...
1
vote
0answers
48 views

How do I manage a JavaScript library with TFS?

I know that I can share files between Visual Studio projects using linked files and assemblies using project references. Is there a good approach for JavaScripts? I'd rather not use linked files since ...
1
vote
0answers
86 views

Writing a PHP wrapper for Javascript to safely access REST API

I am looking for signposting help to secure my API keys when accessing a database over REST API from Javascript on a webpage. I have read that in order to secure the API key I need to create a wrapper ...
1
vote
0answers
69 views

Reducing code complexity for an interface between angular and d3

I'm playing around with different ways of integrating d3 and angular, in the context of learning both of these frameworks, and am hoping for some input: My client application receives a JSON array ...
1
vote
0answers
162 views

How many Angular Controllers and/or Directives is too many?

I'm building a large, editable data table with angular, and I'm trying to figure out what the best practice is. The table will be a couple of hundred rows, with a couple of dozen columns, so upwards ...
1
vote
0answers
360 views

JavaScript Class Module: How to avoid an antipattern

I've seen a number of different methodologies when it comes to applying class-based inheritance to JS/ECMA-based projects. Over the past several months, I've been applying IIFE Namespaces to my class ...
1
vote
0answers
159 views

how to integration dynamic web fields and forms

I'm trying to find a way to design backend that will be handling customized web forms creation on the fly. Once created those forms will be injected to part of the existing web pages. I've created ...
1
vote
0answers
82 views

Javascript library for Java source code reference

Could you suggest any JS lib, that will "recognize" all Java classes in specified text and create reference link to page with this class? (similar to Eclipse Ctrl+click) There are plenty of good JS ...
1
vote
0answers
925 views

How should I structure modules in an Angular.js application?

I am fairly new to Angular.js, and one that confuses me is how to best use modules in an application. It seems to me that modules can contain any of the other common constructs in AngularJS ...
0
votes
0answers
25 views

JavaScript: testing with undefined value

While learning more about IE’s documentMode property, I came across some sniffing code, which, of cause, fails in browsers like Firefox. However, a simplified version of the test would readas such: ...
0
votes
0answers
41 views

Javascript and SQL Lite (multi browser offline SQL/database query)

I'm in the elections division of my county and am trying to simplify a voter lookup method for our poll judges during election time. Currently we are using a clunky heavy application that the judges ...
0
votes
0answers
52 views

Should we still care about _escaped_fragment_ and alternate HTML generation for Single Page Applications?

A few months ago I started a project, which will have two parts – business client overview panel (AngularJS SPA) and public front-end (dynamic HTML with progressive enchancements via XHR). I'd really ...
0
votes
0answers
51 views

What is a good method of storing test data for development and unit testing with angular and jasmine?

What is a good method of storing JSON data/objects for development and unit testing with angular and jasmine? I have seen some ways of accomplishing this. However, since I am new to unit testing with ...
0
votes
0answers
58 views

JavaScript strict mode compatibility

While reading about strict mode on MDN I really was surprised to read the following near the end of the page, quote: Browsers don't reliably implement strict mode yet, so don't blindly depend on ...
0
votes
0answers
116 views

Backbone and JavaScript

I have been programming in JavaScript for just a little over two years give or take, I am still in the intermediate part of the know-how spectrum. I have recently just discovered Backbone and I love ...
0
votes
0answers
126 views

Reusable and customizable charting library on top of d3js

I have started building a charting library on top of d3js using javascript's inheritance. My goal is to develop reusable and fully customizable chart components. I read the article: Towards Reusable ...
0
votes
0answers
50 views

Using JavaScript to find the correct offset in bundled files

I am currently making multiple parsers using PEGjs and have implemented my own partial preprocessor which using a RegExp finds and replaces '#include' directives with the desired files, resulting in a ...
0
votes
0answers
96 views

Best practices in creating JavaScript styling API's: Balancing CSS and JavaScript

I have written a number of components for Durandal--DatePicker Widget, Tabs Widget, Radio Widget, etc. I'm having a little conceptual difficulty in how best to balance a styling API with CSS. For ...
0
votes
0answers
32 views

Reasoning behind indexedDB versioning

So, the last 2 weeks I have been fighting with indexedDB and one of two recurring questions that keep popping up is why indexedDB has to use/present it's entire versioning system? I do understand that ...
0
votes
0answers
75 views

Keeping Backbone model in sync with editable view

I'm making a web form for editing some objects. I'll call these objects Foos. I have a Backbone model that represents Foos. I have a Backbone view that renders an editor form, filling in fields ...
0
votes
0answers
184 views

Javascript design pattern with jQuery Widget factory

I am using the jQuery widget framework for creating some graphical elements on a webpage, and I have a conseptual question about the overall structure of the code. I have 3 classes A, B and C which ...
0
votes
0answers
64 views

What is special about JDBC that makes it unlikeable for JavaScript

Quoting from Selenium Architecture A natural implementation would have been to provide a database connection to the underlying data store, using something like JDBC. Eventually, we settled on ...
0
votes
0answers
159 views

Should you implement a repository pattern with an MVVM javascript framework?

When coding a MVVM pattern I use Dependency Injection (DI) and try and code against interfaces. One of the common patterns is a Repository pattern, so I can swap my data storage provider. If I'm ...
0
votes
0answers
345 views

AngularJS: directives and controllers: resolve, loading, reloading

I have a philosophy question about AngularJS and directives but correct implementation of the next problem solves it. So, I need an AngularJS directive, It loads some data via several (not one!) ...
0
votes
0answers
171 views

Numerous Sync/Async calls to webservice from hybrid app

I have a requirement where I have to make numerous calls to webservice to update the local database. Since I have to support lower-end Android phones also, I'm not yet sure as to how this would be ...
0
votes
0answers
139 views

Is possible to create and download a video file via JavaScript, only on the client side?

Is possible to create and download a video file only on the client side? Suppose that we have an animated canvas like in this JSFIDDLE. Please see this snippet: ... var stop = false; ...
0
votes
0answers
175 views

Cost Benefit Analysis of choice of javascript framework for excel-like web app

I am engaged by a telco company sales team to develop a web application to replace their current workflow. Their current workflow consists of many spreadsheets containing product, pricing, and sales ...
0
votes
0answers
179 views

Design advice for building pluggable componentry in AngularJS

I'm currently working on a team that's developed several, extremely similar web applications in flash, and wants them ported into JavaScript. They also want a single application harness to host all of ...
0
votes
0answers
137 views

Javascript: initiating file download and routing file off via POST

Every so often (seems about once a year) I get a chance to play with JS. While not proficient, I'm comfortable enough to get the job done if I have some good references. At this point, I feel like ...
0
votes
0answers
112 views

Ruby Capybara HTML DOM Issue

I am trying to get the links from Google adverts that appear in a webpage in programmatic manner. I have been testing Ruby and Capybara but I have an issue where the DOM as stated by Capybara is not ...
0
votes
0answers
113 views

Robustness Principle, Building Solid API's, and URLEncoding

One thing that has continually plagued my fellow colleagues and I are "special characters". These are things like ", #, &, \, @, and any other character that one might include in a string literal ...
0
votes
0answers
208 views

Rest API + Java. Scala, Hadoop + JavaScript Client : Deployment & Project Structure

Looking for inputs & best practice for new project : Client side : JavaScript (probably AngularJS supporting tools) Server-side & Rest API's : Java, Scala, Hadoop, Spring MVC 3 and other ...
0
votes
0answers
164 views

What is the application architecture for this Nomad / PhoneGap + Azure mobile services?

This channel 9 video describes how to create a Javascript based application in Visual Studio 2010, send it to a packaging service and get the Android APK, (and iphone files, etc) What is not ...
0
votes
0answers
149 views

What iframe event handlers can catch/handle error response statuses.

I require to download a url into an iframe and handle the cases where the server returns an error response status. Please could you inform me how to catch/handle the error status returned in the ...
0
votes
0answers
167 views

document directory path in javascript file in iOS

I am working on a project using MetaIO SDK (AREL). It works fine with all the files in the package (ipa), but I'm trying to download an animation automatically using a web service. It will be ...
0
votes
0answers
322 views

Best option to send image from javascript client to SQL server

From a client (browser), using javascript I want to send an image to sql server ( and store with user profile) (sql server), along with other data such as user id or name. Which option is better? ...
0
votes
0answers
64 views

reading parameters and files on browser, looking how to execute on server

I have a site done in Rails, which uses javascript to load files and generate forms for the user to input certain information. Those files and parameters are then to be used in a fortran code on the ...