For many programming languages, namespace is a context for their identifiers. Use this tag to indicate concerns about appropriate usage of namespaces.

learn more… | top users | synonyms

1
vote
2answers
17 views

JS namespacing code

I have written a wrapper for my code that allows basic namespacing and I'd like some feedback on how it can be improved. It is designed so that a module can define it's namespace and get access to ...
0
votes
0answers
119 views

PHP autoload class design for a framework

I'm developing a php framework called Stack. I just created the autoload.php as follows. ...
3
votes
2answers
140 views

C++-safe way to use using inside headers

I have this C++ 14 code in a project of mine. Enhedron/Util/Enum.h: ...
-2
votes
1answer
43 views

Initializing a namespace tree [closed]

I have a global namespace where developers attach object singletons, class definitions, constants, etc. Each JS file has its own crafty flavor of namespace tree initialization. Maybe a module pattern ...
2
votes
0answers
65 views

Configuration class

This is my first serious programming effort, so I'd like some comments about what I did so far. Project structure: ...
2
votes
1answer
134 views

Socket namespace for a chat module

I finally managed to work with socket.io namespace stuff which I'm using for building a chat module. Here, employees of multiple organizations can join and vhat with other employees of the respective ...
2
votes
0answers
74 views

Namespace handling and inheritance managing with Node.js

The following code should solve these issues: Handle namespaces; Be a class factory from Pojos Be a object factory Create a class with inheritance capabilities from a POJO using john resig ...
3
votes
1answer
1k views

Extracting the text of a specific XML node

I have to extract friendlyName from the XML document. Here's my current solution: ...
7
votes
1answer
826 views

User defined string literals and namespace use

I have a need to process URIs in one of my applications, sometimes from const char[] literals. My API: ...
11
votes
2answers
248 views

Namespacing jQuery/jQueryUi into markup that I don't control

I have a project that I've been trying to get just right for the past three months and it's still not quite there yet. I'm injecting some jQuery and jQueryUI code into pages that I have no control ...
10
votes
4answers
204 views

JavaScript Good Patterns - Is this a good example?

I have been trying various formats of namespaces and modules patterns, however I have not come across a solution that I would use for all my projects. I've been developing the following, that would ...
6
votes
1answer
397 views

My first project using namespaces

I have to create some APIs for a online game and I decided to learn to use namespaces correctly. I used the factory pattern, then the loadModule method checks if ...
3
votes
1answer
137 views

jQuery accordion list

I'd like some tips on optimizing the following code. I'm a bit concerned that I'm 'polluting the global namespace' by not wrapping it in a function. The commented out ...
15
votes
3answers
22k views

Conversion between enum and string in C++ class header

I have the following redundant-feeling design to convert between enums and strings regarding a class that stores enums. The ...
3
votes
1answer
377 views

Eliminating unwanted namespaces

I am trying to eliminate unwanted namespaces, and I know there's a better way to do this. This code works, but it's remedial and redundant. ...
8
votes
3answers
3k views

Use of nested namespaces in 3D graphics engine library

I know that nested namespaces are used in C++ very rarely. But I think it's a nice solution to exclude types from global scope and sometimes it helps to write programs faster when we use things like "...