Some thoughts on the front-end construction of small companies

In the previous enterprise project development, he has done some front-end infrastructure construction and project promotion work.

After the completion of the project, there has been no time to sort out and reflect on the problems and solutions encountered in the process of advancement. Since there are fewer front-end team members, there are more multi-person collaborations and joint efforts to overcome some problems.

tool

Front-end editors, including sublime, as well as vscode, as well as editors such as webstorm and atom, have developed to now, vscode has become the mainstream editor for front-end development. In the team development process, for some fixed plug-ins, it is necessary to implement specifications and unity.

include:

The size of tab indentation and formatting plugins. For example, in the Vue development process, it is recommended to use Vetur for formatting and code constraints, including tools such as code inspection eslint.

In addition to the unified use of plug-ins as the norm, other plug-ins can be used as personal preferences and habits.


project structure directory

Folder division

Take vue development as an example: interface api, routing router, state management store, component compoment, tool class utils, it is recommended to unify them into their own folders, clarify the functions of the folders, and the file naming convention can refer to: vue official document - style guide

Folder naming can be based on habit, the most important thing is to clearly divide functions to ensure directory confusion during development


code writing

javascript

  • Capitalize constants, use commands such as let and const, variables and methods are named using camel case or underscore,
  • Tool class utils and dependent package methods, such as: time formatting YYYY-MM-DD, uniformly use the formatting methods in utils
  • Methods such as deep copying or throttling and anti-shake are packaged or used lodash according to the project scene to unify, and mixed use will easily increase development costs.

html&&css

Use camel case or - as the connection for the class name. It is recommended to refer to the Tencent CSS writing specification for the writing order.

git

  • There is one main branch by default, which should be the consensus of everyone in the process of code maintenance
  • After the project goes online for the first time, it is recommended to add a fix branch as a branch for bug maintenance in the production environment
  • During the development process, the submission and submission information of the dev branch should be detailed and preferably according to the type of submission, whether it is a fix or an update code

Collaborative development

During the development process, the progress and cycle of the project are not the same. At the same time, some front-end developers may have just entered the project, while some have stayed in the project for a long time, and their abilities will also be different. When developing and assigning tasks , it is necessary to assign tasks according to different situations.

issues to consider

  • Whether to focus on training when assigning tasks according to the strength of personal ability, or to deal with problems that are good at in accordance with the areas of personal expertise.
  • The writing of business components and public components is divided according to the modules of the assigned tasks or completed by a student alone
  • More questions. . .

Documentation and Notes

  • The project's readme.md is recommended to be as complete as possible, not only limited to installing npm dependencies and startup, but should also include the above mentioned: plugin specifications, some important dependencies, node versions, etc.
  • Code comments are recommended to maintain good habits, including code block comments, business logic comments, implementation pain points, etc.

front-end manager

  • As the person in charge of the front end, you need to make better technology selection based on business needs, and have a certain understanding and breadth of knowledge about existing tools
  • Good basic coding support as support, familiar with front-end project architecture, with front-end development skills, proficiency in business development, certain ability and understanding of algorithms, and good sensitivity to technical updates and information in the front-end field
  • Have certain management ability, maintain the vitality of the team, and improve the combat ability of the entire team. It is recommended to carry out some technical sharing or discussion, and guide the members of the front-end team to overcome some problems and be good at discovering their bright spots.
  • Whether it is for front-end members or other colleagues or superiors, he has good communication and understanding skills, quickly locates problems, and communicates effectively.

write at the end

The above are some thoughts on the construction of front-end teams in small companies. For the front-end in 2022, I hope that all front-end development students can find their own world.

Article personal blog address: some thoughts on the front-end construction of small companies

Creation is not easy, please indicate the source and author when reprinting.

Guess you like

Origin juejin.im/post/7077725607605305358