What neat ways do you use for declaring JavaScript namespaces. I've come across this one:
Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Sunday, June 3, 2012
Javascript Namespace Declaration
Sunday, May 27, 2012
Should Usings be inside or outside the namespace
I have been running StyleCop over some C# code and it keeps reporting that my using statements should be inside the namespace.
Tuesday, May 15, 2012
Is it ever okay to have a class as a collection of methods and no properties?
I'm writing a bunch of generic-but-related functions to be used by different objects. I want to group the functions, but am not sure if I should put them in a class or simply a flat library file.
Thursday, May 3, 2012
Java-esque OOP in JavaScript and a jQuery fail
I'm working on a project and I'm really trying to write object-oriented JavaScript code. I have just started reading Douglas Crockford's JavaScript: The Good Parts and I'm quickly beginning to realize that writing Java-esque OOP in JavaScript will be a difficult task.
Jquery plugins occupy the same function name -> conflict
I've ran into a problem using jquery expose plugin alongside Masked Input plugin. The problem is they both occupy $.mask function which leads to conflict. But I vitally need this two plugins to work together. I would rename $.mask in one of them to... let's say, $.msk , but in this case I'll always need to remember it and if I want to upgrade to new version, I will rename again.
Tuesday, May 1, 2012
Large backbone.js web app organization
I'm currently working on a large web app built on backbone.js and have been having a lot of issues with organization, "zombies," etc. so I've decided to do a major refactor of code. I've already written a bunch of helper functions for dealing with the "zombies"; however, I'd like to start from the very beginning and create a nice structure/organization to the code. I haven't found many great tutorials/examples on large-scale backbone.js organization so I've sort of started from scratch and would like to see if I can get some opinions on where I've begun.
Friday, April 6, 2012
To PHP Namespace or not to PHP Namespace
ok, I'm relatively new to PHP programming and have been plodding along quite unaware that it is possible to actually use namespaces in PHP as I can in c# etc.