This link has been bookmarked by 71 people . It was first bookmarked on 07 Aug 2006, by someone privately.
-
17 Feb 12
-
01 May 11
-
16 Nov 10
-
24 Jun 10
Ethan GardnerA nice little snippet to namespace your JavaScript.
-
11 Jun 10
-
28 Mar 10
-
20 Mar 10
-
04 Mar 10
-
28 Feb 10
-
15 Feb 10
-
23 Oct 09
-
15 Oct 09
-
06 Oct 09
-
13 Aug 09
brokenclockNamespacing your JavaScript
Monday, April 24th, 2006
Perhaps a very uncommon approach to developing web applications that require JavaScript (but should be more common) is namespacing your scripts. This can be done very simple-like in a manner that is pinfo en javascript namespace web webdev js reference programming
-
06 May 09
-
10 Jan 09
-
12 Nov 08
-
20 Sep 08
-
10 Sep 08
-
26 Aug 08
Nick DaweDan Webb
April 25th, 2006 at 7:54 am
This technique creates a namespace rather than a ‘class’ that can have multiple instances. Be careful not to confuse them. You can put object constructors inside your namespaces though:
var animals = (function() { -
11 Aug 08
-
02 Jul 08
-
16 Jun 08
-
29 May 08
-
11 May 08
-
21 Apr 08
-
20 Mar 08
-
31 Jan 08
-
30 Jan 08
-
17 Dec 07
-
16 Dec 07
-
15 Jul 07
-
28 Mar 07
-
16 Jan 07
Andre MalheiroThe benefit of this structure is that due to the fact that we have a function literal, we can add private properties and methods into the function before returning an object.
-
11 Jan 07
-
13 Dec 06
-
22 Aug 06
-
24 Jul 06
-
18 Jul 06
-
03 May 06
-
27 Apr 06
-
26 Apr 06
Peter SylwesterPerhaps a very uncommon approach to developing web applications that require JavaScript (but should be more common) is namespacing your scripts.
-
25 Apr 06
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.