Browsing articles from "May, 2010"
May
25

Using the jQuery AOP plugin to debug your javascript

Debugging javascript code is not always easy, you have your normal programming flow, but you also have a bunch of event listeners attached to DOM elements that do not really follow a specific pattern.

Hunting listeners in JS files can be quite tedious, this is where the AOP plugin can help you.

What is Aspect Oriented Programming? (AOP)

“In computing, aspect-oriented programming (AOP) is a programming paradigm which isolates secondary or supporting functions from the main program’s business logic. It aims to increase modularity by allowing the separation of cross-cutting concerns, forming a basis for aspect-oriented software development.”

A good AOP article

In javascript, using this technique, you can bind listeners to any function or object, which will be fired when the function is executed. With this information, you can know…


May
20

A javascript module framework starter

This is the following article to part 1 on javascript patterns.

A namespace to rule them all

This is a small javascript framework that I use for starting my javascript/jQuery project. I think it could be most beneficial for those coming from libraries like jQuery. Dojo being quite expressive on how to work with it, and Mootools and Prototype being a bit more structured.

A small note, I used jQuery in the framework because of the AOP plugin (and because I mainly work with jQuery), you can erase any jQuery reference easily in less than 30 seconds .

What this framework aims to do:

  • Easy to understand
  • Modular
  • Each module will heritage a set of tools and each module can be instantiate
  • One namespace
  • Can apply tests or unit test out side of the…

May
19

Javascript patterns headache, the path to modular applications (part 1)

With libraries like jQuery, manipulating the DOM, ajax calls, animating has become really trivial. The problem is, it also becomes easy to have a mess of DOM ready statements without any comments or structure.

One thing most javascript developers start to do at some point is use objects literal to structure their code. This is a start, but currently creating a front-end intensive web app, I started to wonder if I could do better.

My goal was:

  • Easy to understand
  • Modular
  • Each module will inherit a set of tools and can be instantiated
  • One namespace
  • Can apply tests or unit test from outside of the application.
  • Can use the aop plugin (aspect oriented programming) to add logs to internal functions

First, I would suggest you look at a couple of resources if you are…


May
18

Back to blog 101!

As you can see Position Absolute changed of skin a bit.

Unfortunately since last December, I had less time for the site and I decided to go back to a simple blog. I will be posting more in-depth article about JS, CSS and mobile (I already have 2 articles near ready to ship), but a lot less news.

I am also in the development process of a relatively big web application, and I will certainly share with you every stage of this project.


RSSSome Tweets