preface

Business is the main content and logic behind our daily work. For front-end engineers, the form of business will be different from that of the back-end. For example, we have visible pages and we talk about user interaction, which is closer to the daily operation and behavior habits of users. Any software after a period of development, the business will start to get complicated, very fast because of the modern software development iterations, short a few days, long time, but also as a result, the software business logic behind the present a complex shape, possible for users to see is an increasingly sophisticated software to use, But for engineers, the good code is not necessarily easy to maintain, accumulated over a long period of time, unreasonable or even wrong code will be more and more, so we need to carry out engineering governance, periodically ensure the matching degree between the code and the business.

The body of the

Alignment of business and code

So what is the business and the compatibility of the code, the matching of here mainly refers to the business of abstraction and corresponding degree of abstraction between code, such as possible for our business development at the beginning of 2 pages, but after a period of time, the business has to incorporate the content of one to another page, and do the functional integration, But our code is still two pages, which is a poor match.

Thus, the code with high matching degree can be well associated with the current business form and business function, while the code with low matching degree cannot analyze the specific business logic, and often needs to spend energy to connect the more intuitive business form to the specific code. This is obviously going to cost a lot of maintenance. But how do you achieve a high level of alignment between code and business?

The key is to sort out the business first, so that we know how the business is changing and can make code changes to match the business changes.

Too much of a good thing, the appropriateness of business combing

If you have a car and you want to maintain it really well, you probably need to scrub it every day, even every speck of dust, but we all know that most cars are 30% off outside the 4S shop, and the depreciation rate of the car gets higher and higher as time goes on, The price difference between a used car that looks almost new and a decent used car isn’t that big, at least compared to the upkeep you put in.

To this end, we need to seek the appropriateness of maintenance costs, which is also established in this matter of business combing.

It’s even easier to say that it’s not humanly possible to maintain business documents in real time, let alone ensure that the code matches at the same time, and you’re probably going to spend most of your time and effort doing that. Therefore, in the sorting and maintenance of business documents, we can adopt a periodical approach to seek a sustainable balance in the maintenance cost. Taking the monthly iteration speed of our company as an example, we usually conduct a comprehensive review and update of business documents every quarter. It’s like three iterations.

Content of front-end business document combing

Front-end services may vary. The following uses PC services as an example.

PC services include

  • Pages (collections of features)
    • Home page
    • Sub-pages (excluding common function pages such as 404, which should not be combed unless they are coupled to the business)
      • Subpages of subpages…
  • Interactive components (features)
  • Non-interactive components (often the result of back-end data operations)

We basically follow the combing process, from page (or function module) → interactive component (action point) → non-interactive component. Generally, swimlane map and function link are used to connect the whole business process. Here is a legend

The left side of the swimlane map can also be extended with different stages, which can be added as needed.

For this kind of business sorting and drawing, there is a principle that you must abide by, that is, do not add or think about technical details in business drawing, such as request server, because it is out of the scope of the page, for example, reflect asynchronous features, or add some functional content, such as Loading, error page, etc.

The most taboo thing in drawing abstraction is that the scope and granularity of abstraction are not consistent, which is a big taboo in abstract thinking. Many people often have an unrealistic idea, that is, to draw all the contents they want to reflect in a picture. To this idea, I would like to say, first of all, it is difficult, difficult and almost impossible, and second, it will be messy. Any image has a theme that limits your level of content expression and abstraction, and when you try to break that theme, it leads to confusion of expression, much like photography.

The first brother of photography often make the problem is, ah scenery is so beautiful, I want to take down, after taking, a look at the photo, MY grass, this what ghost.

So for business sorting, the general theme is around the word business, so what is business, everyone has it is not business, at least not your business, your own specific, or only you know and your team care about that is the narrow sense of business.

Only the narrow sense of the business is clear, to understand the daily work is the most helpful thing.

Business that is already a consensus is not worth combing

I put a simple business in the legend above, which is roughly similar to that. You open the takeout APP, and there is a button called “What to eat?”, you jump to a page at one click, and a row of preferred businesses are listed.

For example, when it comes to online shopping, there will be a whole process from looking for things, shopping cart, ordering and payment in your mind. Almost everyone knows this business process, because people do it in daily life. However, for the front end, most businesses in the 2C field are actually not worth sorting out. The reason lies in what I said before, what is business is unique to you, you have and I have the business that everyone has. It is already a consensus to sort out the consensus, just like writing down our daily work and rest, just like the diary of the running account is meaningless. Because it’s not going to help you improve anything.

So every time I’ve seen front-end teams in the 2C space talk about grooming, it falls apart because there’s nothing to tease out. Because the whole business process has been abstracted well, we can even design the structure of the code with our eyes closed, how many pages, how many components, how the components interact, how the data flow and so on.

Here a business is derived from the premise of sorting out the domain specific business, non-consensus business, and constantly changing

If your team is doing business review and writing business documentation, look at these three points. If not, I think we can eliminate the process.

And the reason we’re doing this is because we’re doing a business that basically fits those three things. For fiscal and tax software.

  • Finance and taxation are specific areas
  • There is no consensus on how to manage your finances and how best to file your taxes
  • National fiscal and taxation policies change more and more frequently, and under the continuous deepening of reform, the content and rules of fiscal and taxation become increasingly complicated.

That’s why it’s so important to have a good business document at the forefront of our industry.

The latter

The strong development of 2B is a very good thing for the front end. In the past, we all said that our business was too thin in the 2C field. In fact, I should not use this word properly, but it is more accurate to say that the consensus has been achieved. You can almost copy a version of someone else’s APP, which shows how high the degree of consensus is. But for 2B, copy may not be able to copy understand, because the business behind this is very complex. And complexity is exactly the soil on which a software lives, and also the precondition for our software engineers to play their value. Just like if no one commits a crime, what is the use of police? Similarly, if software development is simple, what is the use of software engineers?