• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on best practices for large distributed systems

 
AnkitKumar Singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From Book: Sun Certified Enterprise Architect for Java EE Study Guide (Exam 310-051) (Certification Press) by Allen and Bambara
Page : 196


Which of the following are “best practices” for large distributed systems?
A. Avoid business logic implementation in the display code; display inconsistencies can result
because the logic can be copied and modified in one object and not another.
B. Coding data manipulation logic, format and display code, and user event handling together
can make application maintenance simple.
C. Facilitate reuse of user interfaces by segregating application logic from the code for
an existing interface.
D. Utilizing the MVC design pattern results in a separation of the application data from the
ways that the data can be accessed or viewed as well as from the mapping between system
events (such as user interface events) and application behaviors.

Answer

®3 B is correct. Coding data manipulation logic, format and display code, and user event
handling together can complicate and make application maintenance problematic and costly.
®° A, C, and D are incorrect because they are true.

Need help understand this question. How come B is correct with below explanation from book

- More sophisticated applications may require data to be viewed and
manipulated in several different ways. When business logic is implemented in
the display code, display inconsistencies can result because the logic can be
copied and modified in one object and not another. In addition, any change
to the data display requires updates in several places.
- When data manipulation logic, format and display code, and user event
handling are entangled, application maintenance can be very difficult,
especially over a long span of time.
- User interfaces cannot be reused if the application logic has been combined
with the code for an existing interface.
n Added functionality may require several changes to existent code, which may
be difficult to locate.
- Business logic code may access a vendor-specific product (a database, for
example), thus making the application much less portable.


Aren't A and D correct?
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at the question and the answers, either the question is wrong or the answers are wrong.

If the answer is B then the question is wrong, missing a "not" before "best practices".

If the question is correct, the answer is A,C,D.

 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Coding data manipulation logic, format and display code, and user event handling together
can make application maintenance anything BUT simple. "

One of the tenets of complex systems, even ones that are not large and distributed is the principle of Separation of Concerns.

Or, to steal Palm's old catchphrase: Do One Thing and Do It Well.

When you have display and business logic all jumbled up into one big wad, the end result is essentially a bowl of spaghetti.

And we figured out that spaghetti code was a bad thing all the way back in the 1960s.
 
AnkitKumar Singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks K. Tsang and Tim for your answer. Which of the following are NOT “best practices” for large distributed systems?
This is misprinting in the book for sure. It is missing "NOT" as pointed by K. Tsang. But I am just wondering why was it not caught/fixed already in the book.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic