7 ms·
The surprising rise of JavaScript
- ambirex 14y agoIt isn't really all the surprising if you have the background Douglas Crockford provided in his yahoo series - http://www.youtube.com/watch?v=v2ifWcnQs6M http://www.youtube.com/watch?v=v2ifWcnQs6M (part 1)
- Michiel 14y agoThere was JavaScript (including the good parts) before Douglas Crockford started disseminating his ideas about the language and long before jQuery was released. So it was like a powerful and possibly quite elegant language all along, but it needed to be 'discovered' and 'evangelized'. With respect to JavaScript, it's like front-end developers are all enlightened today, after living in the dark ages for about 10 years.
- ttfntatafornow 14y agohasn't objective-c and java pretty much replaced all the demand for javascript?
- chime 14y agoNo.
- factorialboy 14y agoNot even close. JavaScript is the closest thing we have today to a 'universal' programming language.
- VeejayRampay 14y agoIt's universal because it's the only language that runs in the browser, not on its merits though. That alone made it big and ubiquitous. If Python had been picked as the scripting language for the web, or even Lua or Ruby, they would be the "universal" languages.
- petercooper 14y agoThere's a trend of moving away from native apps to JavaScript driven ones. For example, the Financial Times' recent move: http://paidcontent.org/2012/05/01/web-journey-complete-ft-switching-off-ios-app/ http://paidcontent.org/2012/05/01/web-journey-complete-ft-sw...
- rimantas 14y agoAnd how many new native apps were submitted that day? Calling it a "trend" is a bit over the top, imho. Also consider the nature of the app — basically to display some content.
- VeejayRampay 14y agoHow is the rise of the (unfortunately) sole technology that the ubiquitous multimedia platform of the beginning of the 21st century understands "surprising"? The fact that we still haven't found a way to use anything else easily after about 15 years and are still being somehow coerced into developing with it is what's surprising really :/
- josefonseca 14y ago> How is the rise of the (unfortunately) sole technology that the ubiquitous multimedia platform of the beginning of the 21st century understands "surprising"? I recall that 14 years ago DHTML was the all the rage and javascript was the key to DHTML. So I took up JS and bought books and went in head first. Conclusion: it was impossible to take that language seriously. Javascript was a hack. So for me, the rise of javascript as anything more than a browser helper language has been very surprising. I still have some prejudice towards it. Maybe others feel the same way and knowing how O'Reilly comes from the UNIX tradition, I'm sure that's what they meant with that title.
- factorialboy 14y agoSimilar story for me. Except that in 2010 I re-learnt JavaScript and discovered how beautiful, flexible and powerful it can be as a client side / server side language
- jmspring 14y agoI've been node'n it up a bit myself lately. The language is easy to write, pretty easy to get things done, and server-side node provides a lot of great libraries. That said, the development ecosystem around Javascript is very immature. To really write decent amounts of server-side JS as a team, people often employ linters and other things to sanity check their code. Debugging? Mostly printf's (or equivalent). Scoping rules can also be pretty annoying. It is useful for getting things done, but it generally isn't my first choice (at least server side).
- 14y ago
- abbetts 14y agoIf Javascript is so great then why do we need Coffeescript?
- ChiperSoft 14y agoWe don't.
- petercooper 14y agoConsider that in the browser, JavaScript is (with a few minor exceptions) the closest to a universal scripting runtime/VM that we can get. Targeting the browser, therefore, requires compiling down to JavaScript. So JavaScript (the language) and CoffeeScript can both be awesome in the way that Scala and Clojure have their different niches on the JVM.
- friggeri 14y agoCoffeescript is Javascript. Just another syntax.
- chetzit 14y agoWho are "we"?
- PakG1 14y agoI remember back in high school, I think like 1998 or so, my friend told me, "You should really learn Javascript really well. It's going to be really big and around for a really long time." I laughed at him. Funny thing is that ended up going into embedded hardware; he almost never touches Javascript, except for some personal stuff. I still find it mindboggling how right he was, but part of me still feels like he was just shooting in the dark.
- petercooper 14y agoAs the title is ambiguous, my surprise is at how long it took for JavaScript to gain the stature and position it has now, not in it actually making that rise.
- 6ren 14y agoThere's a theory that languages hitch a ride on platforms that do something useful, as a way of "scripting" (customizing or configuring) that platform. The obvious one for Javascript is the browser, but we can see others: C for unix; perl and PHP for the server-side; ruby for rails; objective-C for iOS; C#/VB for Windows/Office and so on. Though not all languages seem to fit this, e.g. Java. I think it's actually an instance of the simple idea that products are only adopted when they meet a need - an "application" of that product. Hence the term "killer app" for a new technology. Platforms are often products that are needed in themselves; therefore, anything that improves them a bit, expanding their capabilities and usefulness, is also needed. It seems quite common that a language, in itself, doesn't meet a particular need; similar to the idea that code, in itself, doesn't solve problems; and pure mathematics, in itself, isn't of practical use. All these need to be applied to a problem. (Of course, some people do adopt all these despite their "uselessness" - it's just that this is a tiny minority). In addition, people need to know about it (you can't adopt a compelling solution to your urgent problem if you've never heard of it). A successful platform helps here too - its scripting language is right there, installed, ready to use even before you need it. In the case of Java, it seems to be have been useful in itself, because it was safer and easier to use than C and C++; it rode the rise of "OOP"; had a reassuring industry backer (Sun) and complete toolchain, libraries, support; and was heavily promoted by Sun. At that time, python, ruby and javascript were slow (because of slow hardware and lack of optimization) and C# didn't exist. BTW: A blog/essay introduced the term "scripting language" to describe C (which is striking because C is not one, by the usual definition), but I've not been able to find it since. So people bend over backwards to make javascript workable, improving it, adding libraries, finding the good parts, writing front-ends for it, writing back-ends for it, because it is the scripting language of the browser. If you do all that, is it still javascript? Yes, in that it uses the adoption channel of javascript, and maintains compatibility with javascript as an interface. So Javascript is no longer a thing, but a conduit - a platform customized by other scripting languages.
- fruchtose 14y agoJavaScript is a strange beast. The semantics of the language are, in my opinion, awesome and awful in different ways. Awesome: prototypes, first-class functions, dynamic function scope (not sure if there's a proper name for this), jQuery. Awful: the this keyword is confusing (but powerful once you learn it), type coercion, the API. The standard API is the reason that people care about "the good parts" of JavaScript. jQuery is so popular is because it allows you to turn away from the document.getElementById sort of operation (ugly code) and turn it into $("#id").filter().each().etc(). People don't like JavaScript because of what it is, but what it can be. There are so many examples to choose from: jQuery (DOM API, data requests, standard library "extensions"), jPlayer (multimedia), Node.js (server, native API), Mustache (templating), Meteor (dynamic MVC). I am by no means an expert, but I can appreciate that JavaScript has turned into a serious language. JavaScript is not the holy grail of web programming languages, and I am sure that something greater will succeed it, but for now there is a lot we can do with it.
- pilif 14y ago> the document.getElementById sort of operation which looks like it was designed in 10 days (all due respect to Brandon Eich) document.getElementById() isn't part of JavaScript but part of the DOM Level 2 spec that came out years after JS. JS was first seen in Netscape 2.0 in 1995 whereas DOM level 1 was specified in 1998 but didn't in fact yet contain document.getElementById. That one was added in DOM Level 2 in 2000, so five years after JS. As such it was not designed by Brendan Eich, nor was it created in 10 days. No. This is the work of a committee that was heavily influenced by the way Java does it which is understandable because when DOM1 came out it looked like Java is going to be the be all end all of Computer languages. The "library" that comes with JS is really small (methods on String, RegEx, Date and Array). Everything else we owe to the W3C which has created an API that was all but made for the language it was going to be used from most of the time. (edit: I got my dates and dom levels mixed up - fixed)
- fruchtose 14y agoAh, my bad. Next time I will do more research before running my mouth.
- islon 14y agoI wouldn't call it "surprising" to see the only client web language increasing in popularity.