java - "code against"或 "resolve against"是什么意思?

标签 java oop struts2 programming-languages semantics

我阅读了很多计算机科学书籍和文章,并且不断看到“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/

相关文章:

java - 得到 ® 作为?从 Struts 2 JSP 页面读取时

java - 如何将对象添加到另一个类Java中的数组

java - Maven 编译错误 - 包不存在

java - 为什么 rs.next() 无法正常工作?

java - 文件名不显示上传文件的名称

java - 使用java获取客户端连接速度的最佳方法

java - HashMap:使用对象作为键并使用该键的方法

Java OutputStreamWriter UTF-16 CVS StartLine 上的错误字符

php - 使用 mysqli 提取自定义数据

php - 干净的 OO 结构与 SQL 性能