Setting up Web AppBuilder Developer Edition Environments

805
5
01-23-2019 03:20 PM
NathanHeickLACSD
Occasional Contributor III

I am getting started on Web AppBuilder Developer Edition and I know I will be building multiple apps with custom themes and widgets for Dev, Test, and Prod.  I can imagine that over time I may want to download a newer version of Web AppBuilder.  When I create custom widgets and themes, I am not sure if they will go in a common folder for all apps or in the folder for a specific app.  I am starting to learn the differences between a portal-based app and a Developer Edition app.

Given the fact that the Developer Edition is just a folder containing a Node web server and web app, I realized I could make a separate copy for each app for each environment and I thought that might make sense to decouple everything.  However, it seems like possible overkill.  Furthermore, I am wondering about source control and whether or not I will be making changes in just the app folder or in the rest of WAB folders as well.

So, I wanted to know how other people set up their WAB environment.  On the other side of the equation is just one WAB instance, but I do see how that might get me rev-locked down the road on one version of WAB.  A third alternative would be separate WAB instances for each version of WAB.  I just want to set things up right now based on others experience, versus reorganize things later.  Also, do people run it as a service or just start it up on demand?

Thanks for anyone's opinions.

Nathan

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Nathan,

  So once I explain how WAB Dev works behind the scenes your path forward should be pretty obvious.

WAB Dev was developed based on a stem cell cloning premise. You have the main stemApp that has the core jimu library and base app and that stemApp gets cloned/copied to the server/apps folder in your WAB installation when you create a new app. Don't miss the fact that the stemApp core components and selected widgets are cloned during an app creation and are now decoupled from the stemApp folder and files.

So lets say you want to make a new widget. You would do that in the stemApp widget folder, but once you create a new app that widget is cloned to the apps widgets folder and is no longer connected to stemApp widget folder. That is the point that trips up most new developer in the WAB environment. Any changes you make to the widget in the stemApp widget folder will not be seen by that app and will only be seen when you add the widget to a New app.

So my basic work flow is to create an App for each widget I am developing and do all my coding in the apps widgets folder. Once I am satisfied with my development efforts I (try to remember to) copy the widget back to the stemApp widgets folder to make those changes available for future new apps.

II maintain a folder on my development laptop for each WAB version and they all function but one one at a time since the startup.bat has the app listen on specific ports. So this way I can always go back to a previous version of WAB for what ever reason.

WAB Dev has a great upgrade command line ability to upgrade a certain app or all apps in your previous version.

Upgrade apps—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

Hope this helps

DavidTreering2
New Contributor III

To add to what Robert Scheitlin, GISP said, we use the app within the WAB.../server/apps folder as the DEV app, so it is easy to make edits.  Using the download button on the main WAB page gives you an app to deploy to a TEST and PROD server.

Also, you could develop your custom themes and widgets directly in the stemApp, viewing the app at https://yourserver:3344/webappbuilder/?id=stemapp.  Just be careful. 

DavidTreering2
New Contributor III

For Nathan Heick‌'s question about new versions, I am unclear if you need to run the Upgrade script sequentially from one version to the next, like 2.7 -> 2.8 -> 2.9, or if you can skip versions.  Is 2.7 -> 2.11 going to work?

And what about your versioned custom widgets, Robert Scheitlin, GISP‌? In what order do you upgrade the widget and app?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

David,

   Upgrade the app then the widget.

MollyJordan
New Contributor II


Hi Robert, 

I know this is an old thread.. but have you had any experience with apps reverting back to the main stemApp defaults? We are having an issue with our apps randomly redirecting to these  defaults when when go to edit the app or view it. 

We have worked with ESRI and have not yet solved this issue. Any ideas? 

 

Molly

0 Kudos