Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing namespaces #208

Open
vbrazo opened this issue Oct 5, 2018 · 2 comments
Open

Introducing namespaces #208

vbrazo opened this issue Oct 5, 2018 · 2 comments

Comments

@vbrazo
Copy link
Member

vbrazo commented Oct 5, 2018

We want to create namespaces because you and I like Faker and want to keep the library organized and easy to use. Besides that, we need to determine great taxonomy to maintain and scale our modules.

I'm going to start suggesting a few namespaces for the current modules.

Faker.Bitcoin => Faker.Blockchain.Bitcoin

Faker.Cat => Faker.Creature.Cat
Faker.Team => Faker.Creature.Team
Faker.Team.En => Faker.Creature.Team.En

Faker.Pokemon => Faker.Fiction.Pokemon
Faker.Pokemon.En => Faker.Fiction.Pokemon.En
Faker.StarWars => Faker.Fiction.StarWars
Faker.StarWars.En => Faker.Fiction.StarWars.En
Faker.Superhero => Faker.Fiction.Superhero
Faker.Superhero.En => Faker.Fiction.Superhero.En

Faker.Beer => Faker.Objects.Beer
Faker.Beer.En => Faker.Objects.Beer.En

I'll try to come with taxonomy for the other modules soon. Feel free to suggest a few good namespaces. Your ideas are always welcome.

Faker.Address
Faker.Address.En
Faker.Address.Es
Faker.App
Faker.Avatar
Faker.Cat.En
Faker.Code
Faker.Code.En
Faker.Color
Faker.Color.En
Faker.Color.Es
Faker.Color.PtBr
Faker.Commerce
Faker.Commerce.En
Faker.Company
Faker.Company.En
Faker.Date
Faker.DateTime
Faker.File
Faker.Food
Faker.Food.En
Faker.Gov.Us
Faker.Industry
Faker.Industry.En
Faker.Internet
Faker.Internet.En
Faker.Internet.Es
Faker.Internet.PtBr
Faker.Internet.UserAgent
Faker.NaiveDateTime
Faker.Name
Faker.Name.En
Faker.Name.Es
Faker.Name.PtBr
Faker.Nato
Faker.Phone.EnUs
Faker.Phone.EnGb
Faker.Pizza
Faker.Random
Faker.Random.Elixir
Faker.Random.Test
Faker.String
Faker.Util
Faker.UUID

Lorem already looks ok, doesn't it?

Faker.Lorem
Faker.Lorem.Shakespeare
Faker.Lorem.Shakespeare.En
Faker.Lorem.Shakespeare.Ru
@anthonator
Copy link
Collaborator

I'm not sure how I feel about additional namespacing. It doesn't seem incredibly intuitive to me. I'd never think to look for StarWars under Fiction. It's also adding additional vertical space that I think is unnecessary.

Just my $0.02. 😄

@altyaper
Copy link

altyaper commented Oct 6, 2019

I think it's quite good idea to extend a little bit the namespaces as you suggest @vbrazo, We could prevent to have overwritten modules. I can take this task of the suggested namespaces you provided if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants