0

My program has a Model Foo and a namespace that I want to also call Foo. They both make sense to me, but I want to avoid namespace and classname collisions.

Which one should I change? The namespace App.Foo or the Model App.Models.Foo?

Note: I'm using mvvm structure so I have binding code in the namespace App.Foo which uses App.Models.Foo in many places, therefore causing collisions unless I specify Models.Foo everytime (which is ugly).

danielr
  • 130
  • 1
  • 8
  • 1
    If we had the actual names, it would probably still be opinion based but as it is, this is also too abstract. "I have two things called Foo, which one should I rename?" - how should we know? It'll come down to whichever one you can come up with a better alternative name for. – Damien_The_Unbeliever Nov 30 '16 at 08:54
  • I see, thanks for your input Damien. I've chosen for now to google synonyms for my Foo and rename the namespace as that would be easier for me. – danielr Nov 30 '16 at 08:56

1 Answers1

1

I would opt for renaming App.Model.Foo to FooModel, as you would likely have at least one FooView and FooViewModel...

Given your short description, Foo seems to be rather a high-level concept, and FooModel would be the "data" representation of this concept...

My 2 cents