Quantcast
Channel: javascript – frag (frăg)
Browsing latest articles
Browse All 37 View Live

MooTools in a distant future: how to write to better survive the changes

You may have already heard this, or maybe not. But this won’t change the fact that javascript is changing and the way people write it and specifically, how they write the libraries, modules and widgets...

View Article


Using overloadSetter / overloadGetter to make flexible functions in mootools

This is a really helpful feature of MooTools that a few people know and use. Basically, there is a pair of 2 Function prototypes called ‘overloadGetter‘ and ‘overloadSetter‘. They are very simple in...

View Article


Manage lazy-loading handlebars / mustache / other templates via MooTools

I have started using Backbone.js but with handlebars templates (like in Ember.js) that I parse through Underscore.js. Anyway, to cut a long story short – I did not want to have a bunch of flat script...

View Article

MooTools Request.Spy – monitor all requests through the Request class prototype

An interesting question on StackOverflow prompted me to look into creating a universal spy/logger for all Requests that MooTools. The objective is: being able to log / spy on all XHR requests w/o...

View Article

MooTools plugins round-up

Time for a round-up of interesting / quality plugins on the MooTools forge or github. Again. First off, my favourite find over the last month has to be the MooTools Router. What it does is handle...

View Article


StrongPass: A password strength helper class

Good news, everyone (I miss Futurama). Three years ago I wrote a mootools plugin for password strength checking, based upon a stack overflow jquery post. I just had cause to revisit this for work at...

View Article

new mootools github repos for handy little tools

Right then. If you don’t follow me on github, this will be news to you. Storage. https://github.com/DimitarChristoff/Storage – it’s a class that allows you to API localStorage or sessionStorage, when...

View Article

Epitome: an example MooTools model / MVC tutorial

I have been a little busy at work but we recently built a small Model class to support our question set and I turned it into a tutorial on how to build your own MV* framework on top of MooTools. It is...

View Article


So you want delayed events in your mootools class?

I recently found that in the context of Class, .fireEvent() accepts a 3-rd argument, delay. Firing deferred events can be useful but you need to understand the full difference between the patterns...

View Article


Epitome goes CI via buster.js and Travis CI

Just a quick note – the MooTools MV* framework I wrote for QMetric called ‘Epitome‘ is now covered by Travis CI automated testing. Read more about how to implement this in your javascript projects in...

View Article

Epitome does todo

Just a quick update, my MooTools MVP library Epitome now has its own Epitome-todo repository as a submodule, an implementation of the popular TodoMVC demo. You can see it live here. If you checkout...

View Article

Spying unobtrusively on Class instance events in MooTools

Ever needed to debug how your Class instances fire Events? It can be frustrating and messy, especially if you do not have access to the original Class prototype source. But, you can hack your way...

View Article

Extend Slick pseudo selector to find data-attributes

This is a relatively simple idea. Select elements with data-attributes that match a pattern, for example, div[data-media-*]. The problem is, CSS selectors don;t allow you to wildcard attributes...

View Article


Image may be NSFW.
Clik here to view.

Preloading images using javascript, the right way and without frameworks

There are two scenarios here. Case 1: you just want to load all your images prior to displaying the rest of your page. Whether that’s because you like it this way or you need to get the browser to...

View Article

Hiding enumerables after MooTools changes prototypes

One of the most common complaints of people when using 3-rd party code that breaks on MooTools pages is when somebody incorrectly tries to iterate through an Array with the for (var in) operator and...

View Article


Doctor, MD – updated for recess 1.1.8 and BootStrap 2.3.2

Just a quick note, updated my nodejs Markdown to HTML site generator Doctor to support the latest recess and BootStrap 2.3.2, latest stable published npm is v0.1.14 The grunt-doctor-md grunt task has...

View Article

Epitome now available as npm and under CommonJS

Just a quick update, Epitome now supports nodejs. Here’s an example creating a server via express and socket.io with a collection and a model that can be shared on the client as well: #!/usr/bin/env...

View Article


localStorage and sessionStorage events to send messages acrosss browser...

This is a somewhat underused and lesser known feature of HTML5 localStorage API. The spec says: The storage event is fired when a storage area changes, as described in the previous two sections (for...

View Article

Tooling for the node.js generation, part I

If you are a front-end developer that has dabbled a little bit in node and like it, you probably need to build a list of tools (npm modules etc) you can use in your day-to-day development. Here’s a...

View Article

Image may be NSFW.
Clik here to view.

primish. It’s like mootools prime but for the intarnets

We waited for ages for MooTools prime to come out and to get adopted and for web builds to show up and to become more MooTools-y. And then, we thought (me and the Grookedge who’s also a MooTools...

View Article

Tooling for the node.js generation, part II

In the previous article, a number of things got covered that help with npm modules you’d want to use in your node.js projects. This is a continuation. anything in a require() is an npm module,...

View Article


Spy on any method on an object and profile number of times called

So, Object.observe will become a standard at some point. In the meanwhile, you may want to unobtrusively log any methods called on an object from the outside. So I wrote this little snippet that helps...

View Article


Introducing Epik: micro MVC on top of primish and lodash

Nearly two years ago, I started work on Epitome, an MVC framework for MooTools. And today, it’s pretty stable and a viable project to use, if you have MooTools in your stack, rather than jQuery....

View Article

Using RequireJS sugar syntax in main.js files

I love the sugar API of RequireJS. It’s elegant, clean and nearly identical to CommonJS. However, the examples often fail to demonstrate how to use it from a main.js file which does a require call,...

View Article

The bane of all reactjs newbies: binding event handlers

It is fair to say at least 1/3 of all reactjs questions posted on StackOverflow can be solved by understanding simple DOM event handler binding. Typically, they look like this: class EmailSignup...

View Article

Browsing latest articles
Browse All 37 View Live