当一个API过度设计? [英] When is an API overengineered?

查看:263
本文介绍了当一个API过度设计?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我鄙视与过度设计的API,不要让简单的事情变得简单的工作。尽管如此,我工作的一个开放源码库设计API,我开始觉得我掉进陷阱过度设计。我真的不能告诉是肯定的,因为当然,我写的混账东西,所以它的工作原理是比较明显,我比任何人都。什么是从开发人员的角度来看一些警告迹象表明,你的API可能会被过度设计?

I despise working with overengineered APIs that don't make simple things simple. Nonetheless, I'm working on designing an API for an open-source library and I'm starting to feel that I'm falling into the overengineering trap. I really can't tell for sure because, of course, I wrote the darn thing, so how it works is more obvious to me than anyone else. What are some warning signs from a developer's perspective that your API might be overengineered?

推荐答案

什么是从开发人员的角度来看,你的API可能会被过度设计一些警示标志?

"What are some warning signs from a developer's perspective that your API might be overengineered?"

没有用例。

如果您无法通过简单的运行做这个的场景,你不考虑设计具有特定用例有用的API。

If you can't run through simple "to do this" scenarios, you're not designing a useful API with specific use cases in mind.

您的文档应该是那些用例。

Your documentation should be those use cases.

这是不直接解决了使用功能的情况下可能过度工程。

Features that don't directly address the use cases are probably over-engineering.

这篇关于当一个API过度设计?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆