Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What do Java back-end programmers do?


May 30, 2021 Article blog


Table of contents


When I first started doing Web development, I didn't have a front end at all.

The simple reason is that server-side code was everything at that time: accepting browser requests, implementing business logic, accessing databases, generating HTML with JSP, and then sending it to the browser.

Even if Javascript later added some AJAX effects to the browser, it was the icing on the cake and would never be able to do so. Because the HTML of the page is mainly generated in the so-called "set of templates": art generates HTML templates, programmers use JSP, Veloctiy, FreeMaker and other technologies to add dynamic content, that's all.

The most popular picture at that time was this:
 What do Java back-end programmers do?1

In the original J2EE system, this presentation layer could not only be a page running in a browser, but also the desktop side of Java writing, but Java was too indisputable on the desktop side to develop.

Each programmer is a so-called "full stack" engineer who not only handles HTML, JavaScript, CSS, but also implements business logic and writes code to access the database. By the time you deploy, you'll hit all the code into a WAR package, throw it at Tomcat's designated directory, test it for no problem, and get home!

Companies that don't have much money will deploy programs to application servers like Weblogic, Websphere, and use tall EJBs.

While life may seem "simple" and "comfortable", the nature of the hard work has not changed in reality, but it also requires the realization of the ever-changing, illogical business needs.

1. Separation of the front and rear ends

As the visual and interactive requirements of browser pages become higher and higher, the "set of templates" approach gradually unable to meet the requirements, this so-called presentation layer slowly migrated to the browser, a large number of frameworks like Angular, ReactJS and so on rose, the front and rear ends separated!

Back-end engineers are only responsible for providing interfaces and data, focusing on the implementation of business logic, and the front end takes the data and displays it in the browser, each with its own responsibilities.

Languages like Java are well suited to complex business logic, especially mis systems, industry software such as tax, power, tobacco, finance, communications, and more. S o peeling off the presentation layer, just do the back end quite appropriate.

But if you're just implementing business logic, then the back end won't need that much technology, just get the SSH/SSM done.

2. Back-end technology

After the Internet, especially the mobile Internet began to rise, a large number of users whistling, a single-machine deployment of small War package is certainly unable to hold up, must do distributed.

The original single Tomcat had to be turned into Tomcat's cluster, with a Web server in front of it to do the load balancing of requests, not only that, but also the state, the consistency of the session.

Business is becoming more and more complex, we have to put some business on one machine (or cluster), another part of the business on another machine (or cluster), although the computing power of the system, processing power greatly enhanced, but the communication between these systems has become a headache, message queue (MQ), RPC framework (such as Dubbo) came into being, in order to improve communication efficiency, a variety of serialization tools (such as Protobuf) also came out in a hurry.

A single database also can not hold up, then do the database read and write separation, if not yet, do sub-library and sub-table, the original database vertically everything, or horizontally cut everything, but no matter how cut, will make the application access is very troublesome, because the data across the library to do Join / sorting, but also need transactions, in order to solve this problem, there are a variety of "data access middleware" tools and products were born.

In order to maximize performance, caching can certainly be done natively (such as Ehcache), or distributed caching (such as Redis), how to engage in data sharding, data migration, failure transfer, which is another super big topic.

Internet users like to upload pictures and files, but also to engage in a distributed file system (such as FastDFS), high availability, high reliability.

When the amount of data is large, the search needs naturally surface, and you have to get a search engine (such as Elasticsearch, Solr) that supports full-text indexing.

The forest is big, any bird has, must consider security, data encryption/decryption, signature, certificate, to prevent SQL injection, XSS/CSRF and other attacks.

3. "Big back end"

The previous mention of so many systems, but also distributed, every time on-line, operation of the students said: so many systems coordinated, the old son is tired to death.

Continuous integration has to be done, can be deployed automatically, automated testing (in fact, the front end is the same), and then there is a revolutionary technology docker, can make the development, testing, generation environment consistent, the system originally only in the environment (such as Ngnix, JVM, Tomcat, MySQL, etc.) to deploy code, now the code and environment together packaging, operations work is simplified.

The company's own purchase of servers is more expensive, maintenance is also very troublesome, and difficult to grow elastically, then do some virtual servers, hard disk, memory can be dynamically extended (anyway, virtual), when the amount of access is more useful, no access on the release of a little, on-demand distribution, very convenient, this is a scene of cloud computing.

As time goes on, companies and systems collect more and more data, all piled up in a mountain, is it put there in vain waste of hard disk space?

Some people are surprised to find that, hey, we use this data to do something ah, for example, the data to analyze, predict this user's buying / reading / browsing habits, give him something to recommend.

But so much data, in the traditional way to calculate several days or even months to produce a result, when the yellow cauliflower is cold, so also have to use distributed technology, find a way to divide the calculation to each computer, and then the calculation results back, the current hero, Hadoop and its ecosystem came into being.

I've heard of the concept of a big front end before, and I've put both the mobile end and the web end down to the "front end", and I've created a word here that says "big back end" and puts down what happens on the server side that users can't reach directly.

4. How do I learn?

Now whether it is the front end or the back end, the technical field is like cow hair, are seriously subdivided, so I think the real whole stack engineer does not exist, because a person's limited energy, it is impossible to deal with so many technical areas, too difficult.

Training institutions called the "full stack", I think is the front and back end is still pulling, breaking the wire, there is no complete separation of the "full stack" engineer.

So here's the question, how do I learn so many things in the back end?

Digging deep can be an expert in a technical field, such as search experts, security experts, distributed file experts, and so on, no matter what field, the focus is not to learn to use a tool and framework, but to ensure that you can have your own knowledge and technology to solve the top problems in this field.

In terms of breadth, every technology area needs to understand that for a certain need, the ability to select the right software and technology architecture to implement it, the need to translate into the right technical components, so that these components in the right way to connect, deploy, run, which also requires continuous learning and continuous experience.