Many developers use popular JavaScript static code analysis tools such as JSHint, UglifyJS, and the RequireJS Optimizer in their workflows.
Unfortunately, not many developers know how to create similar tools for themselves.
Many developers use popular JavaScript static code analysis tools such as JSHint, UglifyJS, and the RequireJS Optimizer in their workflows.
Unfortunately, not many developers know how to create similar tools for themselves.
Building JavaScript web apps today that you will still enjoy working on a year from now is difficult. The solution is to decrease code complexity and increase maintainability. Easier said than done.
This talk will review some of the traditional maintainability roadblocks facing JavaScript client-side developers, and introduce a new project workflow with RequireJS and Almond.js/AMDClean.js.
JavaScript design patterns are important for the maintainability and scalability of web applications. While working on the AddThis Smart Layers product, the team focused on writing DRY (Don’t Repeat Yourself), consistent, and cross-browser compliant code. Before we talk about the specific techniques that we used, let’s first understand the Smart Layers use case.
It is a competitive advantage for websites to be fast and responsive. When building the AddThis Smart Layers tool suite, performance was a priority and first-class feature. Let’s take a look at some of the mobile and desktop performance best practices that I (and the rest of the AddThis team) used to make Smart Layers blazing fast.
In June 2013, I presented about modular jQuery plugins at the jQuery Portland 2013 conference. You can watch my entire presentation video and/or check out my full slide deck, but let’s review my talk.
In May 2013, Packt Publishing published my Require.js book, Instant Dependency Management with RequireJS. This book is perfect for intermediate to advanced JavaScript developers who are interested in learning more about AMD and Require.js.
Back in February 2013, I presented about jQuery best practices at the Nova Web Development User Group meetup. Let’s take a moment to review my presentation.
AMD (Asynchronous Module Definition) script loaders are fast becoming one of the most popular and important tools for organizing and maintaining JavaScript applications. Many front-end developers, like myself, are becoming educated on the benefits of using a module system that promotes code reusability/decoupling, freeing the global namespace, dependency script management, and more.
Backbone-Require-Boilerplate is a popular open-source boilerplate library that I created to help promote best practices when using Backbone.js with Require.js.
An IIFE, or Immediately Invoked Function Expression, is a common JavaScript design pattern used by most popular libraries (jQuery, Backbone.js, Modernizr, etc) to place all library code inside of a local scope.
Backbone.validateAll is a small Backbone.js plugin that provides an option to only validate Model properties that are currently being set or saved.
Popular Open Source (OS) projects are self promoted by their easy to read, organized, and exhaustive documentation. Great examples include Backbone.js, Can.js, jQuery++, Underscore.js, jQuery, HTML5 Boilerplate, Require.js, Twitter Bootstrap, and many more.
Many of the most popular Open Source (OS) projects understand that flexibility and performance is very important for users. Since it is nearly impossible to create a project that is a perfect fit for all users, many OS projects provide a custom build option. This allows users to specify which parts of a project he/she wants and then download only those parts (thus minimizing file size).
I am officially pronouncing 2012 as the year of the JavaScript MV* frameworks. Although many people complain that the JavaScript MV* frameworks boom has created too many frameworks to choose from, which further divides the developer community, let’s look at the glass half full.
Require.js 2.0 was recently released by James Burke, and with it comes a bunch of bug fixes and enhancements. The major enhancement that I wanted to shed light on includes the new Shim
configuration.
Backbone.js is a great client-side MV* (not MVC) JavaScript framework that provides structure to JavaScript applications by providing View, Model, Collection, and Router classes. Backbone also provides a pub sub (publish subscribe) mechanism, by allowing each of it’s objects to trigger and bind to events.
Have you ever written code like this?
1 2 3 4 5 6 7 8 |
|