3.1 Making Changes to the Code
Like I mentioned earlier, software development boils down to making small changes to the code. This process has been honed over decades by millions of programmers, which has led to its thorough debugging, standardization, and formalization in every possible way.
There's a special program to store code – Git. Git is a distributed version control system. It doesn't just store code, but tracks all the changes made to it and helps developers work on projects together without stepping on each other's toes.
With Git, developers can create different versions of a project (branches), maintain a full history of changes, and even revert to any point in the past. It's like a time machine for code! Git aids in merging changes and resolving conflicts, which is why it's become the main tool for team collaboration in modern development.
3.2 Building the Project
Before testing or uploading a project to a server, it needs to be built.
Building projects is the process of compiling the project's source code into executable programs or other runnable formats, often including testing and deployment. It's a key aspect of software development, ensuring the program is ready for use.
Building is not just about compilation, though compilation is often part of the process. After the build is complete, you may end up with dozens or even hundreds of files that need to be uploaded to various servers.
Builders can be low-level, such as:
Maven and Gradle are widely used in Java projects for dependency management and project building.
Apache Ant is another tool for building Java projects that offers great flexibility in writing build scripts.
MSBuild is used for building projects created with Microsoft Visual Studio.
Make is a classic build tool that uses a Makefile to define build rules, especially popular in C and C++ projects.
Webpack is often used for building JavaScript applications, managing dependencies and modules.
Gulp and Grunt are tools that help automate frequently performed tasks in web app development, like file minification and SCSS to CSS compilation.
There are also high-level builders. More on them below.
3.3 CI/CD
CI/CD (Continuous Integration/Continuous Delivery) is a methodology that involves continuously merging changes from all development branches into the main branch, as well as automatically testing and deploying these changes. This allows for quick error detection and correction, increasing development efficiency and speed.
One of the most common, albeit a bit outdated, CI/CD systems is Jenkins. If you're working at a small company, there's an 80% chance they'll be using it.
Jenkins is a popular automated system used for continuous integration and delivery (CI/CD). Jenkins allows automating various stages of software development, including building, testing, and deploying, enhancing code quality and speeding up the development process.
If you land a job at a large company, you might have up to 5 options:
TeamCity is a powerful commercial system from JetBrains, offering deep integration with various development and testing environments.
GitLab CI is an integral part of GitLab, providing continuous integration and delivery with YAML file configuration.
CircleCI is a cloud-based CI/CD service supporting test and deployment automation for numerous projects.
Travis CI is one of the first cloud CI services, used in many open-source projects. Well-integrated with GitHub.
Bamboo is a product from Atlassian, closely integrated with other company tools like Jira and Bitbucket.
You don't need to know them or how to work with them – usually, there are DevOps specialists in the company who set up all these processes. You just need to know they exist and understand what's being discussed if Jenkins, CI/CD, or "continuous integration" comes up in conversation.
3.4 Delivering the Project to Server
Writing the project is just part of it – it also needs to be on your server. Generally, deploying a project to a server – that is, deployment – is the process of placing and activating a web application on a server so that it's accessible to users over the internet.
This process involves transferring project files to the server, configuring the server environment, databases, dependencies, as well as setting network configurations and security.
How do you think your code lands on the server? Will someone upload it for you? Or maybe you'll SSH into a remote server, dump a few files there, and start configuring everything? Relax: nobody does that anymore. Now there's Docker.
Docker is a platform for developing, shipping, and running applications using containers. Docker simplifies creating, deploying, and running applications by packaging them together with all their dependencies and environment into a single lightweight object. This ensures consistency across all stages: from development to testing and production.
Docker allows you to package your project or projects into a Docker container. It's kind of like a virtual machine.
Even though any Docker forum will throw shade at you if you call it a "virtual machine," you can think of a Docker container as a virtual machine that's much more lightweight.
Essentially, a Docker container is a virtual "virtual machine". Virtual machines include a full copy of the operating system, OS kernel, and virtual hardware, while Docker containers share the host's kernel and can be more lightweight and faster.
Deploying a project with Docker greatly simplifies the process, providing speed and reliability. The project is packaged into Docker containers, easily moved and run on any system that supports Docker.
This eliminates issues related to server environment differences, and allows easy scaling of the application by adding or removing containers according to the load. Everyone has switched to Docker – it's very convenient and super simple.
GO TO FULL VERSION