Checklist for creating and publishing web applications

In order to create your own web application these days, it’s not enough to be able to develop it. An important aspect is setting up tools for application deployment, monitoring, and the management and administration of the environment in which it operates. The era of manual deployment is falling into oblivion, even for small projects, automation tools can bring tangible benefits. When deployed “by hand”, we can often forget to transfer something, take into account one or another nuance, run a forgotten test, this list can be continued for quite some time.

This article can help those who only understand the basics of creating web applications, and want to understand a little about the basic terms and conventions.

So, the construction of applications can still be divided into 2 parts, this is all that relates to the application code, and all that relates to the environment in which this code is executed. The application code, in turn, is also divided into server (one that runs on the server, often: business logic, authorization, data storage, etc.), and client (one that runs on the user's machine: often an interface, and related with it logic).

Let's start with Wednesday.

The basis for the operation of any code, system, software is the Operating System, so below we will look at the most popular systems on the hosting market and give them a brief description:

Windows Server- The same Windows, but in server variation. Some functionality available in the client (regular) version of Windows is not present here, for example, some statistics collection services, and similar software, but there is a set of utilities for network administration, basic software for server deployment (web, ftp, ...). In general, Windows Server looks like a regular Windows, quacks like a regular Windows, however, it costs 2 times more than its usual counterpart. However, given that you will most likely deploy the application on a dedicated / virtual server, the final cost for you, although it may increase, is not critical. Since the Windows platform occupies an overwhelming place in the market of user OS, its server edition will be the most familiar to most users.

Unix-like system. Traditional work in these systems does not imply a familiar graphical interface, offering the user only a console as a control element. For an inexperienced user, working in such a format can be difficult, which only leaves the Vim text editor, which is quite popular in the data , the question connected with this for 6 years has already gained more than 1.8 million views. The main distributions (editions) of this family are: Debian - a popular distribution, the package versions in it are mainly focused on LTS ( Long Term Support - support for a long time), which is reflected in the rather high reliability and stability of the system and packages; Ubuntu- contains distributions of all packages in their latest versions, which can affect stability, but allows you to use the functionality that comes with new versions; Red Hat Enterprise Linux - an OS marketed for commercial use is paid, however, it includes support from software vendors, some proprietary and driver packages; CentOS - opensource variation of Red Hat Enterprise Linux, characterized by the lack of proprietary packages and support.

For those who only comprehend the development of this area, my recommendation would be Windows Server or Ubuntu . If we consider Windows, then this is primarily a habit of the system, Ubuntu- more tolerance to updates, and in turn, for example, fewer problems when starting projects on technologies requiring new versions.

So, having decided on the OS, let's move on to a set of tools that allow you to deploy (install), update and monitor the state of the application or its parts on the server.

The next important decision will be to host your application and server for it. At the moment, the most common are 3 ways:

  • Hosting (keeping) a server on your own is the most budget option, but you will have to order a static IP from your provider so that your resource does not change its address over time.
  • Rent a Dedicated Server (VDS) - and independently manage its administration and load scaling
  • Pay (often at the same time they give the platform functionality free of charge) a subscription on some cloud hosting, where the payment model for used resources is quite common. The most prominent representatives of this direction: Amazon AWS (give a free year of use of services, but with a monthly limit), Google Cloud (give $ 300 to an account that can be spent during the year on cloud hosting services), Yandex. Cloud (give 4000 rubles . for 2 months), Microsoft Azure (give free access to popular services for a year, + 12 500 rubles for any services for one month). Thus, you can try any of these providers without spending a dime, but getting an approximate opinion about the quality and level of service.

Depending on the chosen path, in the future only the fact will change, on whom, for the most part, is the responsibility for a particular area of ​​administration. If you are hosting yourself, then you must understand that any interruptions in electricity, the Internet, the server itself, the software deployed on it - all this completely lies on your shoulders. However, for training and testing, this is more than enough.

If you do not have an extra machine that can play the role of a server, then you will want to use the second or third way. The second case is identical to the first, with the exception that you shift the responsibility for the availability of the server, and its power to the shoulders of the host. Server and software administration is still under your control.

And finally, the option of renting the capacity of cloud providers. Here you can configure automated control of almost anything, without much going into technical nuances. In addition, instead of one machine, you can have several instances (instances) running in parallel, which, for example, can be responsible for different parts of the application, while not differing much in cost from the ownership of a dedicated server. And also, there are instruments of orchestration, containerization, automatic deployment, continuous integration and much more! Some of these things we will consider below.

In general, the server infrastructure is as follows: we have a so-called “orchestrator” (“orchestration” - the process of managing multiple server instances) that manages environmental changes on the server instance, a virtualization container (optional, but often used) that allows you to split the application on isolated logical layers, and software for Continuous Integration - which allows updating the hosted code through "scripts".

So, orchestration allows you to see server statuses, roll, or roll back server environment updates, and so on. At first, this aspect is unlikely to concern you, because in order to orchestrate something, you need several servers (can one, but why is it necessary?), And in order for there to be several servers, you need them. Of the tools in this area, it’s mostly Kubernetes, developed by Google , that is heard .

The next step is OS-level virtualization. Now widely used is the concept of dockerization, which came from the Docker tool., which provides the functionality of containers isolated from each other, but launched in the context of one operating system. What does this mean: in each of these containers you can run an application, or even a set of applications that will assume that they are the only ones in the entire OS, without even knowing about the existence of someone else on this machine. This function is very useful both for launching the same applications of different versions, or just conflicting applications, as well as for dividing pieces of the application into layers. This cast of layers can subsequently be written to an image that can be used, for example, to deploy an application. That is, installing this image, and expanding the containers that it contains, you get a ready-made environment for launching your application! In the first steps, you can use this tool both for educational purposes and to get a very real benefit by spreading the application logic into different layers. But, it is worth saying here that not everyone needs dockerization, and not always. Docking is justified in cases where the application is "fragmented", divided into small parts, each responsible for its own task, the so-called "microservice architecture".

In addition to providing the environment, we also need to provide a competent deployment of the application, which includes all kinds of code transformations, installation of libraries and packages associated with the application, running tests, notifications about these operations, and so on. Here we need to pay attention to such a concept as "Continuous Integration" ( CI - Continuous Integration ). The main tools in this area at the moment are Jenkins (software for CI written in Java may seem a bit complicated at the start), Travis CI (written in Ruby, subjectively, is somewhat simpler than Jenkins , however, some knowledge in deployment configuration areas), Gitlab CI (written in Ruby and Go ).

So, after talking about the environment in which your application will work, it is time to finally see what tools the modern world offers us to create these very applications.

Let's start with the basics: Backend (backend) - the server side. The choice of language, a set of basic functions and a predefined structure (framework) here is determined mainly by personal preferences, but nevertheless, it is worth mentioning for consideration (the author's opinion about languages ​​is quite subjective, albeit with a claim to an unbiased description):

  • Python is a language friendly enough for an inexperienced user, forgives some mistakes, but it can also be quite strict with the developer so that he does not do anything bad. Already quite mature and meaningful PL, which appeared in 1991.
  • Go is a language from Google, it is also quite friendly and convenient, it is easy enough to compile and get an executable file on any platform. It can be simple and enjoyable, or it can be difficult and serious. Fresh and young, appeared relatively recently, in 2009.
  • Rust - a little older than the previous colleague, released in 2006, is still quite young with respect to his brothers. It is aimed at more experienced developers, although it still tries to solve many low-level tasks for the programmer.
  • Java is a commercial development veteran that appeared in 1995, one of the most commonly used languages ​​in the development of enterprise applications at the moment. With its basic concepts and heavy tuning of the runtime environment, it can become quite complicated for a beginner.
  • ASP.net is an application development platform released by Microsoft. For writing the functionality, the language C # (pronounced C Sharp) is mainly used, which appeared in 2000. Its complexity is comparable to the level between Java and Rust.
  • PHP - originally used for HTML preprocessing, at the moment, although it retains absolute leadership in the language market, there is a tendency to decline in use. It features a low entry threshold, ease of code writing, but at the same time, when developing large enough applications, the language’s functionality may not be enough.

Well, the final part of our application - the most tangible for the user - Frontend (frontend) - is the face of your application, it is with this part that the user interacts directly.

Without going into details, the modern frontend stands on three pillars, frameworks (and not so much), to create user interfaces. Accordingly, the three most popular are:

  • ReactJS is not a framework, but a library. Actually, the framework differs from the proud title only in the absence of some functions “out of the box”, and the need to install them manually. Thus, there are several variations of the "preparation" of this library, forming a kind of framework. For a beginner, it can be complicated, due to some basic principles, and quite aggressive setup of the assembly environment. However, for a quick start, you can use the "create-react-app" package.
  • VueJS is a framework for building custom interfaces. From this trinity, he rightfully takes the title of the most user-friendly framework, for development in Vue the entry threshold is lower than that of the other cited brothers. In addition, among them he is the youngest.
  • Angular - considered the most complex of the given frameworks, the only one requires TypeScript (an add-on for the Javascript language). Often used to build large enterprise applications.

Summarizing the above, we can conclude that now the deployment of the application is fundamentally different from the way this process proceeded. However, no one bothers to carry out the “deployment” in the old fashioned way. But is it worth the little time saved at the start - a huge number of rakes that the developer who has chosen this path has to step on? I believe the answer is no. Having spent a little more time getting acquainted with these tools (and you don’t need more, because you need to understand whether you need them in the current project or not), you can play it out, significantly reducing, for example, cases of ghostly errors that depend on the environment and manifesting only on the production server, night parsing, which led to the server crashing and why it does not start, and much more.

Also popular now: