tags:

views:

35

answers:

2

I am using Sinatra and I am in the middle of designing some models. My dilemma is that the model is a File and the best name really is just File. I also need a FileStreamer class related to this specific file, which name is also in use.

What is the best approach for this design? Can I namespace these classes by nesting them in the same class that inherits from Sinatra::Base or should I name the classes something more specific like AppNameFile? Which would be the best practice?

+1  A: 

I would suggest AppNameFile because it's a little more clear when code is seen out of full context.

FrustratedWithFormsDesigner
A: 

Why no pack your app into a namespace aka AppName::File.

Tass
That's what I was asking, which is considered best practice.
CountCet
Namespacing saves you a bunch of typing - and `AppName::File` is cleaner. Put logic into Namespacing. :-)
Tass