Announcing Amber.js « Katz Got Your Tongue? - Vimperator. December 8th, 2011 A little over a year ago, I got my first serious glimpse at SproutCore, the JavaScript framework Apple used to build MobileMe (now iCloud). At the time, I had worked extensively with jQuery and Rails on client-side projects, and I had never found the arguments for the “solutions for big apps” very compelling. At the time, most of the arguments (at least within the jQuery community) focused on bringing more object orientation to JavaScript, but I never felt that they offered the layers of abstraction you really want to manage complexity.
When I first started to play with SproutCore, I realized that the bindings and computed properties were what gave it its real power. Bindings and computed properties provide a clean mechanism for building the layers of abstractions that improve the structure of large applications. But even before I got involved in SproutCore, I had an epiphany one day when playing with Mustache.js. JavaScript : 3 fondamentaux | BrainCracking - Vimperator. Après quelques années à écrire dans un langage, on finit facilement par oublier les premières difficultés que l’on avait rencontrées. Et à force de faire de la veille, de l’autoformation et de parler entre experts dans des conférences, j’ai un peu quitté la réalité de la majorité des équipes Web. Maintenant que je suis consultant indépendant je retourne dans des équipes qui avaient autre chose à faire que de se demander si on a le droit de parler de classe en JavaScript, quelle est la bonne définition d’une closure, ou quelles sont les fonctionnalités de EcmaScript 5 qui auraient du rester dans Ecmascript.Next.
J’avais déjà parlé sur ce blog de JavaScript et la programmation orienté objet pour les développeurs PHP, nous allons explorer ici les 3 notions fondamentales de JavaScript qui sont probablement les plus grosses sources de bugs, d’incompréhension et de frustration pour le développeur Web moyen. Et qui accessoirement sont la base d’une programmation plus évoluée par la suite. Eugene's Blog - Using recursion combinators in JavaScript - Vimperator. OS.js (JavaScript Operating System) « Anders Evenrud Weblog - Vimperator. A Look at Popcorn. Today we’re going to take a look at Popcorn.JS, a library from Mozilla which makes it very easy to manipulate a webpage based on the current position of a video.
This allows you to create rich “hypermedia” experiences around your video content. With Popcorn, you could display information about actors currently on-screen, or show Google Street View maps of locations in the video. Take a look at the Demo Page to see what we’ll be achieving – a mix of images, Google Maps, Wikipedia, tagging, RSS feeds, Facebook and web content – all in a 22 second video clip. About Popcorn Popcorn makes video work like the web. We create tools and programs to help developers and authors create interactive pages that supplement video and audio with rich web content, allowing your creations to live and grow online. Popcorn provides a collection of plugins to easily pull in remote data to the screen.
This pulls in the first 40 words from the Queen’s Wikipedia page into the element with an ID of wiki. Images Videos. Lets Make a 3D Game: microphysics.js. This post is part of the “Lets make a 3D game” series. 3D and physics simulation always go well together evenmoresowithmarblegames. One is required for marblesoccer but i wasnt convinced by current 3d physics engines. I explain why at the end. Fortunatly, @pyalot from codeflow.org has been kind enough to write one taylor-made for us: microphysics.js!! It is bite-sized, elegant and efficient. Less than 500 lines at the moment!! It is small engouh to be understood, important feature for a tutorial blog. It is a work in progress tho. Below is a screencast of me doing a short introduction of the playground. Let’s get started So lets see how to use it. Let’s Create a World Quite a title hey ? Now you start it. The world is now fully initialized. The timeStep parameter is the precision of the physics engine, expressed in seconds.
Let’s Add Bodies This will position it at (10,10,10) in the world. restitution will determine how bouncy is this during a collision. Now lets add it to our world Credits. Is there a better way of writing v = (v == 0 ? 1 : 0); - Stack Overflow - Vimperator. A Quick Look Into The Math Of Animations With JavaScript - Smashing Coding - Vimperator.
Enhancing Web Apps with AmplifyJS. There seems to be a new crop of special-purpose JavaScript libraries every week. Gone, it seems, are the days of using only one library per project. Today I’ll introduce you to a very cool component library, AmplifyJS, that offers just a few very specialized components. Devs, Meet AmplifyJS According to the website: AmplifyJS is a set of components designed to solve common web application problems. Sounds prestigious, but what’s actually in this library? AmplifyJS has three main pieces: An AJAX APIA PubSub Event SystemA Client-side Storage API Join me now for a tour of the incredible AmplifyJS library! We don’t really need to concern ourselves with styling and layout issues today so I’m going to use the Twitter Bootstrap library.
Step 1: Setting it Up So, make yourself a project directory. jQuery: Amplify’s AJAX component uses jQuery’s AJAX feature underneath it’s API, at least by default. Then, start off our index.html file like this: All right, we’re ready to go! Amplify.publish And TABLE? Pimp My JS. List.js - Add search, sort and flexibility to plain HTML lists with cross-browser native JavaScript - Vimperator. EJS - JavaScript Templates - Vimperator. Stripe.js - Vimperator. Stripe.js is our foundational JavaScript library for securely sending sensitive information to Stripe directly from the customer’s browser.
Including Stripe.js However you’re using Stripe.js, you always begin by including the library and setting your API key. To get started, include this script on your pages—it should always be loaded directly from To best leverage Stripe’s advanced fraud functionality, include this script on every page on your site, not just the checkout page. This allows Stripe to detect anomalous behavior that may be indicative of fraud as users browse your website. Stripe(publishableKey[, options]) Use Stripe(publishableKey[, options]) to create an instance of the Stripe object. Var stripe = Stripe('pk_test_6pRNASCoBOKtIshFeQd4XMUh'); const stripe = Stripe('pk_test_6pRNASCoBOKtIshFeQd4XMUh'); We've placed a random API key in the code.
When you’re ready to accept live payments, replace the test key with your live key in production. Stripe options. Create a new Fiddle - jsFiddle - Online Editor for the Web (JavaScript, MooTools, jQuery, Prototype, YUI, Glow and Dojo, HTML, CSS) - Vimperator. Why does [5,6,8,7][1,2] = 8 in Javascript - Stack Overflow - Vimperator.
Jquery - Get query string values in JavaScript - Stack Overflow - Vimperator. 20 JavaScript Frameworks Worth Checking Out. The number of web applications being created and used has grown rapidly since the new millenium. And importantly, so has the sheer complexity of them -- specially on the front end. No more static pages, no sir!
You have a ton of sections each interacting with each other and the server and yes, it's as complicated as it sounds and just as hard to pull off. Today, I'd like to talk about a few choice JavaScript frameworks that aim to simplify front-end application development. If you think jQuery is the answer, you lose a cookie and get an F grade! Creating responsive, fluid, and maintainable interfaces for web apps isn't as easy as one would imagine -- there is data to be sent back to the server and the results parsed, data stores to be updated, views to be re-rendered and so much else that needs to be done in the background.
Sure, a few of these may be a little old but their code bases have lots of lessons to teach. Related links: Introduction to Sammy.js Github Repo Google Code. The Best Way to Learn JavaScript. Learning something new is scary. For me, the biggest issue with picking up a new skill is that I don’t know what I don’t know. Given that, it’s often useful to find a plan for learning whatever you’re interested in. That’s what this post is: your blueprint, your roadmap, your plan of action for learning JavaScript! You don’t have to worry about finding the best resources, sorting out the bad ones, and figuring out what to learn next. It’s all here. JavaScript is the language of the browser. Before you actually begin learning JavaScript, take a minute to understand what it is and does. JavaScript is not jQuery, Flash, or Java. JavaScript is the language of the browser (not exclusively these days, though).
One more note: you’ve heard about jQuery, which is probably the most widely-used JavaScript library. You might even have heard someone say that you should start with jQuery (or another library) and learn JavaScript after. A handful of good introductions, if I may: So, what can you build? Book Code Examples. Google & the Future of JavaScript. There’s very little public information yet about Dart (nee, Dash), and as I’m not on Lars’ team I can’t comment about it. More details will be forthcoming at the GOTO session next month. I’ll also be at GOTO, speaking on JavaScript and the state of the web platform. Making the rounds is an accidentally leaked early draft of notes from a meeting last year that discusses both Dart and JavaScript.
I work on many web platform-related things at Google, including serving as a representative to TC39, the body that standardizes the JavaScript language. I wasn’t at the meetings having previously committed to presenting at FFJS, but my views were represented by others and my name is on the document. So what’s the deal with Google and JavaScript? Simply stated, Google is absolutely committed to making JavaScript better, and we’re pushing hard to make it happen.
But it’s not the end — not by a long shot. Reality Check There are risks, of course. Stream.js — streams in javascript. Getting started - jsOAuth Manual & Documentation. Smoke.js. A framework-agnostic styled alert system for javascript. Lightweight, flexible, css3 animation, blah blah blah easy to use something clever needs to go here. Best of all, it's really easy to use. WOW! Look at these examples: You can implement these the same way you'd use the js alert()...just put "smoke. " in front of it. The confirm() replacement, however, needs to be used just a little differently: smoke.confirm('You are about to destroy everything. Prompt(), similarly: smoke.prompt('what\'s my name? ' And if you want the smoke.alert() to behave exactly like a native alert(), you can have subsequent actions happen in a callback like so: smoke.alert('look at that alert, man.', {}, function(){ // oh what now? Want to do custom button labels?
Need a default value for a prompt? Maybe you want to specify different styles for a specific alert. Additionally, it's super easy to change the look of your dialogs. Humane JS. Kraken JavaScript Benchmark (version 1.1) Kraken JavaScript Benchmark. Harmony:harmony. The harmony namespace is intended to contain approved proposals for the ES-Harmony language. The following requirements, goals, and means help to inform and guide development of proposed extensions and improvements to ES5 for ES-Harmony. Straw-man proposals live in strawman until approved by TC39, at which point they move into the harmony namespace, linked from the proposals page. Working drafts of the specification for the next edition of ECMAScript that incorporates Harmony proposals is on the Specification Drafts page. — Brendan Eich 2009/07/29 23:42 TC39 Process that applies for the features from ES7 forward is described here:TC39 Process — Dmitry Lomov 2014/01/30 11:47 Requirements New features require concrete demonstrations.
Goals Be a better language for writing: complex applications; libraries (possibly including the DOM) shared by those applications; code generators targeting the new edition. Means Minimize the additional semantic state needed beyond ES5. Themes. gRaphaël—Charting JavaScript Library. RingoJS.
Skilldrick » Closures explained with JavaScript. How to roll out your own Javascript API with V8 - Olivier Lalonde's blog. Update: I wrote a new tutorial on porting our V8 code as a Node.js extension: How to write your own native Node.js extension. Introduction This tutorial will teach you how to: Compile the V8 Javascript engineBind a Javascript function to your own C++ function For the sake of demonstration and to impress your co-workers, we will bind a Javascript function “alert()“ that will display desktop notifications through the GTK library. Here’s what the end result looks like: You can get the full source code of this tutorial from github: git clone This tutorial was tested on Ubuntu 10.04 and 10.10 64-bit but should work fine on any Linux distribution. Compiling Google’s V8 Javascript engine First, let’s make sure we have all the required tools and dependencies to compile. sudo apt-get install build-essential scons subversion Now, let’s grab V8’s source from the official repository: svn checkout v8 cd v8; scons arch=x64; Conclusion.
Skilldrick » Closures explained with JavaScript. Last year I wrote A brief introduction to closures which was meant to help people understand exactly what a closure is and how it works. I’m going to attempt that again, but from a different angle. I think with these kinds of concept, you just need to read as many alternative explanations as you can in order to get a well rounded view. First-class functions As I explained in Why JavaScript is AWESOME, one of the most powerful parts of JavaScript is its first-class functions. So, what does “first-class” mean in a programming language? Can be stored in variables and data structures can be passed as a parameter to a subroutine can be returned as the result of a subroutine can be constructed at runtime has intrinsic identity (independent of any given name) So, functions in JavaScript are just like objects.
The ability to nest functions gives us closures. Nested functions Here’s a little toy example of nested functions: The important thing to note here is that there is only one f defined. JS/CSS packaging to minimize requests and randomly evil algorithms - Ben Kamens - building things, mostly software. From Joel’s recent IAmA on reddit, w/ ellipses thrown in haphazardly: "What kind of sacrifices do you make on stackoverflow.com in order to obtain speed/efficiency? " “Heavy caching…lavish spending…a willingness to let developers spend time on optimization.”
The performance benefits of packaging up your bunches of javascript and css files into as few requests as possible are well known. We recently made a couple changes to the packaging system used for www.khanacademy.org that are worth mentioning, especially for anyone else on App Engine. The whole point of a javascript/stylesheet packaging system is to be able to cleanly split code into a bunch of different files like this: …while only issuing one request to grab all of these files, in their proper order, combined and minified into a single payload, like this: As always, you’re immediately faced with a decision about how to version this file.
There are three problems here. App Engine’s "all.js? Consider the following scenario: JSPP – Morph C++ Into Javascript | Vjeux. C++ has a new standard called C++0x (Wikipedia, Bjarne Stroustrup) that includes many interesting features such as Lambda, For Each, List Initialization ... Those features are so powerful that they allow to write C++ as if it was Javascript. The goal of this project is to transform C++ into Javascript. We want to be able to copy & paste Javascript into C++ and be able to run it. While this is not 100% feasible, the result is quite amazing. This is only a prototype. In about 600 lines of code we manage to make the core of the Javascript language. The Javascript Object notation can be emulated thanks to C++0x initialization lists and a bit of operator overload hackery. _ has an operator [] that returns a KeyValue object, that has an operator = overload that fills both keys and values.
There is an ambiguity with nested initialization lists, we use _() to cast the list into an Object. Function C++ is strongly typed and even lambdas have types. Closure Instead, we have to capture it by value. The Complete Javascript Number Reference. What to Read to Get Up to Speed in JavaScript. Chrome Developer Tools: Understanding Stack Traces.
Web Inspector: Understanding Stack Traces. Get started with object-oriented JavaScript code. Essential JavaScript Design Patterns For Beginners. Underscore.js. RequireJS. Live.js - One script closer to Designing in the Browser. Perf impact of passing references. Weekends are for hacking. Here's some unCRUDdy inspiration - NowJS Blog. PhantomJS: The Power of WebKit but Without the Broswer. Useful JavaScript and jQuery Tools, Libraries, Plugins - Smashing Magazine.
Weekends are for hacking. Here's some unCRUDdy inspiration - NowJS Blog. Creating Animated Particles in Water Effect using JavaScript. Sophisticated Sorting in JavaScript » JavaScript & CSS » SitePoint Blogs. JavaScript, JavaScript.
JSLint,The JavaScript Code Quality Tool. Webmaster Tools - Rich Snippets Testing Tool. An Intensive Exploration Of jQuery. The Essentials of Writing High Quality JavaScript. SyntaxHighlighter. JSON. jQuery Quicktag. Introducing Springboard › Minimal JavaScript / CSS / HTML Project Template. Unbeatable JavaScript Tools. Modernizr. Server-side JavaScript development and hosting - Akshell. Succinct Data Structures: Cramming 80,000 words into a Javascript file. 20 Fresh JavaScript Data Visualization Libraries.
Highcharts - Interactive JavaScript charts for your webpage. Awesome vim support for javascript with jsctags and taglist-plus | discontinuously.com. Simple JavaScript Inheritance with Backbone | From the Funnel. JavaScript Guide - MDC Doc Center. JavaScript Garden. JavaScript Trie Performance Analysis.