jwasilgeo / ionic-esri-map

An Ionic app demonstrating how to use the Esri ArcGIS API for JavaScript.
11 stars 5 forks source link

Reorganization... #14

Closed jwasilgeo closed 8 years ago

jwasilgeo commented 8 years ago

...to accommodate having more than 1 app within this repo.

Please take note of the new instructions in the README.

@andygup please review and merge if satisfied. I hope I didn't copy too many redundant files for both the original tabbed app and the new full screen app.

Resolves #13.

andygup commented 8 years ago

Looking good! I didn't get a chance to look at the redundancy too much. But, that's an easy fix for another PR.

I have one suggested addition to the README. There should be an explanation on how to change which app is launched. If the info's already there, then my bad. If the info isn't there, then what do you think about adding a new bullet to the README similar to:

<content src="http://10.61.3.225:8100" original-src="index.html"/>
jwasilgeo commented 8 years ago

Oh, perhaps then I misunderstood the entry points and ways to manage ionic apps. I recreated all folder structure in both apps, and currently require a dev to run npm install for each app within the apps directory. Maybe this all can be shuffled around? Or, do I misunderstand the point of the config's original-src property?

andygup commented 8 years ago

Ah hah! I get the structure now. You raise a really good point. Stepping back for just a sec...I don't think there's a "one right way" to do this. Plus I did make a mistake above.

The pattern I mention is a slight hack. It allows you to share a single /www directory that contains multiple samples. However, the developer has to tell the cordova which sample to use by manually modifying the config.xml file. For Android you go to android/res/xml/config.xml and modify <content src="index.html" />. Note, there is where I messed up above, it's not original-src.

The downsides to this approach are you have to modify config.xml. The advantage is you only need one /www directory and once you make the change you just rebuild the app on the desired platform.

Thoughts?

jwasilgeo commented 8 years ago

Thanks for your feedback and thoughts. I'm unsure either way, given all the pros/cons. If you have a preference, we can just run ahead with that.

andygup commented 8 years ago

Gotcha. If that's the case, I'd lean towards the "config.xml hack" approach because it doesn't lead to duplicate code and the developer can easily swap between multiple applications using the same build by changing a single property.

andygup commented 8 years ago

Closing this out to be replaced by new PR