当前位置:网站首页>Around ifelse and business logic
Around ifelse and business logic
2022-06-10 06:43:00 【Solution jdon】
1. Maybe by default return false You can save half the code , The cartoon complained about if else The burden of is long , Hope to simplify it , But it is essential to simplify the business logic , If it is only within the boundaries of the coding category visible to the programmer , Limited role :

2. Programmers are at different stages if else The cognitive , Programming is using iflese Implement business logic :
3. Take another look Humor , Probably because it is too complicated ifelse Lead to Bug A hundred , Last but not least bug Maintain the normal operation of the software system :

The above three humorous pictures illustrate ifelse The status quo of implementing business logic , Solution :
- Business and IT The era of separation is over ? : Programmers can't just do solutions , It must also enter the problem area
- What is a strategically clear challenge map ? : Introduce strategic approaches such as products , Solve the fundamental problems of business logic from the perspective of problem domain
- Product sharing : What should the product manager do after taking the post ?: Introduce product manager , Specifically address these businesses and IT The strategic issue of integration
- The side effect is the number one enemy of programming ! How to peel it off ?-: When programmers implement the business logic code , Need to put if else Represents the separation of business rule strategy and specific execution action tactics , This is also Functional programming A train of thought
- Rule engine mode .NET Open source project cases : Further more , according to SOLID Principle introduces rule engine Design patterns , Completely separate strategy and tactics .
- A complex system is a mental interface : For more complex systems , Use DDD Domain Driven Design, etc .
All in all ,ifelse A few letters represent the bitter tears of the software industry , Boulevard dissolves in ordinary code , This may be the true meaning of the road to simplicity .
边栏推荐
- Beyond compare
- Déterminer si le processus a des privilèges d'administrateur
- BOM browser object model
- go-zero 微服务实战系列(二、服务拆分)
- C#中装箱和拆箱
- Nextcloud internal server error the server cannot complete your request workaround
- 问题:拦截导弹
- 在 Kubernetes 中基于 StatefulSet 部署 MySQL(上)
- There are two ways to convert Las to PCD
- scala fastjson 修改key或者value
猜你喜欢

tensorflow实验十-----图片翻转与缩放

李宏毅老师《机器学习》课程笔记-5 Transformer

Deploy MySQL based on statefulset in kubernetes (Part 1)

Embedded development | common operations of EEPROM driver code

Firefox browser settings point to proxy mode

go-zero 微服务实战系列(二、服务拆分)

Leetcode675. Cutting trees for golf competition: priority queue + breadth first to find the shortest path

One brush 163 force deduction hot topic-76 minimum covering substring (H)

白加黑过360启动项工具源码发布 多文件过启动项代码

Unlock TRPC high performance password: introduction to network scheme!
随机推荐
Notes for beginners
Fix a button in the lower right corner
Rsync+inotify remote synchronization
White plus black over 360 startup item tool source code release multiple files over startup item code
Nignx configuring websocket
Efficiency improvement: realize personal task management and monitoring with notation
tensorflow实验九----------泰坦尼克号
PHP implementation keeps two decimal places
Deploy MySQL based on statefulset in kubernetes (Part 2)
Nextcloud internal server error the server cannot complete your request workaround
CMD of Jerry's AI protocol_ SET_ BT_ Addr [chapter]
2022-2027 (New Edition) report on the prospect and future development of China's property rights trading industry
Thoroughly conquer function pointer
Learn regular expressions in less than one round
电脑新加内存条后 游戏崩溃 浏览器卡死 电脑蓝屏
Write the data in the JSON file to the database
sql基础
Longest common subsequence
pyinstaller
Jerry's aicmd command [chapter]