interface的接口函数多了怎么管理分类?

28 views
Skip to first unread message

Joost Shao

unread,
Oct 29, 2013, 12:26:53 PM10/29/13
to think...@googlegroups.com

现在的情况是一个interface 类 里面有很多的函数。
没有注释,也没有文档,只有代码。
很多函数看似很类似,而且对接口函数也没有分类。

所以我想问一下,对于接口函数的分类方法是怎么样的?
一般怎么来管理这些接口,20个左右的接口。

傻傻等你??

unread,
Oct 30, 2013, 12:04:36 AM10/30/13
to thinkinlamp
按照资源(或者叫业务)划分吧. 就像是你对外提供API. 
资源A/增删改查
资源B/增删改查
资源C/其他操作

其中资源应该是业务无关的.. 也就是用户在调用你接口的时候, 一件事儿只需调用一个接口. 
而不应该是这种:
call 新增文章
call 增加文章总数


------------------ 原始邮件 ------------------
发件人: "Joost Shao";<joosts...@gmail.com>;
发送时间: 2013年10月30日(星期三) 凌晨0:26
收件人: "thinkinlamp"<think...@googlegroups.com>;
主题: [thinkinlamp] interface的接口函数多了怎么管理分类?
--
--
ThinkingInLAMP邮件组使用说明:http://blog.thinkinlamp.com/?p=758

---
您收到此邮件是因为您订阅了 Google 网上论坛的“thinkinlamp”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 thinkinlamp...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。

Joost Shao

unread,
Nov 23, 2013, 2:07:04 AM11/23/13
to think...@googlegroups.com
    根据职责来分离。。。。。  多谢了

在 2013年10月30日星期三UTC+8上午12时26分53秒,Joost Shao写道:
Reply all
Reply to author
Forward
0 new messages