Reference some bloggers’ experience and my own development experience to summarize – keep updating ING.

Functional design

  1. Functions as modular as possible;
  2. The design of the class is as single as possible, and the function is single.
  3. Need UML diagrams (class diagrams, sequence diagrams, component diagrams), document precipitation;

The writing style

  1. Follow the pSR-1 basic coding specification laravel-china.org
  2. Follow the PSR-2 coding style specification laravel-china.org
  3. Comment!!
  4. Constants, env instead of hard coding
  5. Routing follows RestfulApi principles
  6. Created_at (INT type), updated_AT (TIMESTAMP ON CURRENT_TIMESTAMP, date type, automatic update), deleted_AT (default NULL)

Code distribution

1.MVC

  • Model-sql processing, no business should occur
  • View –
  • Controller – Handles parameter validation and method calls (a more thorough approach is to create a new request class that handles validation and parameter filtering, and a control class that calls the request class)
  • Service – the business

2. Upgrade version birjemin.com/wiki/php-ou…

Laravel a few things to watch out for

This is reference 2, see the link to reference 2 for details.

  1. Use Eloquent and collections first to manipulate and process data.
  2. Use standard Laravel tools that are accepted by the community
  3. Follow the Laravel naming convention
  4. Use abbreviations or more readable syntax (optional,)
  5. Use IoC containers or facades
  6. Don’t get data directly from.env (use the config() method)

Demand process

  1. Requirements Review Meeting
  2. QA to make Case, DEV time estimation, plan (class diagram, sequence diagram, component diagram)
  3. Review requirement Case meeting, requirement design proposal meeting
  4. The development of
  5. DEV self tests against Case (there should also be a unit test)
  6. Delivering QA (Functional Testing)
  7. acceptance
  8. online
  9. Checking the meeting

The development process

  1. Outgoing interface document
  2. The development of
  3. Interface self-test, unit test
  4. alignment
  5. Case self-test
  6. Transfer of QA

Performance optimization

1. Data level

  • Use the SSDB
  • Add index, read and write separation, table disassembly, SQL statement optimization
  • Add the cache
  • Precompute (pre-compute results, such as scripted timed calculations, real-time calculations)
  • Log collection technology is adopted for asynchronous processing
  • Paging for data
  • Use ES to aggregate large amounts of data

2. Business

  • Asynchronous instead of synchronous
  • Current limiting
  • Cut demand bai

3. The other

  • Open opcache

The art of arguing with a product producer

Keep your mouth shut while you can

supplement

Get the product manager PM on his side

reference

  1. psr.phphub.org/
  2. Github.com/nonfu/larav…
  3. plantuml.com/
  4. www.cnblogs.com/easypass/ar…