background preloader

Javascript

Facebook Twitter

ReactiveX. What I learned from writing six functions that all did the same thing. The Two Pillars of JavaScript — JavaScript Scene. Before we get into this, allow me to introduce myself — you’re probably going to wonder who I think I am before this is over.

The Two Pillars of JavaScript — JavaScript Scene

I’m Eric Elliott, author of “Programming JavaScript Applications” (O’Reilly), host of the feature-length documentary film-in-production, “Programming Literacy”, and creator of the “Learn JavaScript with Eric Elliott” series of online JavaScript courses. The Single Biggest Mistake Programmers Make Every Day — JavaScript Scene. The Single Biggest Mistake Programmers Make Every Day I recently taught a master class at a conference.

The Single Biggest Mistake Programmers Make Every Day — JavaScript Scene

The first half of the day I stood in front of the class and talked about The Two Pillars of JavaScript: Prototypal OO and functional programming. For the second half, I had the students team up and collaborate on an app project. The assignment was to keep in mind a few key points from the lessons: The long road to Async/Await in JavaScript. This is a comparison of different methods for performing asynchronous control flow in JavaScript, specifically Callbacks, Promises, Generators / Yields (ES6), and Async / Await (ES7).

The long road to Async/Await in JavaScript

To follow along be sure you understand how the JavaScript Event Loop works and what it means when code is executed synchronously in the current stack, or shoved into the queue to be executed asynchronously in the future. In the following contrived examples, publishLevel() is our main application code (perhaps something we’d see in a Controller), whereas getUser(), canCreate(), and saveLevel() are functions nested deeper in our application (perhaps in our Models). Compatibility: Keep in mind that anything marked as ES6 will require Node.js >= 0.12 with the --harmony flag enabled, or any version of io.js >= 1.0. Browser support for ES6 is anything but spectacular and you’ll likely need to transpile.

Anything marked as ES7 will definitely require a transpile for either Browser or Node.js. Coderpower. JavaScript Best Practices. 7 Essential JavaScript Functions. I remember the early days of JavaScript where you needed a simple function for just about everything because the browser vendors implemented features differently, and not just edge features, basic features, like addEventListener and attachEvent.

7 Essential JavaScript Functions

Times have changed but there are still a few functions each developer should have in their arsenal, for performance for functional ease purposes. debounce The debounce function can be a game-changer when it comes to event-fueled performance. If you aren't using a debouncing function with a scroll, resize, key* event, you're probably doing it wrong. Here's a debounce function to keep your code efficient: function debounce(func, wait, immediate) { var timeout; return function() { var context = this, args = arguments; var later = function() { timeout = null; if (!

Functional

React / React Native. Vue.js. Meteor. Backbone.js | Marionette. Nodejs. Tests. Angular. JSDB.io - The Database of JavaScript Libraries. JavaScript for Line of Business Applications. Visualization. LocalStorage, sessionStorage. Templating. Ember. Garbage collector, memory leaks. Websockets, PubSub, SSE, ... jQuery Plugin Boilerplate.

Get the latest updates on this jQuery plugin via RSS A boilerplate for jump-starting jQuery plugins development.

jQuery Plugin Boilerplate

Contains lots of comments to help you get going easily. It implements public and private methods, as well as public and private properties making it the ideal candidate for when building both simple and complex jQuery plugins. It does not adhere to the suggestions made by the jQuery documentation regarding Plugins/Authoring. The jQuery Plugin Boilerplate took some inspiration from Doug Neiner‘s Starter. With comments: Without comments: Usage Requirements. 30+ New Resources, Tools & Apps For Kick-Ass Web Developers. If you are looking for a tool that will check your Javascript or validate your freshly made CSS, or give you an creative advantage with the newest jquery plugins, or do you need the help to create an image sprite, or a new HTML5 Canvas library, or even learning a new CSS framework.

30+ New Resources, Tools & Apps For Kick-Ass Web Developers

Mobile friendly

Frameworks. 20 JavaScript Frameworks Worth Checking Out. The number of web applications being created and used has grown rapidly since the new millenium.

20 JavaScript Frameworks Worth Checking Out

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.