• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Question on best practices for large distributed systems

 
Greenhorn
Posts: 26
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Saloon Keeper
Posts: 23544
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 26
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic