V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yakczh
V2EX  ›  程序员

象这种组合怎么设计

  •  
  •   yakczh · 2013-06-03 12:01:33 +08:00 · 2331 次点击
    这是一个创建于 4040 天前的主题,其中的信息可能已经有所发展或是发生改变。
    比如
    class BaseAction {

    request

    response


    }

    class Action extends baseAction{
    request

    response( load some template)
    }


    有些请求是ajax请求

    class AjaxAction extends baseAction{
    request

    response( output json )
    }

    有些请求是后台请求

    class AdminAction extends baseAction {
    request ( 检查权限)

    respone
    }

    如果有些请求既是ajax请求,又是后台管理请求怎么设计呢?
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5610 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 02:18 · PVG 10:18 · LAX 19:18 · JFK 22:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.