Javascript developer framework and code maintenance

2333
3
06-20-2016 05:02 PM
ImranMohammad
New Contributor

Robert Scheitlin, GISP

We have a single Javascript file for a widget we are currently building and there are 3 developers working on the same project. Using AMD and loader classes what would be the best practice to split and reference the widget.js file so that its easy to write and maintain code by all the developers at the same time without having to step on each others foot? Is there any existing framework or sample that you would suggest?

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Imran,

  I do not work in a multi developer environment so I don't have any advice for you here.

0 Kudos
SteveCole
Frequent Contributor

I would imagine that Rene Rubalcava​ would have some pertinent thoughts about since, especially since joining the JS API team at ESRI..

0 Kudos
ReneRubalcava
Frequent Contributor

Are all three people working on the same file? Ideally, someone should own that widget and they maintain and update it. Maybe break out some functionality into helper modules and others could own those.

As far as working in a team environment, git all the way. Learn the basics of git, then look at something like git flow.

Centralized Workflow | Atlassian Git Tutorial

Basically, add new features/fix bugs via a feature branch so others can keep working on their part. Make a pull-request, maybe have someone review it before it's merged, stuff like that.

Git is invaluable in a team environment.