Codebase

Last updated

In software development, a codebase (or code base) is a collection of source code used to build a particular software system, application, or software component. Typically, a codebase includes only human-written source code system files; thus, a codebase usually does not include source code files generated by tools (generated files) or binary library files (object files), as they can be built from the human-written source code. However, it generally does include configuration and property files, as they are the data necessary for the build.

Contents

A codebase is typically stored in a source control repository in a version control system. A source code repository is a place where large amounts of source code are kept, either publicly or privately. Source code repositories are used most basically for backups and versioning, and on multi-developer projects to handle various source code versions and to provide aid in resolving conflicts that arise from developers submitting overlapping modifications.

Subversion, Git and Mercurial are examples of popular tools used to handle this workflow, which are common in open source projects.

For smaller projects, its code may be kept as a non-managed set of files (even the Linux kernel was maintained as a set of files for many years). [1]

Distinct and monolithic codebases

Multiple projects can have separate, distinct codebases, or can have a single, shared or monolithic codebase. This is particularly the case for related projects, such as those developed within the same company. In more detail, a monolithic codebase typically entails a single repository (all the code in one place), and often a common build system or common libraries. Whether the codebase is shared or split does not depend on the system architecture and actual build results; thus, a monolithic codebase, which is related to the actual development, does not entail a monolithic system, which is related to software architecture or a single monolithic binary. As a result, a monolithic codebase may and (for large codebases) often will consist of separate components, instead of carrying only a single system or single binary; a distributed codebase (with multiple components) can be used to build a single monolithic system or even a single binary. For example, the Linux kernel is architecturally a single monolithic kernel, but it consists of separate binaries (loadable components), and is developed in multiple distributed repositories.

There are both advantages and disadvantages to a monolithic codebase when it is compared to a distributed codebase. [2] [3] Most simply, a monolithic codebase simplifies integrationchanges to different components or refactoring of code between components can be done easily and atomicallyand allows operations across the entire codebase, but requires a larger repository and makes it easier to introduce wide-ranging technical debt.[ dubious ] A separate codebase or a distributed codebase keeps individual repositories smaller and more manageable, enforcing at the same time separation between components, but it also requires integration between codebases (or with the main repository), and complicates changes that span multiple codebases. [4]

In terms of standards, referring to multiple codebases as "distinct" declares that there are independent implementations without shared source code and that, historically, these implementations did not evolve from a common project. This may be a way of demonstrating interoperability by showing two independent pieces of software that implement a given standard.[ dubious ]

Examples

Some notably large codebases include:

See also

Related Research Articles

Darwin is the core Unix operating system of macOS, iOS, watchOS, tvOS, iPadOS, visionOS, and bridgeOS. It previously existed as an independent open-source operating system, first released by Apple Inc. in 2000. It is composed of code derived from NeXTSTEP, BSD, Mach, and other free software projects' code, as well as code developed by Apple.

In software engineering, version control is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections of information. Version control is a component of software configuration management.

<span class="mw-page-title-main">Monotone (software)</span> Revision control software

Monotone is an open source software tool for distributed revision control.

<span class="mw-page-title-main">Git</span> Software for version control of files

Git is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.

In software development, distributed version control is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. Compared to centralized version control, this enables automatic management branching and merging, speeds up most operations, improves the ability to work offline, and does not rely on a single location for backups. Git, the world's most popular version control system, is a distributed version control system.

Open-source software development (OSSD) is the process by which open-source software, or similar software whose source code is publicly available, is developed by an open-source software project. These are software products available with its source code under an open-source license to study, change, and improve its design. Examples of some popular open-source software products are Mozilla Firefox, Google Chromium, Android, LibreOffice and the VLC media player.

<span class="mw-page-title-main">AppImage</span> Linux executable file format

AppImage is a format for distributing portable software on Linux without needing superuser permissions to install the application. It tries also to allow Linux distribution-agnostic binary software deployment for application developers, also called upstream packaging. Released first in 2004 under the name klik, it was continuously developed, then renamed in 2011 to PortableLinuxApps and later in 2013 to AppImage.

<span class="mw-page-title-main">Mercurial</span> Distributed revision-control tool for software developers

Mercurial is a distributed revision control tool for software developers. It is supported on Microsoft Windows and Unix-like systems, such as FreeBSD, macOS, and Linux.

A kernel is a component of a computer operating system. A comparison of system kernels can provide insight into the design and architectural choices made by the developers of particular operating systems.

In software development, version control is a class of systems responsible for managing changes to computer programs or other collections of information such that revisions have a logical and consistent organization. The following tables include general and technical information on notable version control and software configuration management (SCM) software. For SCM software not suitable for source code, see Comparison of open-source configuration management software.

Quilt is a software utility for managing a series of changes to the source code of any computer program. Such changes are often referred to as "patches" or "patch sets". Quilt can take an arbitrary number of patches as input and condense them into a single patch. In doing so, Quilt makes it easier for many programmers to test and evaluate the different changes amongst patches before they are permanently applied to the source code.

Plastic SCM is a cross-platform commercial distributed version control tool developed by Códice Software Inc. It is available for Microsoft Windows, Mac OS X, Linux, and other operating systems. It includes a command-line tool, native GUIs, diff and merge tool and integration with a number of IDEs. It is a full version control stack not based on Git.

In version control systems, a repository is a data structure that stores metadata for a set of files or directory structure. Depending on whether the version control system in use is distributed, like Git or Mercurial, or centralized, like Subversion, CVS, or Perforce, the whole set of information in the repository may be duplicated on every user's system or may be maintained on a single server. Some of the metadata that a repository contains includes, among other things, a historical record of changes in the repository, a set of commit objects, and a set of references to commit objects, called heads.

Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. The service has both free and premium tiers. The software that hosts the containers is called Docker Engine. It was first started in 2013 and is developed by Docker, Inc.

<span class="mw-page-title-main">RhodeCode</span> German software company

RhodeCode is an open source self-hosted platform for behind-the-firewall source code management. It provides centralized control over Git, Mercurial, and Subversion repositories within an organization, with common authentication and permission management. RhodeCode allows forking, pull requests, and code reviews via a web interface.

Zephyr is a small real-time operating system (RTOS) for connected, resource-constrained and embedded devices supporting multiple architectures and released under the Apache License 2.0. Zephyr includes a kernel, and all components and libraries, device drivers, protocol stacks, file systems, and firmware updates, needed to develop full application software.

In version-control systems, a monorepo, also known as spaghettirepo, is a software-development strategy in which the code for a number of projects is stored in the same repository. This practice dates back to at least the early 2000s, when it was commonly called a shared codebase. Google, Meta, Microsoft, Uber, Airbnb, and Twitter all employ very large monorepos with varying strategies to scale build systems and version control software with a large volume of code and daily changes.

ungoogled-chromium is a free and open-source variant of the Chromium web browser that removes all Google-specific web services. It achieves this with a series of patches applied to the Chromium codebase during the compilation process. The result is functionally similar to regular Chromium.

References

  1. "A Short History of Git". git-scm.com. Retrieved October 21, 2014.
  2. J. David Morgenthaler; Misha Gridnev; Raluca Sauciuc & Sanjay Bhansali (2012). "Searching for Build Debt: Experiences Managing Technical Debt at Google". Proceedings of the Third International Workshop on Managing Technical Debt. IEEE. pp. 1–6. doi:10.1109/MTD.2012.6225994.
  3. 1 2 "Scaling Mercurial at Facebook". Facebook Code. 2014-01-07. Retrieved 29 April 2016.
  4. "Git - Distributed Workflows". git-scm.com. Retrieved 29 April 2016.
  5. Potvin, Rachel; Levenberg, Josh (24 June 2016). "Why Google stores billions of lines of code in a single repository". Communications of the ACM. 59 (7): 78–87. doi: 10.1145/2854146 .
  6. @feross (April 24, 2014). "Facebook's git repo is 54 GB" (Tweet). Retrieved 29 April 2016 via Twitter.
  7. Sproull, Lee; Moon, Jae Yun (2000-11-05). "Essence of distributed work: The case of the Linux kernel - Moon - First Monday". First Monday . 5 (11). Retrieved 29 April 2016.