preface

“Live up to the time, the creation of non-stop, this article is participating in 2021 year-end summary essay contest” so unconsciously, 2021 is close to the end. I was thinking what did I get out of this year? Is there any growth? Take this opportunity to remember…

As far as the eye can see, it’s all memories

Unconsciously has been doing front-end development for so long, from the original front and back end is not separated to the present front and back end separation. It is true that there are too many changes in the middle, and I have experienced my own technical iterations in this wave. Of course, there is no way, technology such as sailing against the current, you do not improve themselves will be eliminated. Of course, in the iteration of this technology, I also learned a lot. Make a brief summary of your journey this year.

Set a good state of mind, and born to the sun

I believe we all have confused time, of course I am no exception. But I knew that such confusion was not good for me, so I looked at myself again and kept asking myself, what do I really want? Or what do you want to do? And I was thinking, you know, I’ve been in the front end for years, and I’ve been in the business, and everybody’s pretty much the same. Nothing more than some background management systems, mobile TERMINAL H5 pages, small programs. So for me, what are my highlights? Because I don’t see any bright spots on my business projects, because complexity and traffic are not at the point where I can say anything. Then I am very anxious about this, because no bright spot means easy to be replaced, oneself also do not want to see. Therefore, I began to replan myself from the project to make myself grow and find my astigmatism point in work.

Recast the battleship and set sail

CLI

Since the project had no bright spots to talk about, I found the points to talk about by myself, so I started my journey from finding and solving problems. When developing a small program, you find it tedious to create a page or component because the small program specifies that the page or component must be a folder containing four files. So, if I were to create it directly in the vscode editor, I would do this:

  • Create a new folder like Common
  • Then create a new index. WXML
  • Create a new index. WXSS
  • Create a new index.json file

After some experience, certainly do not want to create every time is like this ah, no, so I in the wechat developer tool to create a new. Sure enough, the developer tool doesn’t have to create one file at a time, but there is a problem. I’m developing in vscode, and every time I create a new page, I have to go to the developer tool to create one, which is not what I want either.

Can’t help it, who let ME love to toss people? So I thought, why can’t I build a scaffold that integrates the functions THAT I want. So I developed a scaffold that supports the following:

  • One-click creation of components or pages and support for custom templates
  • Supports duplicate name detection
  • Support for directory selection
  • Support nailing alarm
  • Support development environment switching
  • Support ci last experience version

Anyway, it is to think of what function to add on their own, this is to find their own problems and solve the problem, but also their lazy process.

Vscode plug-in

When scaffolding was developed, but I wasn’t satisfied with that. I was thinking why don’t I just put the new file template page and component functionality directly into vscode? So I went ahead and researched how to develop a plug-in. In the process of developing plug-ins also encountered a lot of problems, so a variety of online search. Finally, after a few potholes, a plugin was created. The process was not smooth, but the result was good. During the process of developing plug-ins, I learned a lot and gained a deeper understanding of vscode, including the interface structure, etc. At the same time, the biggest gain is node and TS, because the plug-in is developed based on TS and Node. I am also more familiar with the usage of TS. I became more familiar with Node tools and found another door to JS, which can do a lot of interesting things with local file manipulation like many back-end languages.

The service side

Learning to write apis using server-side frameworks such as EggJS isn’t that difficult. The hard thing is learning about writing an API to add other things, such as databases, security, error monitoring, etc., on the server side. So there is a long way to go before learning to write an interface developer but also to learn their surrounding technology. But I don’t think that’s what we’re going to focus on. We’ll do it, but we’ll do it after we get our front-end stuff right, because there are a lot of things that Node can do. Server-side writing is just one of them. To pay more attention to the front-end architecture, let’s talk about my own work thinking.

Engineering automation

When you’re thinking about how you can do your development more efficiently, you’re probably already moving in the direction of engineering and automation. In fact, this part is to improve our development efficiency, let us better development. For example, the CLI mentioned above is part of engineering. The automation of CI, such as the automatic trigger of CI deployment after the code is uploaded, greatly improves the development efficiency. These are points worth thinking about and paying attention to.

I found that there was something missing in the company’s business, so I took the initiative to undertake these tasks and developed some scaffolding and NPM packages suitable for my company’s business. I helped my colleagues solve some problems in development, which was very helpful for my own technical improvement.

It is a kind of thinking in this kind of work that makes me look for the point that I can improve and break through from the pure business development. It is necessary to broaden the breadth and depth of my skills and improve myself in the process of development.

A phoenix rises from the ashes

In work opportunities and difficulties are often equal. Development, found that the problem is to find a way to go to solve, this is the growth, because when you find that you cannot solve a problem, you must go back to check information, see all kinds of articles about the problem, and then begin to try whether can solve your problem, may sometimes your luck is not very good, you get the last may not be as you wish to solve the current problems, But don’t be discouraged. You have to continue to look up information, and then you will constantly try to solve your problems, do a good record and precipitation, this is your growth. You will consolidate what you know and learn and master what you don’t know by solving problems. One of the things I’ve learned in problem solving

  • node
  • docker
  • webpack
  • react hooks
  • ts

And so on!

Do what you have to do

And of course there are people who think, well, what good is it for me to think about this in the short term? For example, thinking and solving these problems may add stress and difficulty to our own development schedule or efficiency. Let’s say you’re using a new technology or a suitable technology that you’re not good at. Or the problem you find is an optimization point in the infrastructure and does not affect your business development. In the short term, it pays more to identify and solve these problems than it benefits (you think), but when you start to think this way, you’re making progress, and the benefits are enormous. In the long run, it’s even better. It gives you direction, not confusion.

As long as believe that: pay there will be harvest, hope that we can get what they want.