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

rename lib #1280

Closed
elvisbegovic opened this issue Dec 1, 2016 · 18 comments
Closed

rename lib #1280

elvisbegovic opened this issue Dec 1, 2016 · 18 comments
Labels

Comments

@elvisbegovic
Copy link

elvisbegovic commented Dec 1, 2016

Since Angular use semver, ng2- prefix's anti pattern, might be:

  • vs-bootstrap
  • valor-bootstrap
@valorkin
Copy link
Member

valorkin commented Dec 4, 2016

in my opinion, company name in lib name is inappropriate.
so it could be ng-bootstrap (and produce complete mess)
or @ng/bootstrap or @ngx/bootstrap

@valorkin
Copy link
Member

@istiti what about ngx- prefix?

@critchie
Copy link

critchie commented Dec 28, 2016

I found this. A prefix is definitely needed if anything just to mark your territory so to speak. Helps me easily identify which library a component belongs too. Using ngx- doesn't feel right because it is random and has no connection back to Valor Software. I'd have no problem with valor-. Or ngv- maybe?

Also don't miss this.

@valorkin
Copy link
Member

ngx- is an initiative by @ocombe and @amcdnl
as a common name space for angular 2+ libs

@critchie
Copy link

So what will Valor Software use for the ng2-charts library? @amcdnl already has a ngx-charts.

I liken these Angular namespaces to how Java uses the reverse domain name for their name spacing. Like com.valorsoftware.ng.bootstrap for example. They are guaranteed unique in the Java world where in Angular... not so much; but at least we are trying. This is why I like @istiti's valor- suggestion.

Having a common ngx- prefix doesn't solve anything IMO. Unless what you put in it is truly common, like reusable pipes or something.

(I'm using ng2-charts. Very nice work and the library is simple to use. The other chart libraries didn't have what I needed.)

@amcdnl
Copy link

amcdnl commented Dec 28, 2016

I'd go for ngx-bootstrap.

@critchie - This isn't Java so I don't think we should emulate that pattern. Also in JavaScript, name lengths are KB's sent to the browser, so shorter is better.

If scoping is an issue, I'd do @valor-software\ngx-bootstrap in npm.

@elvisbegovic
Copy link
Author

I agree with @critchie

@ocombe
Copy link

ocombe commented Dec 28, 2016

Like @amcdnl said, the name on npm is irrelevant, you can use a scoped module.
And the collisions in the code are probably not a real problem either because if two libraries have the same name then they probably do something similar and you won't use both at the same time.

@critchie
Copy link

I will leave it to you component experts on this. I appreciate what you guys do. I can only speak from experience from my days in Angular 1 of trying to get UI Bootstrap and AngularStrap to work in the same project.

@ocombe - "And the collisions in the code are probably not a real problem either because if two libraries have the same name then they probably do something similar and you won't use both at the same time."

That's a dangerous assumption if I interpret what you are saying correctly.

I have designers and end users that are pretty demanding in how their apps work. Sometimes I have to pick and choose components from libraries that are trying to accomplish the same thing. For example, I came to ng2-bootstrap because it has a typeahead that handles grouping of results. Now that I am using ng2-bootstrap I will do my best to use only ng2-bootstrap to keep the headaches down. But, I may get to a point where I need to bring in ng-bootstrap because, as an example, their datepicker does what my users want (more like demand).

I really like with ng2-bootstrap that I can import just what I need from the library and this should help with collisions and tree-shaking. (I think it does anyway... I could be wrong on this. Tree-shaking may work no matter how the library is structured.)

@ocombe
Copy link

ocombe commented Dec 28, 2016

yes, if the library is modularized you should not have name collisions.
You can always rename services, I wish you could rename directives / pipes selectors as well... it's a design flaw in my opinion.

Anyway exported modules are usually just for convenience, you can import just a small component from a library if you need (you'll have to be careful about its dependencies though)

@sumpton
Copy link

sumpton commented Dec 28, 2016

ngv- is relatively clean, safe, memorable, easy, and relatable to Valor. valor- sort of limits Valor to ng2 project.

We use ngbTabset for type pills and I like how it is easy to identify in our code.

Of course, I don't care a lot, and appreciate being able to use all this clever work -- regardless of the name space.

@valorkin
Copy link
Member

bs* prefix for modules and directives and components and ngx-* prefix for libs,
ok?

@ocombe
Copy link

ocombe commented Jan 13, 2017

sounds good to me

@Martin-Luft
Copy link
Contributor

Google wants that we all use the word "Angular" instead of "AngularJS", "Angular 2", "ng2", "Angular 4" or "ng4". So why not angular-bootstrap?

@valorkin
Copy link
Member

valorkin commented Apr 7, 2017

done, renamed to ngx-bootstrap

@valorkin valorkin closed this as completed Apr 7, 2017
@elvisbegovic
Copy link
Author

elvisbegovic commented Apr 7, 2017

good news :) too much time to decide, name not so important

wonder if google succeeded with "google" name

@valorkin
Copy link
Member

valorkin commented Apr 7, 2017

@istiti problems was not with decision, ngx-bootstrap npm name was busy
so I had to go through npm dispute process

@dev054
Copy link

dev054 commented Jun 19, 2018

bs* prefix for modules and directives and components and ngx-* prefix for libs,
ok?

What happened to the above comment? I can see a lot of selectors not being prefixed. cc @valorkin

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

No branches or pull requests

8 participants