Codebase
   HOME

TheInfoList



OR:

In
software development Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development invo ...
, a codebase (or code base) is a collection of
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the ...
used to build a particular
software system A software system is a system of intercommunicating components based on software forming part of a computer system (a combination of hardware and software). It "consists of a number of separate programs, configuration files, which are used to se ...
,
application Application may refer to: Mathematics and computing * Application software, computer software designed to help the user to perform specific tasks ** Application layer, an abstraction layer that specifies protocols and interface methods used in a c ...
, or
software component Component-based software engineering (CBSE), also called component-based development (CBD), is a branch of software engineering that emphasizes the separation of concerns with respect to the wide-ranging functionality available throughout a give ...
. Typically, a codebase includes only human-written
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the ...
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. A codebase is typically stored in a
source control In software engineering, version control (also known as revision control, source control, or source code management) is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections o ...
repository in a
version control In software engineering, version control (also known as revision control, source control, or source code management) is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections o ...
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 Subversion () refers to a process by which the values and principles of a system in place are contradicted or reversed in an attempt to transform the established social order and its structures of power, authority, hierarchy, and social norms ...
,
Git Git () is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data in ...
and
Mercurial 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. Mercurial's major design goals include high performance and scalability, d ...
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 The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ...
was maintained as a set of files for many years).


Distinct and monolithic codebases

Multiple projects can have separate, ''distinct codebases,'' or can have a single, ''shared'' or ''.'' 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 A monolithic kernel is an operating system architecture where the entire operating system is working in kernel space. The monolithic model differs from other operating system architectures (such as the microkernel architecture) in that it alone ...
, 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. 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 In software development, technical debt (also known as design debt or code debt) is the implied cost of additional rework caused by choosing an easy (limited) solution now instead of using a better approach that would take longer. Analogous with ...
. 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. 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.


Examples

Some notably large codebases include: *
Google Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
: monolithic, 1 billion files, 9 million source code files, 2 billion lines of source code, 35 million commits in total, 86 TB total size (January 2015) *
Facebook Facebook is an online social media and social networking service owned by American company Meta Platforms. Founded in 2004 by Mark Zuckerberg with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dust ...
: monolithic, 8 GB (repo 54 GB including history, 2014), hundreds of thousands of files (2014) *
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ...
: distributed, over 15 million lines of code ( and kernel version 3.10)


See also

* Codeplex *
Comparison of free software hosting facilities A source-code-hosting facility (also known as forge) is a file archive and web hosting facility for source code of software, documentation, web pages, and other works, accessible either publicly or privately. They are often used by open-sourc ...
* FishEye (software) *
Forge (software) In FOSS development communities, a forge is a web-based collaborative software platform for both developing and sharing computer applications. The term ''forge'' refers to a common prefix or suffix adopted by various platforms created after the ex ...
*
List of free software project directories The following is a list of notable websites that list free software projects. These directories and repositories of free software differ from software hosting facilities (or software forges) in the number of features they offer and the type of col ...
*
List of revision control software This is a list of notable software for version control. Local data model In the local-only approach, all developers must use the same file system. Open source * Revision Control System (RCS) – stores the latest version and backward del ...
*
Snippet (programming) Snippet is a programming term for a small region of re-usable source code, machine code, or text. Ordinarily, these are formally defined operative units to incorporate into larger programming modules. Snippet management is a feature of some tex ...
* SourceForge.net


References

{{Reflist, 30em Source code Version control