How to Git the ArcGIS Viewer for Flex source code from GitHub

You may not know this, but the ArcGIS Viewer for Flex source code has been on GitHub since version 2.5 of the viewer.  The ArcGIS API for Flex samples source code were also recently published to GitHub. The Esri Flex Team initially started using GitHub as a way to share the latest release of the source code with our development community. In January this year, we moved day-to-day development operations to GitHub. Git and GitHub can be a little intimidating at first, but once you get the hang of it, your developer life becomes easier and more fun. The goal of this article is to introduce developers who use the ArcGIS Viewer for Flex source code to Git and GitHub.  What this will mean to you as a member of the ArcGIS Viewer for Flex development community will depend upon how passionate you are about contributing back to the community.

In this article we will discuss ways you can download the ArcGIS Viewer for Flex source code, and some benefits of GitHub.  You can still just download a zip file to get the code or you can choose to clone or fork the repo – all described in more details below.

Before we begin:
In a future blog post we will get into more terminology about Git and GitHub, but for now lets introduce a few concepts related to Git and repositories (repo).

What is cloning?
Cloning is another way to obtain source code. It does exactly what it sounds like, you get the entire repo along with its commit history.  To clone a project on GitHub’s website you must have a Git client installed on your computer. You can download GitHub for Mac or GitHub for Windows from the GitHub website. These Git clients include a friendly user interface as well as a command line shell for power users.  There are also other non-GitHub Git clients.

What is a commit?

A commit represents checked in version of files and directories.  Each directory on disk that is considered a “repo” has a special “.git” folder inside of it.  This “.git” folder is created when you initialize a directory to be a repo.  Each commit is stored within this folder and contains a snapshot of all files and directories at that point in time.

What are branches and tags?

A tag marks a particular commit and is a non-movable pointer.  A branch is a dynamic tag that is updated whenever a commit is made to that branch.  Branches are one of the most powerful features of Git. Branches are cheap, easy to create, delete, and isolate features or sections of code. These isolated areas of work can then be easily merged into other branches. The Esri Flex Team uses the develop branch for day to day development. Once we end our current milestone the master branch will be updated with the official released version.  Basically the most recent changes will always be in the develop branch, and the latest release will always be in the master branch.

Ways to acquire the source code

  • Download as a zip
  • Download zip file from the tags
  • Clone the repo (repo is the abbreviated version of repository)

Download as a zip

Download the latest develop branch source code

Download the latest master branch source code

Download zip file from the tags

Where are the tags?

Download any of the releases from the tags

Clone the repo: Download using GitHub for Windows or GitHub for Mac

Clone in Mac

Clone in Windows

Clone using GitHub for Windows

  • Install the GitHub for Windows client
  • Sign into GitHub
  • Click the “Clone in Windows” button

Benefits of using GitHub

You can be involved with what the Esri Flex Team is doing by watching the current Milestone progress through Issues that are opened by the team as well as issues/suggestions that come from the developer community (you).

Summary

At a minimum, GitHub is a way to get the ArcGIS Viewer for Flex source download.  You can stay connected with the Esri Flex Team by watching the Milestones and Issues (see above graphic).  In a future blog post, we’ll explore ways you can get more involved with the ArcGIS Viewer for Flex source code using Git and GitHub.  Once you begin getting more involved with Git and GitHub you will start to understand why so many people are using it.  Stay tuned…

This entry was posted in Developer, Web and tagged , , , , , . Bookmark the permalink.

Leave a Reply