background preloader

Javascript

Facebook Twitter

Why Discourse uses Ember.js - Evil Trout's Blog. This week, I was delighted to finally reveal Discourse, the app I’ve been working on for most of the last year in secrecy with awesome people.

Why Discourse uses Ember.js - Evil Trout's Blog

The launch got a lot of attention - we were featured on Hacker News, Slashdot, Wired, Reddit, Techcrunch and countless other places. Personally I’ve been floored with the amount of feedback so far. It’s going to take quite some time to get through it all! One question people keep asking me is “Why did you choose Ember.js?”. It’s a good one, and one that I think can be considered in two ways: “Why use a a client side MVC Framework?” Why use a client side MVC Framework? Interactivity There will never be a “one size fits all” approach to web development. It would be silly to give them a heavy Javascript interface just to do this because there is so little interactivity. Ask yourself how interactive your web application needs to be.

Why not just use plain old jQuery - it’s simpler! Getting Into Ember.js. There are a lot of JavaScript libraries available, and most are really good at providing the traditional DOM-centric interactions that your typical websites need.

Getting Into Ember.js

But when it's time to build a manageable code base for a single-page app, that's where a whole suite of new frameworks come in to smooth things out. The old saying is true: "Use the best tool for the task. " It's not that traditional libraries like jQuery can't help you build desktop-like experiences, it's just not the use-case for it and is missing things like data-binding, event routing and state management. Sure, you can probably cobble together a bunch of plugins to achieve some of that functionality, but starting with a framework that's been specifically built from the ground up to tackle these specific problems, in my opinion, makes more sense. The old saying is true: "Use the best tool for the task. " Before we continue, a heads up: Ember.js does a lot of magic for you.

Javascript: Stop Fighting It. I recently came to the realization that I've been fighting Javascript too much.

Javascript: Stop Fighting It

This Just In: JavaScript is a Real Language. JavaScript: The World's Most Misunderstood Programming Language. Douglas Crockford www.crockford.com JavaScript, aka Mocha, aka LiveScript, aka JScript, aka ECMAScript, is one of the world's most popular programming languages.

JavaScript: The World's Most Misunderstood Programming Language

Virtually every personal computer in the world has at least one JavaScript interpreter installed on it and in active use. Classical Inheritance in JavaScript. Douglas Crockford www.crockford.com And you think you're so clever and classless and free — John Lennon JavaScript is a class-free, object-oriented language, and as such, it uses prototypal inheritance instead of classical inheritance.

Classical Inheritance in JavaScript

This can be puzzling to programmers trained in conventional object-oriented languages like C++ and Java. JavaScript's prototypal inheritance has more expressive power than classical inheritance, as we will see presently. But first, why do we care about inheritance at all? The second reason is code reuse. To demonstrate this, we will introduce a little sugar which will let us write in a style that resembles a conventional classical language.

A re-introduction to JavaScript. Why a re-introduction?

A re-introduction to JavaScript

Because JavaScript is notorious for being the world's most misunderstood programming language. It is often derided as being a toy, but beneath its layer of deceptive simplicity, powerful language features await. JavaScript is now used by an incredible number of high-profile applications, showing that deeper knowledge of this technology is an important skill for any web or mobile developer.

It's useful to start with an overview of the language's history. JavaScript was created in 1995 by Brendan Eich while he was an engineer at Netscape. Several months later, Microsoft released JScript with Internet Explorer 3. Because it is more familiar, we will refer to ECMAScript as "JavaScript" from this point on. Unlike most programming languages, the JavaScript language has no concept of input or output.

Javascript Crypto Library. Whirlpool in javascript. Advanced Web Applications With Object-Oriented JavaScript. Recently I interviewed a software developer with five years experience in developing Web applications.

Advanced Web Applications With Object-Oriented JavaScript

She’d been doing JavaScript for four and a half years, she rated her JavaScript skill as very good, and—as I found out soon after—she actually knew very little about JavaScript. I didn’t really blame her for that, though. JavaScript is funny that way. It’s the language a lot of people (including myself, until recently!) Assume they’re good at, just because they know C/C++/C# or they have some prior programming experience. In a way, that assumption is not entirely groundless.

Indeed, until recently, I’d always been able to get by with whatever little JavaScript I knew, armed only with the MSDN® DHTML reference and my C++/C# experience. Object-oriented programming (OOP) is one popular approach that’s used in many JavaScript libraries to make a codebase more manageable and maintainable. JavaScript Objects Are Dictionaries does exactly the same thing as this: