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 (1)

51
votes
2answers
5k views

Are there any OO-principles that are practically applicable for Javascript?

Javascript is a prototype-based object oriented language but can become class-based in a variety of ways, either by: Writing the functions to be used as classes by yourself Use a nifty class system ...
18
votes
9answers
1k views

What is the path to JavaScript mastery? [closed]

I know how we start with JavaScript, we cut-and-paste a snippit to gain a little client-side functionality or validation. But if you follow this path in trying to implement rich interactive behavior, ...
68
votes
20answers
16k views

Should I bother to develop for JavaScript disabled? [duplicate]

Should I bother to develop for JavaScript disabled? I feel that my time is better spent developing for the majority.
68
votes
27answers
8k views

How important is graceful degradation of JavaScript?

Should web developers continue to spend effort progressively enhancing our web applications with JavaScript, ensuring that features gracefully degrade, thereby ensuring accessibility? Or should we ...
21
votes
10answers
2k views

Good resources and tools for modern, heavy JavaScript development? [closed]

I am interested in doing some projects that involve heavy use of JavaScript. Namely HTML5 based canvas games, potentially using node.js as well. I am interested in learning modern best practices, ...
21
votes
2answers
3k views

How is client-side javascript covered by the GPL?

If I used a GPL-licensed Javascript libarary in a web application, would I then have to offer source code of the whole site to anyone who downloaded and executed the Javascript lib?
24
votes
8answers
7k views

The importance of javascript and the best way to learn it? [duplicate]

I'm a new graduate, but I have been doing web development for about six months. When I was finishing university the server side languages (PHP, Java) were more important then client side languages. ...
33
votes
10answers
5k views

Why aren't there other client-side scripting languages for websites? [closed]

Why is there just support for JavaScript and some VBScript in browsers today? I know JavaScript is good and all, but wouldn't having the option of using another programming language help promote ...
25
votes
2answers
18k views

Mixing Angular and ASP.NET MVC/Web api?

I come from using ASP.NET MVC/Web API and now I am starting to use Angular but I am not clear on the proper way to mix them. Once I am using Angular does the MVC server side concepts still provide ...
41
votes
13answers
6k views

Is it considered bad practice to have PHP in your JavaScript

So many times on this site I see people trying to do things like this : <script type="text/javascript"> $(document).ready(function(){ $('<?php echo $divID ?>').click(funtion(){ ...
7
votes
5answers
2k views

PHP, HTML, Javascript and writing good practices

I realized I have to write down a convention specification about HTML, JavaScript and PHP coding for me and my team. In web development, just like in C++, I'm definitely a fan of indentation and ...
22
votes
11answers
11k views

How necessary is it to learn JavaScript before jQuery? [closed]

In my opinion, when I looked at JavaScript, it looked like not my cup of tea. When I came across jQuery, I loved it. I sat and watched Nettuts+ 15 days of jQuery screencasts, 1 year later and now I'm ...
12
votes
4answers
7k views

JavaScript's prompt, confirm and alert considered “old-fashioned” [closed]

Lately I've been developing a web-based management system for a gym. Their previous app was developed in Visual Basic. For the new app, all the front-end scripting uses jQuery, the server is running ...
7
votes
4answers
2k views

Where to master HTML, CSS and Javascript? [duplicate]

Possible Duplicate: What should a developer know before building a public web site? I gotten interested in web-development lately. I am still a student. I learnt basics of HTML, CSS and ...
37
votes
6answers
2k views

Why not embed styles/scripts in HTML instead of linking?

We concatenate CSS and JavaScript files to reduce the number of HTTP requests, which improves performance. The result is HTML like this: <link rel="stylesheet" ...
4
votes
5answers
8k views

Can Javascript code be encrypted making it hard for someone to copy?

When you compile and distribute a client you are automatically protecting yourself from someone seeing and modifying your code. Can this be achieved on a Javascript client?
74
votes
23answers
6k views

How do developers find the time to stay on top of latest technologies? [closed]

I was a freelance web developer until circa 2004 when I started going down the management route but have decided to try to get back into development again (specifically JavaScript and HTML5 web/mobile ...
44
votes
6answers
33k views

Advantages of using pure JavaScript over JQuery

What are the advantages of using Javascript-only versus using JQuery-only? I have limited experience with JavaScript and JQuery coding. I've added bits and snippets of each to HTML pages but I've ...
41
votes
8answers
5k views

How do I get started with HTML5? [closed]

What is the recommended workflow to learn HTML5? What tools should I install? What SDK? Where to start? How to test? How to debug? What do I read? I understand that what is often labelled as "HTML5 ...
43
votes
2answers
22k views

When not to use Google Web Toolkit? [closed]

I'm considering use of GWT on a major in-house web app development project, namely it's major advantage in my eyes is the cross-compilation to Javascript which would (at least theoretically) help my ...
30
votes
7answers
2k views

Design Patterns for Javascript [duplicate]

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 ...
41
votes
8answers
20k views

Why do people disable JavaScript?

I asked a question yesterday Should I Bother to Develop For JavaScript Disabled?. I think the consencus is: Yes, I should develop for JavaScript Disabled. Now I just want to understand why users ...
52
votes
8answers
8k views

Client-side coding: How to prevent malicious use?

Over the last few years, the trend for client-side (browser) applications has really taken off. For my latest project, I have decided to try and move with the times and write a client-side ...
34
votes
2answers
3k views

Strategy for generating unique and secure identifiers for use in a “sometimes offline” web app

I have a web based project that allows users to work both online and offline and I'm looking for a way to generate unique ids for records on the client side. I'd like an approach that works while a ...
27
votes
5answers
7k views

Pros and cons of an HTML/JavaScript only web app

I come from an ASP.NET forms background and have found server side coding very powerful in the past. More recently, however, I have been wanting to phase out the server side code of the front-end and ...
25
votes
14answers
7k views

What benefits are there to native JavaScript development? [closed]

Given how much simpler jQuery development is, when compared to native JavaScript, what makes people forgo libraries like jQuery altogether? Is this because jQuery has limitations or it is slow? I ...
28
votes
8answers
8k views

When should JavaScript generate HTML?

I try to generate as little HTML from JavaScript as possible. Instead, I prefer to manipulate existing markup whenever I can and only generate HTML when I need to dynamically insert an element that ...
12
votes
4answers
24k views

What is a good IDE for client side JavaScript development? [closed]

I recently started learning JavaScript and am looking for a good JavaScript Editor/IDE. I found dozens of them in a Google search but I would appreciate if users who have experience with using such an ...
22
votes
2answers
12k views

What are the pros and cons of Node.js? [closed]

I'm designing a web application that is locally focused on JSON objects to do all the data stuff (and after that I would pass it to a server to cloud synchronize). However, somebody in an answer from ...
21
votes
12answers
3k views

How did JavaScript become popular?

In ancient history, Brendan Eich had a language design, and in today's world, JavaScript is a popular language implemented and used in many different places. What caused the language to become ...
10
votes
2answers
756 views

How can I use my coding skills for good?

By this autumn my two small websites should be generating around a total of $1200 a month with minimal/zero input which is enough to for me to live on comfortably enough. Rather than embark on ...
20
votes
6answers
1k views

Should I place functions that are only used in one other function, within that function?

Specifically, I'm writing in JavaScript. Let's say my primary function is Function A. If Function A makes several calls to Function B, but Function B is not used anywhere else, then should I just ...
15
votes
6answers
2k views

Why is closure important for JavaScript?

C#'s lambda expression also has closures but is rarely discussed by the C# communities or books. I see far more JavaScript people and books talk about its closures than they do in the C# world. Why is ...
8
votes
3answers
759 views

What should be tested in Javascript?

At work, we've just started on a heavily Javascript based application (actually using Coffeescript, but still), of which I've been implementing an automated test system using JsTestDriver and fabric. ...
8
votes
1answer
3k views

Confusion about dual license (MIT/GPL) javascript for use on my website

I've read all of the posts I can find on this and I'm still not sure of the answer. I'd like to use a jQuery plugin on my website that is dual licensed under MIT and GPL. Does the dual license mean ...
7
votes
4answers
582 views

Could a programming language work as well without statements?

As programming in JavaScript, I've noticed everything that can be done with statements and blocks can be done with expressions alone. Can a programming language work fine with only expressions? And, ...
3
votes
6answers
684 views

When to use a API/Library and when to write your own?

I am working on a large website and having been thinking a lot about when I should be using a 3rd party API/Library and when I should be writing my own implementation from scratch. There is no Library ...
1
vote
4answers
479 views

Multiple attribution in Python, JS, …?

I accidentally discovered this a=b=c=d=e=f=2 in python(2.7)(and JavaScript a few minutes later) interpreter . Is this a feature or just the way the interpreter works, if is a feature how it is ...
10
votes
3answers
1k views

How to write manageable code with functional programming?

I just started with functional programming (with JavaScript and Node.js) and from the look of things it looks as if the code I am writing would grow to be one hell of a code base to manage, when ...
7
votes
3answers
1k views

Benefits to starting JavaScript “for” loops at 0, or just traditional? [duplicate]

Possible Duplicate: Defend zero-based arrays I'm running code that loops through an array of HTML IDs. With the HTML IDs named content1, content2, …, content12, my loop looks like: for ...
3
votes
3answers
183 views

Which one subsumes the other: class-based object-orientation or prototypal inheritance?

In this talk: http://www.youtube.com/watch?v=hQVTIJBZook, Douglas Crockford claims that class-based object-orientation can be represented in terms of prototypal inheritance. The construction he gives ...
2
votes
2answers
2k views

What do you suggest for cross platform apps, including web

I have always preferred cross platform development over most other concepts as long as I can remember. Which is one of the reason I never got into .Net. Currently, I use php/javascript/python as my ...
125
votes
3answers
34k views

Pros and Cons of Facebook's React vs. Web Components (Polymer)

What are the main benefits of Facebook's React over the upcoming Web Components spec and vice versa (or perhaps a more apples-to-apples comparison would be to Google's Polymer library)? According to ...
41
votes
6answers
10k views

What are the pros and cons of Coffeescript? [closed]

Of course one big pro is the amount of syntactic sugar leading to shorter code in a lot of cases. On http://jashkenas.github.com/coffee-script/ there are impressive examples. On the other hand I have ...
86
votes
15answers
10k views

Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?

The new keyword in languages like Java, Javascript, and C# creates a new instance of a class. This syntax seems to have been inherited from C++, where new is used specifically to allocate a new ...
35
votes
4answers
41k views

Reasons NOT to use JSF [closed]

I am new to StackExchange, but I figured you would be able to help me. We're crating a new Java Enterprise application, replacing an legacy JSP solution. Due to many many changes, the UI and parts of ...
30
votes
3answers
7k views

What does Douglas Crockford mean when he says jQuery doesn't scale? [closed]

In the Q&A section of this talk, Douglas Crockford says that jQuery doesn't scale as well as some other popular libraries. What does he mean by that, and what is it about the other libraries that ...
31
votes
5answers
6k views

How easy is it to hack JavaScript (in a browser)?

My question has to do with JavaScript security. Imagine an authentication system where you're using a JavaScript framework like Backbone or AngularJS, and you need secure endpoints. That's not a ...
16
votes
6answers
4k views

Is it a good idea to do UI 100% in Javascript and provide data through an API?

My primary day job is making HTML applications. With that I mean internally used CRUD-type applications with lots of editable gridviews, textboxes, dropdowns, etc. We're currently using ASP.NET ...
20
votes
5answers
2k views

How do I convince my boss (and other devs) to use/consider Unobtrusive JavaScript

I'm pretty new in our develepors team. I need some strong arguments and/or "pitfall" examples, so my boss will finally understand the advantages of Unobtrusive JavaScript, so that he, and the rest of ...