佶屈聱牙,错译连篇——评《领域驱动设计与模式实战》中译本
P3(4)
(译文)首先,我认为保持模型焦点是一种明智的做法。
(原文)First, I think it's wise to keep a model focus.
(建议)首先,让我们把注意力放在模型上。
(评论)没有大的错误,只是翻译得生硬而已。
P12(10)
(译文)值得一提的是,以上描述的行为可能恰恰是在特定场景中加载大量数据时需要避免的。
(原文)Worth mentioning is that the behavior just described might be exactly what you need to avoid massive loading of data in a specific scenario.
(我的理解)值得一提的是,上述行为在某些场景中可能正是你所需要的,因为这样可以避免加载大量的数据。
P12(-7)
(译文)我知道,有些读者现在会说,在不使用存储过程的情况下可以非常有效地解决前面的示例,或者说该存储过程不是适用于所有情况的最有效的一个。
(原文)I know, some of my readers will now say that the previous example could be solved very efficiently without stored procedures or that that stored procedure wasn't the most efficient one in all circumstances.
(我的理解)我知道,有些读者可能会说,不用存储过程也可以非常有效地解决前面的示例,或者说存储过程并非在所有情况下都是最高效的。
P14(5)
(译文)上述问题取决于是否使用领域模型。
(原文)The problems mentioned so far exist whether you use a Domain Model or not.
(我的理解)上述问题无论使用领域模型与否都会存在。
P20(-13)
(译文)还要指出的重要一点是,即使做出预先决定,它也不是固定的,甚至不一定是有关是否使用领域模型模式的决定。
(原文)It is also important to point out that even though you do make an up front decision, it's not written in stone, not even your decision about whether or not to utilize the Domain Model pattern.
(评论)“not even your decision about whether or not to utilize the Domain Model pattern”其实是“即使是有关是否使用领域模型模式的决策也并非不能更改”的意思。
P21(12)
(译文)也就是说,
(原文)That said, I definitely think the Software Factories initiative is interesting.
(评论)“That said”有转折的含义,应该译为“然而”。
P27(1)
(译文)当然,我们也可以在面向数据库的设计中应用TDD,但当使用领域模型时,我一直未能适当而有效地应用它。
(原文)Sure, you can also apply TDD with more database-oriented design, but I haven't been able to apply it as gracefully and productively as when I'm working with Domain Models.
(我的理解)当然也可以在面向数据库的设计中应用TDD,但对我来说在领域模型中应用TDD效果更为理想。
P33(-4)
(译文)无论何时我们可以使用Person,也应该可以使用Student,因为Student是Person的子类。
(原文)Wherever you can use Person, you should also be able to use a Student, because Student is a subclass of Person.
(评论)Wherever,“何时”还是“何地”?
P33(-1)
(译文)使用反射来处理Person的方法可能不需要Student。
(原文)A method that uses reflection for dealing with Person might not expect Student.
(我的理解)使用反射来处理Person的方法未必能处理Student。
P35(16)
(译文)设计模式是抽象的和相当低级别的,它们是关于技术的,而且通常与领域有关。
(原文)Design Patterns are abstract and pretty low-level in that they are technical and general in regard to domain.
(评论)“general in regard to domain”似乎是与领域无关的意思。
P44(4)
(译文)另一个选项是在整体结构中添加应用服务器,
(原文)Another option is to add an application server to the picture and ask it to only send over a collection reference to the client side, and then much less data is transmitted, of course.
(建议)另一种方法是。。。
(评论)没有大的错误,只是翻译得生硬而已。
P46(7)
(译文)数组的第一列是字段名(例如CustomerName),第二列是操作员(例如人口调查员),第三列是判断标准,例如“*aa*”。
(原文)The first column of the array was the fieldname (such as CustomerName), the second column was the operator (such as Like from an enumerator) and the third column was the criterion such as "*aa*".
(我的理解)数组的第一列是字段名(例如CustomerName),第二列是操作符(例如一个Like枚举值),第三列是判断标准,例如“*aa*”。
P46(9)
(译文)该解决方案可以通过参数列表来解决某些问题,但它也存在自身的问题。
(原文)That solution solved some of the problems with the parameter list, but it had its own problems.
(我的理解)该解决方案解决了之前的参数列表方案的一些问题,但也有自身的缺点。
P46(17)
(译文)查询对象的思想是封装Query实例中的判断标准,然后将该Query实例发送到另一个层。。。
(原文)The idea of the Query Object pattern is to encapsulate the criteria in a Query instance and then send that Query instance to another layer where it is translated into the required SQL.
(评论)所谓的“封装Query实例中的判断标准”其实是“把判断标准封装在Query实例中”的意思。
P48(-12)
(译文)例如,为了查找黄金客户,我们可以同时使用查询对象和规格,但解决方案将不同。
(原文)For example, for finding the gold customers, you can use both query objects and specifications, but the solutions will differ.
(评论)这里的“both”译作“同时”不妥,作者的意思是query objects和specifications这两种模式“都”可以使用(可译作“既可以使用Query Objects模式也可以使用Specifications模式),但并不是同时使用。
P51(9)
(译文)当工厂代码位于外部类中时,只能通过领域模型中其他类的构造方法对订单进行实例化,这是无法避免的。
(原文)To avoid the instantiation of orders via the constructor from other classes in the Domain Model if the Factory code is in an external class is not possible,
(我的理解)当工厂代码位于外部类时,要防止领域模型中其他类通过构造函数来实例化订单类是不可能的。
这本书只看了前两章就看不下去了,实在太累了,尤其是看到第46页有关“人口调查员”的译文时,真有天旋地转的感觉,信心完全崩溃。从PoEAA到DDD再到这本ADDDP,很遗憾中译本的颓势一直在延续。看经典的IT书籍,中文总是显得那么遥远......
(译文)首先,我认为保持模型焦点是一种明智的做法。
(原文)First, I think it's wise to keep a model focus.
(建议)首先,让我们把注意力放在模型上。
(评论)没有大的错误,只是翻译得生硬而已。
P12(10)
(译文)值得一提的是,以上描述的行为可能恰恰是在特定场景中加载大量数据时需要避免的。
(原文)Worth mentioning is that the behavior just described might be exactly what you need to avoid massive loading of data in a specific scenario.
(我的理解)值得一提的是,上述行为在某些场景中可能正是你所需要的,因为这样可以避免加载大量的数据。
P12(-7)
(译文)我知道,有些读者现在会说,在不使用存储过程的情况下可以非常有效地解决前面的示例,或者说该存储过程不是适用于所有情况的最有效的一个。
(原文)I know, some of my readers will now say that the previous example could be solved very efficiently without stored procedures or that that stored procedure wasn't the most efficient one in all circumstances.
(我的理解)我知道,有些读者可能会说,不用存储过程也可以非常有效地解决前面的示例,或者说存储过程并非在所有情况下都是最高效的。
P14(5)
(译文)上述问题取决于是否使用领域模型。
(原文)The problems mentioned so far exist whether you use a Domain Model or not.
(我的理解)上述问题无论使用领域模型与否都会存在。
P20(-13)
(译文)还要指出的重要一点是,即使做出预先决定,它也不是固定的,甚至不一定是有关是否使用领域模型模式的决定。
(原文)It is also important to point out that even though you do make an up front decision, it's not written in stone, not even your decision about whether or not to utilize the Domain Model pattern.
(评论)“not even your decision about whether or not to utilize the Domain Model pattern”其实是“即使是有关是否使用领域模型模式的决策也并非不能更改”的意思。
P21(12)
(译文)也就是说,
(原文)That said, I definitely think the Software Factories initiative is interesting.
(评论)“That said”有转折的含义,应该译为“然而”。
P27(1)
(译文)当然,我们也可以在面向数据库的设计中应用TDD,但当使用领域模型时,我一直未能适当而有效地应用它。
(原文)Sure, you can also apply TDD with more database-oriented design, but I haven't been able to apply it as gracefully and productively as when I'm working with Domain Models.
(我的理解)当然也可以在面向数据库的设计中应用TDD,但对我来说在领域模型中应用TDD效果更为理想。
P33(-4)
(译文)无论何时我们可以使用Person,也应该可以使用Student,因为Student是Person的子类。
(原文)Wherever you can use Person, you should also be able to use a Student, because Student is a subclass of Person.
(评论)Wherever,“何时”还是“何地”?
P33(-1)
(译文)使用反射来处理Person的方法可能不需要Student。
(原文)A method that uses reflection for dealing with Person might not expect Student.
(我的理解)使用反射来处理Person的方法未必能处理Student。
P35(16)
(译文)设计模式是抽象的和相当低级别的,它们是关于技术的,而且通常与领域有关。
(原文)Design Patterns are abstract and pretty low-level in that they are technical and general in regard to domain.
(评论)“general in regard to domain”似乎是与领域无关的意思。
P44(4)
(译文)另一个选项是在整体结构中添加应用服务器,
(原文)Another option is to add an application server to the picture and ask it to only send over a collection reference to the client side, and then much less data is transmitted, of course.
(建议)另一种方法是。。。
(评论)没有大的错误,只是翻译得生硬而已。
P46(7)
(译文)数组的第一列是字段名(例如CustomerName),第二列是操作员(例如人口调查员),第三列是判断标准,例如“*aa*”。
(原文)The first column of the array was the fieldname (such as CustomerName), the second column was the operator (such as Like from an enumerator) and the third column was the criterion such as "*aa*".
(我的理解)数组的第一列是字段名(例如CustomerName),第二列是操作符(例如一个Like枚举值),第三列是判断标准,例如“*aa*”。
P46(9)
(译文)该解决方案可以通过参数列表来解决某些问题,但它也存在自身的问题。
(原文)That solution solved some of the problems with the parameter list, but it had its own problems.
(我的理解)该解决方案解决了之前的参数列表方案的一些问题,但也有自身的缺点。
P46(17)
(译文)查询对象的思想是封装Query实例中的判断标准,然后将该Query实例发送到另一个层。。。
(原文)The idea of the Query Object pattern is to encapsulate the criteria in a Query instance and then send that Query instance to another layer where it is translated into the required SQL.
(评论)所谓的“封装Query实例中的判断标准”其实是“把判断标准封装在Query实例中”的意思。
P48(-12)
(译文)例如,为了查找黄金客户,我们可以同时使用查询对象和规格,但解决方案将不同。
(原文)For example, for finding the gold customers, you can use both query objects and specifications, but the solutions will differ.
(评论)这里的“both”译作“同时”不妥,作者的意思是query objects和specifications这两种模式“都”可以使用(可译作“既可以使用Query Objects模式也可以使用Specifications模式),但并不是同时使用。
P51(9)
(译文)当工厂代码位于外部类中时,只能通过领域模型中其他类的构造方法对订单进行实例化,这是无法避免的。
(原文)To avoid the instantiation of orders via the constructor from other classes in the Domain Model if the Factory code is in an external class is not possible,
(我的理解)当工厂代码位于外部类时,要防止领域模型中其他类通过构造函数来实例化订单类是不可能的。
这本书只看了前两章就看不下去了,实在太累了,尤其是看到第46页有关“人口调查员”的译文时,真有天旋地转的感觉,信心完全崩溃。从PoEAA到DDD再到这本ADDDP,很遗憾中译本的颓势一直在延续。看经典的IT书籍,中文总是显得那么遥远......
有关键情节透露