<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Recommendations for injecting custom code in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/recommendations-for-injecting-custom-code/m-p/337055#M8924</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking for recommended paths to inject custom code in a supportable manner moving forward. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One use case is to create a class that persists a users secured services token as long as the token is valid. &amp;nbsp;This provides a better user experience in an environment where we have a lot of applications that link to our wab&amp;nbsp;application. &amp;nbsp;Without persisting a users credentials, they end up being forced to log in repeatedly. &amp;nbsp;The problem with the widget approach is that widgets are not loaded until after the map is instantiated and the user is prompted for credentials. &amp;nbsp;I'm currently using a separate require&amp;nbsp;block in the init.js file that loads my custom class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another use case is to provide an external interface for the search widget. &amp;nbsp;Several of our applications are being loaded inside a native webview&amp;nbsp;application which supports custom url&amp;nbsp;schemes that launch the application and execute a search. &amp;nbsp;Rather than reload the whole application whenever the custom url&amp;nbsp;handler takes over and completely lose the losers state, the application uses the external interface to programmatically execute a search. &amp;nbsp;Currently, I'm extending the Search widget with a mixin which exposed a property and method on the window object that are callable from the native application (iOS). &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have both of the use cases working but I'm trying to figure out what the best path moving forward is. &amp;nbsp;I'm afraid upgrading to a newer version of WAB will break things if I don't remember to go back and re-introduce all my customizations. &amp;nbsp;I haven't found a good way to use version control with WAB either. &amp;nbsp;I've tried putting my entire WAB installation under version control but then I'm tracking a lot code that I'm not modifying. &amp;nbsp;I've also tried just putting my custom widgets under version control but this is sort of a pain when you want to use the widget in multiple WAB projects. &amp;nbsp;Curious to see what others are doing...how are you using WAB in team environments?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, looking for ideas/suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Oct 2016 15:50:02 GMT</pubDate>
    <dc:creator>JadeFreeman</dc:creator>
    <dc:date>2016-10-31T15:50:02Z</dc:date>
    <item>
      <title>Recommendations for injecting custom code</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/recommendations-for-injecting-custom-code/m-p/337055#M8924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking for recommended paths to inject custom code in a supportable manner moving forward. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One use case is to create a class that persists a users secured services token as long as the token is valid. &amp;nbsp;This provides a better user experience in an environment where we have a lot of applications that link to our wab&amp;nbsp;application. &amp;nbsp;Without persisting a users credentials, they end up being forced to log in repeatedly. &amp;nbsp;The problem with the widget approach is that widgets are not loaded until after the map is instantiated and the user is prompted for credentials. &amp;nbsp;I'm currently using a separate require&amp;nbsp;block in the init.js file that loads my custom class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another use case is to provide an external interface for the search widget. &amp;nbsp;Several of our applications are being loaded inside a native webview&amp;nbsp;application which supports custom url&amp;nbsp;schemes that launch the application and execute a search. &amp;nbsp;Rather than reload the whole application whenever the custom url&amp;nbsp;handler takes over and completely lose the losers state, the application uses the external interface to programmatically execute a search. &amp;nbsp;Currently, I'm extending the Search widget with a mixin which exposed a property and method on the window object that are callable from the native application (iOS). &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have both of the use cases working but I'm trying to figure out what the best path moving forward is. &amp;nbsp;I'm afraid upgrading to a newer version of WAB will break things if I don't remember to go back and re-introduce all my customizations. &amp;nbsp;I haven't found a good way to use version control with WAB either. &amp;nbsp;I've tried putting my entire WAB installation under version control but then I'm tracking a lot code that I'm not modifying. &amp;nbsp;I've also tried just putting my custom widgets under version control but this is sort of a pain when you want to use the widget in multiple WAB projects. &amp;nbsp;Curious to see what others are doing...how are you using WAB in team environments?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, looking for ideas/suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 15:50:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/recommendations-for-injecting-custom-code/m-p/337055#M8924</guid>
      <dc:creator>JadeFreeman</dc:creator>
      <dc:date>2016-10-31T15:50:02Z</dc:date>
    </item>
  </channel>
</rss>

