question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@dbouwman @jgravois @noahmulfinger @dmfenton @araedavis @ajturner I think we need to discuss standardizing naming of our packages.

Currently we have 1 package called arcgis-core. This seems way to general to me. I would propose:

  • arcgis-rest-client-js - this would mean all our packages would be arcgis-rest-client-js-*. Kinda long.
  • arcgis-rest-js - this would mean all our packages would be arcgis-rest-js-*. Kinda long.
  • @esri/rest -client - no need to use js in the NPM and package names. npm install @esri/rest-client-core.

Come up with something else like Koop, Winnow, Terraformer, ect… I’ve pulled from architectural terms before so I’ll suggest some:

  • truss - taken on npm. Could do arcgis-truss
  • quoin - abandoned name from my first attempt at a Dojo based framework.
  • arris - A modem company, but also unclaimed on NPM.
  • trestle - also taken on NPM could do arcgis-trestle

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:31 (31 by maintainers)

github_iconTop GitHub Comments

3reactions
tomwaysoncommented, Aug 5, 2017

@patrickarlt also from the npm docs:

Each npm user/organization has their own scope, and only you can add packages in your scope. This means you don’t have to worry about someone taking your package name ahead of you. Thus it is also a good way to signal official packages for organizations.

That last sentence gives me the impression that it’s equally valid to use scopes as a way for an organization to publish their official packages, even if they’re unrelated. Generally feels to me like the notion of using scopes for related packages was more important before monorepos started to become more common.

So, regardless of the final names, I think we should use scoped packages.

I know I’m in the minority on this point, but generally, as much as I ❤️ @esri/boutique, I prefer names that try to tell you the lib actually does rather than names based on trees, or esoteric terms that I have to look up to know what they mean. I know that makes for boring, forgetful names. That’s just my 2 cents, and I’ll defer to whatever y’all want.

@jgravois made a really good point re: how a-js prefix is useful for an Esri org repo name, but redundant (implied) for npm packages. So I like his proposed (non-Beastie Boys) names. The only change, if any, that I would consider is what do to about the “core” package. By removing -core, it kind of feels to me that that package rolls up the other ones, like you could just npm i @esri/rest and you get a single lib that includes all of them. Really it’s the opposite, that package is a dependency of the others. I can go both ways on that. I think a lot of prior art informs our expectations. For example babel-core tries to makes it clear that you probably need more libraries to do anything useful, but maybe they had to do that to just to draw a distinction from the previous versions that were “batteries included.” If the objection to -core is that it doesn’t tell you enough about what the package actually does, then how about @esri/rest-request? So:

github.com/Esri/rest-js
npmjs.com/package/
  @esri/rest-request
  @esri/rest-auth
  @esri/rest-portal
  @esri/rest-server
  @esri/rest-geocode

If your app only needs to talk to ArcGIS Online, my expectation would be that you could just npm i @esri/rest-portal and it would install the deps it needs (i.e. @esri/rest-request). Kind of veering into #5 territory here, but I think an ideal goal would be that @esri/rest-auth is not a dependency of the other packages. For example, if someone only wanted to interact w/ public facing services.

2reactions
tomwaysoncommented, Aug 10, 2017

I, for one, think that Esri should make a low level JS library that is a wrapper for our REST APIs as an official product. I think that’s what people should find when people search for “Esri” or “ArcGIS” and “JavaScript” and that the first line should say, if you want to make a map w/ this stuff, see either the JSAPI or esri-leaflet. If you want to make a 3D visualization, see the JSAPI. They use this stuff under the hood.

But that’s just me, and I’m just an old hippie that sold out to the man.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Naming Things | A book about the hardest problem in software ...
Naming is one of the most frequently-used, visible, and timeless skills in software engineering, but it's poorly understood and poorly executed.
Read more >
Naming things - MediaWiki
Naming things is hard. "There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors.
Read more >
Naming Things - DevIQ
The first principle of Naming Things is to be consistent within your team or project. It doesn't matter what your personal preference might...
Read more >
Naming Things - 24 Ways
Names not only allow us to identify objects, but they can also help us describe the objects being identified. Semantics (the meaning or ......
Read more >
Naming things in programming - Medium
Naming things in programming. “There are only two hard things in Computer Science: cache invalidation and naming things.” — Phil Karlton. Naming the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found