我阅读了很多计算机科学书籍和文章,并且不断看到“code against”这个词。例如,在 Donald Brown、Chad Michael Davis 和 Scott Stanlick 合着的Struts 2 in Action一书中,可以找到以下句子:
"Although it’s possible to write web applications by directly coding against the Servlet API, this is generally not considered a good practice."
"This means that Java developers can write HTTP server code against an intuitive object-oriented abstraction of the HTTP client/server communications."
特别是在这本书中,也有很多使用短语“resolve against”的例子。例如:
"When the framework invokes the result, your JSP page data access will be resolved against the old object."
"The ValueStack represents the data model exposed to the current request and is the default object against which all OGNL expressions are resolved."
"If no namespace attribute is specified, then the action is resolved against the namespace of the current request."
我想我的困惑是基于“反对”这个词。在这个编程概念中如何以及为什么使用它?我认为您不会想要针对某些东西进行编码;相反,我认为你会想要与它相对应地编码。这可能只是作者的措辞,但谁能帮帮我?
最佳答案
“反对”在这里不是“反对”,而是“支持”、“支持”、“提供”、“基于”。 “反对”一词(牛津词典)的公认含义之一是
In or into physical contact with (something), typically so as to be supported by or collide with it
当然,API(或其他)给你的“支持”在这里不是物理的:-)
关于java - "code against"或 "resolve against"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24308363/