|
|
libcats.org
Fundamentals of OOP and Data Structures in JavaRichard Wiener, Lewis J. PinsonAfter reading the first three chapters, I had to conclude that the book was too dated to use. Here are some of its problems:
(1) The book and previous reviewers speak of code that can be downloaded from the publisher's web site; the publisher no longer makes such downloads available. (2) With respect to software design methodologies, the author embraces "design by contract" which was championed by Bertrand Meyer in 1997 in "Object-Oriented Software Construction." This approach has pretty much been left by the wayside, with "patterns" being the currently touted approach. The author also adheres to a design methodology which rigidly classifies object messages as being either commands (methods that change the internal state of the object) or queries (methods that report back on the object's internal state). When it was time to implement stacks, this rigid adherence put him in a quandry. Traditionally "popping" a stack results in both situtations: the topmost value is returned by the pop (like a query) and the internal state of the stack is changed (like a command). To adhere to the command/query dichotomy, the author made popping a two-process. "Pop" changes the internal state of the stack, storing the topmost element in an internal field and reducing the size of the stack by one. However in order to restrict popping to "command" status, the topmost value is not reported back to the invoking code. Instead the user has to issue a subsequent "query" requesting the value of the topmost element. This implementation is oblivious to the impact that such a two-step process would have in a threaded environment. If thread_2 issues a pop command after thread_1 pops, but prior to thread_1 querying for the topmost value, the topmost element would be lost forever. (3) The author makes use of Java classes that have since been deprecated. For instance he uses the Vector class, which has been more or less replaced by ArrayList. (4) The author's convention for naming methods isn't in line with the current, prevailing conventions. For "commands" he uses various action words followed by a noun which describes the field being impacted by the command. For "queries" he restricts the name to a noun or noun phrase which describes the field value that's being returned. However it is now more common to see "commands" named "setField()" and "queries" named "getField()". Many IDE's automatically create method names utilizing the "set" and "get" naming convention. For these reasons, I can no longer recommend the book.
Популярные книги за неделю:
Система упражнений по развитию способностей человека (Практическое пособие)Автор: Петров Аркадий НаумовичКатегория: Путь к себе
Размер книги: 818 Kb
Сотворение мира (3-х томник)Автор: Петров Аркадий НаумовичКатегория: Путь к себе
Размер книги: 817 Kb
Introduction to Functional Programming (Prentice Hall International Series in Computing Science)Автор: Richard Bird, Автор: Philip WadlerКатегория: Математика, Прикладная математика
Размер книги: 4.73 Mb
The Clean Coder: A Code of Conduct for Professional Programmers (Robert C. Martin Series)Автор: Robert C. Martin
Размер книги: 6.06 Mb
Только что пользователи скачали эти книги:
Theorie des groupes, groupe des rotations et de PoincareАвтор: Delamotte B.Категория: Mathematics, Symmetry and groups
Размер книги: 406 Kb
ActionScript 3.0 Design Patterns: Object-Oriented Programming TechАвтор: William Sanders, Автор: Chandima Cumaranatunge
Размер книги: 3.96 Mb
Quantum Theory of Magnetism - Magnetic Properties of MaterialsАвтор: Robert M. White
Размер книги: 8.09 Mb
The Forest Landscape Restoration Handbook (Earthscan Forestry Library)Автор: Jennifer Rietbergen-McCracken, Автор: Stewart Maginnis, Автор: Alastair SarreКатегория: Геология
Размер книги: 3.45 Mb
The Messiah: A Comparative Study of the Enochic Son of Man and the Pauline Kyrios (Jewish & Christian Text)Автор: James A. Waddell
Размер книги: 997 Kb
The Influence of Islamic Philosophy and Ethics on The Development of Medicine During the Islamic RenaissanceАвтор: GhazalКатегория: The Influence of Islamic Philosophy and Ethics on The Development of Medicine During the Islamic Renaissance, Alhassanain Network, http:, alhassanain.org, english, ?com=book&id=919
Размер книги: 105 Kb
|
|
|