Questions tagged [namespace-organisation]

35 questions
11
votes
1 answer

DDD: Domain model namespaces convention

I'm writing an application with a domain model in PHP, and am wondering which naming convention I should adopt. Let's say I have a Customer, having an Address within its aggregate root. I also have a Product, having an Option within its aggregate…
11
votes
3 answers

How can I export from a Meteor package into my app's namespace?

I know how to write Meteor packages but I can't seem to figure out how to have all exports land in my app's namespace, as described in this presentation. This particular package is specific to an app I'm building, and it exports only one method that…
6
votes
1 answer

Best approach to tackle class naming collisions between namespaces

I'm hitting a problem with a helper class I am working on to translate between 2 classes of the same name. Both classes are outside my scope of control, so I can't simply rename them. My basic options all involve declaring the namespace in full for…
seanhodges
  • 17,426
  • 15
  • 71
  • 93
6
votes
5 answers

is it a good idea to have classes with the same name in different namespace in c#?

for example, we have two classes for parsing the resumes, one to parse Excel and the other to parse HTML.what my colleagues love to do is to name these two classes the same name and put them into different namespace,like shown as below: namespace…
John Cai
  • 63
  • 5
6
votes
1 answer

Where to put Delegates in .Net Solution

I have a C# .Net collection of solutions which started as a proof of concept, and has grown to almost 15 different projects. I am currently in the process of rewriting the whole product family, and trying to maintain best practices to the best of my…
Élie
  • 1,285
  • 1
  • 12
  • 27
5
votes
4 answers

(C++) Linking with namespaces causes duplicate symbol error

For the past few days, I have been trying to figure out how to link the files for a CLI gaming project I have been working on. There are two halves of the project, the Client and the Server code. The client needs two libraries I've made. The first…
Gfdking
  • 111
  • 1
  • 9
5
votes
7 answers

in which namespace / package to put exceptions?

What is the common or best practice to structure the location of your exception classes? Let's say you have the packages/namespaces myproject.person (models and DAOs for persons) and myproject.order (models and DAOs for orders) and the exceptions…
Fabiano
  • 5,124
  • 6
  • 42
  • 69
4
votes
1 answer

Arranging/Organizing my classes/interfaces into folders? Not changing namespace with folder (Resharper: Namespace Provider = false)

I currently have a project and its increasing in size everyday. Its a container for an api i am providing. I currently have in the root all my classes and all interfaces. I have separated my Enums, Contants, etc into their own folders but i don't…
Martin
  • 23,844
  • 55
  • 201
  • 327
4
votes
1 answer

What is structural scope of a type T?

I found about it on wikipedia : structural scope of T (which can be used to locate friend functions) Could someone please explain what is it? Google was not of much help.
q126y
  • 1,589
  • 4
  • 18
  • 50
3
votes
2 answers

Segregate files into folders based on part of filename

I've a folder containing thousands of images that I've catalogued, and I need to separate them into folders based on part of their name. Each section of a name is separated by '_'. A typical file name is DATE_OBJECTCODE_SUBCODE_X_01.jpeg like 210526…
bshfrd
  • 31
  • 3
3
votes
1 answer

YUI3, Modules, Namespaces, calling functions

I would like to port the javascript code from my page to YUI3. After reading many posts (questions and answers) here and lots of information in the YUI3 page and in tutorials I have come to the conclusion that the best way to do it is by splitting…
user597009
  • 51
  • 6
3
votes
1 answer

Outer namespace dragging in std namespace during lookup

I am currently refactoring some old code to meet C++14 standards of correctness and something weird is happening. This error is so far unique and does not appear in the rest of the code. I've obfuscated the actual types because they aren't…
Casey
  • 10,297
  • 11
  • 59
  • 88
3
votes
1 answer

On namespace 'names': ::std:: vs std::

I have been looking over some posts here on Stackoverflow, and I have noticed that most people use std:: but some people uses ::std:: I think i have read something about a global scope or something like that in namespaces as a reason to use ::std::…
José D.
  • 4,175
  • 7
  • 28
  • 47
2
votes
0 answers

Any way for python file name to not end up in fully qualified name?

Say we have this file structure: project/ - ticklers/ - kitten_tickler.py - class KittenTickler - puppy_tickler.py - class PuppyTickler Assume KittenTickler has enough complexity to not want to share its file with PuppyTickler. The…
Amadan
  • 191,408
  • 23
  • 240
  • 301
2
votes
2 answers

MVC Namespace organisation

Hoping the SO community can help to resolve a debate in the office. At the moment our conclusion is 'it depends' ! In MVC, how do you organise your namespaces? Option A Do you go down the MS ASP.NET MVC route of having a Models, Controllers and…
Duncan
  • 10,218
  • 14
  • 64
  • 96
1
2 3