1. Introduction

Move to a new company during job-hopping season. Look forward to this new technological level and environment with longing. Often the dream is full and the reality is very thin. The mixed mode of HTML+Jq+ VUejs makes me feel unbearable to maintain. Without saying much, I have to solve problems and start to explore

2. Current thinking

  • Ensure stable production

  • Understand project generation and low cost code reuse

  • View the iteration status of each version

    After understanding

  1. Find a common technology stack to ensure stable collaborative development
  2. Solve the previous multi-version multi-page conflict, improve the efficiency of collaborative development
  3. Understand project requirements, topology and basic product line

The first issue needs to be digested

The problem priority To deal with earnings
Multi-page modularization high Decouple functional modules Resolve conflicts between functional modules
The lack of CI/CD low Lower the phase ii Lack of operation and maintenance Jenkins landing income is not high
Scaffolding/engineering The high Unified framework technology stack Product version can be detachable application
The interface specification In the Field enumeration and semantics Improve productivity and reusability
Code specification low It takes time to Time will tell
To solve the pain points high Tackle the pain points of the above problems Follow-up work arrangements for the second phase

2. Infrastructure design

The new architecture

ClassDiagram background management < < | | - Duck backstage management - Fish background management < | - Zebra background management: all corresponding web management background management: Zebra{class Fish{+ Zebra{+ Zebra{+ Zebra{+ Zebra{)}

The old architecture

ClassDiagram background management < | - Duck background management: all corresponding web management background management: + on-demand delegation () class Duck {+ + independent authorization of front desk page + + Duck Fish () () () + Zebra () +... ()}

2.1 Objectives of phase I

The goal of phase 1 is to separate all front office major projects from the line of business into the following

  • Microapplications, multi-modular management
  • Public static file consolidation, such as Echarts,Jqurey….. Third Party reference
  • GitLab online version permission and product version number are clear
  • Engineering uniform scaffold code, etc

Micro application

Adopt multi-engineering mode, manage each module respectively, optimize the loading speed of each browser, some unnecessary loading problems. Nginx implements unified authorization and then distributes it to each application, which solves the two-time authorization problem. Exposure to the coupling between modules gives you a lot of freedom to iterate on different technology stacks and choose frameworks. This split reduces the code development, maintenance, and collaboration costs between different story development.

Public resources

Common problems such as Echarts, Element-UI, and ant- UI ontology references are very large, and the project may not use very much space. If you do not load on demand, you will load these files repeatedly, wasting network bandwidth and static server storage space, which makes no sense. To extract these JS or CSS for public static CDN reference is beneficial to optimize loading and version control, which will be of great help to the later code maintenance.

GitLab version management

Everyone will encounter the problem of which code is on line when the person is gone, and unified product line pull constraints are necessary. And the product line iteration authority must be the highest level, the team responsible for the iteration should be corresponding to the project customized version number of the iteration, in short, live to see people to see dead!!

Engineering uniform scaffold code, etc

Unified UI, unified technology stack of main engineering, unified request management, so that sub-engineering can be split and merged, no compatibility, too many changes, too many versions and conflict of technology stack, reduce the development cost. Product line scaffolding is the main, do addition, if you need to merge synchronization NPM package can be included.

3. Future plans

The initial plan is being implemented. I will update my landing situation in phase I and share my experience. Here to thank the nuggets of the big guy (^-1) is not the same thanks, special thanks to my idol flower pants greatly @ flower pants, to be continued…….