V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
julyclyde
V2EX  ›  Python

类似这种叫什么模式?

  •  
  •   julyclyde ·
    julyclyde · 23 天前 · 2574 次点击

    类似 socketserver 和 handler asynchat 这类,把通信和应答功能分离的 叫什么模式?

    6 条回复    2024-09-10 10:40:46 +08:00
    GeekGao
        1
    GeekGao  
       23 天前   ❤️ 1
    处理器模式( Handler Pattern )或回调模式( Callback Pattern )
    SuperDaFu
        2
    SuperDaFu  
       22 天前
    我理解,设计模式的基础是做好 职责分离,只做自己分内的事情。
    julyclyde
        3
    julyclyde  
    OP
       21 天前
    @SuperDaFu 虽然你说的对,但你这句话和我的提问有什么关系呢?
    SuperDaFu
        4
    SuperDaFu  
       15 天前
    @julyclyde 关系就是设计模式往往解决的是小职责的问题,你的问题应该落到设计原则,而不是简单的设计模式上。
    julyclyde
        5
    julyclyde  
    OP
       14 天前
    @SuperDaFu 你想多了
    dode
        6
    dode  
       6 天前
    适配器模式,责任链模式,代理模式
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   941 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 19:50 · PVG 03:50 · LAX 12:50 · JFK 15:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.