Diving into CanJS

May 21, 2012  |  Databases  |  , ,  |  No Comments

If you haven’t heard, there’s a new kid in town: CanJS. What better way to dive into what it offers than to build a contacts manager application? When you’re done with this three-part series, you’ll have all the tools you need to build your own JavaScript applications! Choosing the Right Tool Building a JavaScript application without the right tools is difficult. While jQuery is great at what it does, a DOM manipulation library doesn’t provide any infrastructure for building applications. This is specifically why you need to use a library, like CanJS. CanJS is a lightweight MVC library that gives you the tools...

Read More

Prototypes in JavaScript

May 9, 2012  |  Databases  |  ,  |  No Comments

When you define a function within JavaScript, it comes with a few pre-defined properties; one of these is the illusive prototype. In this article, I’ll detail what it is, and why you should use it in your projects. What is Prototype? The prototype property is initially an empty object, and can have members added to it – as you would any other object. var myObject = function(name){ this.name = name; return this; }; console.log(typeof myObject.prototype); // object myObject.prototype.getName = function(){ return this.name; }; In the snippet above, we’ve created a function, but if we call myObject(), it will simply...

Read More

Why Wine and Macbooks Don’t Mix…and How to Handle the Aftermath

May 2, 2012  |  Databases  |  , , , , ,  |  Comments Off

Ready for a revelation? A concept that you’ve never considered before? Well here it is: never ever, ever pour a glass of wine into your Macbook keyboard. Or, more practically put, be extremely careful when there’s a drink of any kind near your laptop. If a spill occurs, and you don’t act quickly enough, you’ll find yourself staring at a massive bill for a new logic board, hard-drive, battery, and anything in between. Accidents do happen — so plan on it. What’s more important is that you learn exactly what to do when these spills inevitably occur. July, 2010 Step 1. Don’t...

Read More

The Essentials of AMD and RequireJS: New on Tuts+ Premium

April 16, 2012  |  Databases  |  , , ,  |  Comments Off

In this Tuts+ Premium screencast, we’ll review RequireJS, an asynchronous module loader and dependency manager, and AMD, which defines the mechanism and guidelines for declaring and importing modules. Become a Premium member to view this screencast, as well as hundreds of other advanced tutorials and screencasts from the Tuts+ network. You’ll Learn: What is AMD? Why is it helpful? How to use RequireJS, which implements the AMD spec. How to create, store, and reference modules. How to integrate the use plugin. How to import scripts, which do not register themselves as AMD modules. A lightning-fast run-through of importing and working with Backbone.js. Tuts+ Premium The recently re-launched Tuts+ Premium is...

Read More

Automate Your Projects With Apache Ant

March 12, 2012  |  Databases  |  , ,  |  Comments Off

Ever find yourself doing boring, repetitive tasks as a web developer? Today, I’m going to show you how you can cut those meta-tasks out of your development cycle with a little bit of automation. In this tutorial, you’ll learn how to easily perform those repetitive tasks with Apache Ant. March of 2011 Intro: What is Ant? Ant makes it incredibly easy to define a set of tasks that you can then execute with a few commands. Ant is a piece of software that was originally built for automating software builds. It’s made by Apache (yes, as in Apache server), and its primarily purpose...

Read More