Skip to content
This repository has been archived by the owner on Apr 9, 2018. It is now read-only.

Where do we go from here? #34

Closed
tomwayson opened this issue Nov 10, 2017 · 10 comments
Closed

Where do we go from here? #34

tomwayson opened this issue Nov 10, 2017 · 10 comments

Comments

@tomwayson
Copy link
Owner

tomwayson commented Nov 10, 2017

Now that esri-loader exposes a promise-based API is this library still needed?

The problem is I'm so far out of the Angular game that I'm no longer qualified to even answer that question much less do anything about it. Whereas I can say w/ certainty that ember-esri-loader is definitely needed to get esri-loader in Ember.js apps.

Never mind trying keep this library up to date w/ all the churn in Angular, it hasn't even been updated for recent esri-loader releases. So it will still default to JSAPI 4.3, which is two minor versions behind the latest JSAPI.

Does anyone know of some special sauce that this library adds to make esri-loader easier to use in an Angular app? The NgModule? Is that needed?

If not, what I'd like to see is a couple of the projects that use this library (https://www.npmjs.com/package/angular-esri-components and/or developers.arcgis.com?) try to use the latest esri-loader directly instead. Hopefully we should be able to distill a pattern (npm i esri-loader, a sample service or component snippet, etc), that is simple enough to document it in the README of this library, and then we can deprecate it. There might be a couple of issues around types since I haven't yet configured package.json w/ "types" (nor "module" etc), and generally don't know how a TS lib should be publishing them, but I'm willing to make changes in esri-loader needed to accommodate it's direct use in Angular apps.

On the other hand, if this library is still needed, then I'll need someone else to take ownership of it. If that someone is from Esri, then they should start a PR to make the changes needed to transfer to the Esri org (I can help w/ that).

cc/ @andygup @patrickarlt @noahmulfinger @TheKeithStewart

@noahmulfinger
Copy link
Collaborator

@tomwayson I did a little experimenting, and using the latest esri-loader seems to work perfectly fine in Angular:

import { loadModules } from "esri-loader";

...

loadModules(['esri/map']).then(([Map]) => {
    ...
});

So on the developers website we can easily switch over to directly using esri-loader.

@andygup
Copy link

andygup commented Nov 15, 2017

@tomwayson @noahmulfinger I also ran some quick tests with esri-loader [v1.5] on Angular 4.4 with no issues. I'll also test with Angular 5 and Ionic, but I don't expect any problems.

@andygup
Copy link

andygup commented Nov 15, 2017

Confirmed - basic functionality works on Angular 5.0.1 [standalone] and Ionic 3.18

@andygup
Copy link

andygup commented Nov 15, 2017

A few ideas for moving forward.

  • We could officially say this repo is in maintenance mode and provide a link to this repo's replacement, which I propose would be an Angular CLI example
  • And on that note: move esri-angular-cli-example over on github.com/esri and update it.
  • I'll update ionic2-esri-map to use esri-loader
  • Need to update various documentation references and re-point them appropriately, including the JS API Using Frameworks page

I can help drive a portion of this.

Thoughts?

cc/ @tomwayson @patrickarlt @noahmulfinger @TheKeithStewart @jwasilgeo

@tomwayson
Copy link
Owner Author

Thanks for following up @andygup and @noahmulfinger!

One thing you may want to check if you haven't already is if it works in IE. I don't know if Angular polyfills window.Promise, but if it doesn't, then I'd expect that it would not work w/o setting esriLoader.utils.Promise or adding a Promise polyfill.

Also, I met w/ @patrickarlt this week and he gave me some insight on how to publish the types as part of Esri/esri-loader#50. I'll let you know when I've done that so you can test if you get the correct types in your apps.

W/ those two things, I think we will have established that this library is no longer needed.

@andygup
Copy link

andygup commented Nov 17, 2017

One thing you may want to check if you haven't already is if it works in IE.

Ah, very good point. Might be worth checking Edge, as well.

@noahmulfinger any chance you have access to a Windows box with Angular installed?

@tomwayson
Copy link
Owner Author

tomwayson commented Nov 17, 2017

@andygup thanks for taking a first pass at a plan and offering to help. Here's my feedback:

We could officially say this repo is in maintenance mode and provide a link to this repo's replacement

Yes, I want to do that as soon as we figure out what course of action to take below.

I propose would be an Angular CLI example.

I have mixed feelings about that. On the one hand, it's nice to have a running app that shows it working. On the other hand I feel like it's hard to point people to just the changes that are needed to get it working in their app, and that some people even clone the app as a starting point.

Instead I was going to suggest a gist, like this one, until I learned that you don't get notifications on gists!?!!??!!

So it seems like a better solution than a gist would be to basically make this repo like that gist - not a functioning library, just the files you'd need to drop into an angular-cli app.

And on that note: move esri-angular-cli-example over on github.com/esri and update it.

The thing is, I don't even think that uses angular-esri-loader directly anymore. I had been thinking of turning esri-angular-cli-example over to @TheKeithStewart since that's basically now the test app for angular-esri-components.

Maybe we PR angular-esri-components so that it uses esri-loader, then we update esri-angular-cli-example to include some code that uses esri-loader directly, then the README of that repo takes on the role of the above gist - very clearly identifying the steps needed to get esri-loader and/or angular-esri-components working in your own angular-cli app. Then we transfer it to the esri org.

That's more inline w/ what @andygup proposed above, but would also be more work than just making this repo gist-like and transferring it to esri.

I'll update ionic2-esri-map to use esri-loader

👍

Need to update various documentation references and re-point them appropriately, including the JS API Using Frameworks page

I will do that once we've shuffled all the libraries to their final destination.

@jwasilgeo
Copy link
Collaborator

This is all awesome! Thanks everyone for doing the work and sharing your research findings along the way.

@noahmulfinger
Copy link
Collaborator

@tomwayson @andygup Regarding IE functionality: Angular lists mandatory polyfills which include ES6 promises https://angular.io/guide/browser-support#mandatory-polyfills.

Additionally, as a quick test I created a basic Angular CLI app that uses esri-loader in my Windows 8.1 VM with IE11. I didn't see any issues.

@tomwayson
Copy link
Owner Author

OK, what I've done so far:

I think that just leaves @andygup to update ionic2-esri-map to use esri-loader at his leasure

I'm going to close this issue and archive this repository. Thanks everyone for chipping in on this library. See y'all over on esri-loader.

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

No branches or pull requests

4 participants