• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Questions from 484

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends
I have a couple of queries from 484 sample exam.
1. Is it better to use JSPs or Servlets for form input validation ?
2. Is this statement correct - "Coarse-grained objects result in increased latency for user actions". I think latency means response time. In that case, this should be a disadvantage of using coarse grained objects ?
Please advice.
Thanks
Vipin
[ December 16, 2003: Message edited by: Vipin Mohan ]
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vipin Mohan:
hi friends
I have a couple of queries from 484 sample exam.
1. Is it better to use JSPs or Servlets for form input validation ?
2. Is this statement correct - "Coarse-grained objects result in increased latency for user actions". I think latency means response time. In that case, this should be a disadvantage of using coarse grained objects



Regarding question #1, I would choose servlets over JSPs for input validation, such as Struts does, unless you can use JavaScript, then I would favor that.
Regarding question #2, I expect that coarse grained access is not necessarily a cause for latency, but that depends. If you are using local interfaces, I suppose you could expect some latency because by their very nature they subsume many fine-grained calls into one call. However, if you are using remote interfaces, they I would say not because it's better to make 1 remote call, let's say to a Session Facade, then making several remote calls to several session beans or worse yet, entity beans.
HTH!
 
Vipin Mohan
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Luigi ! So that means remote access does not cause latency for coarse-grained beans. Can you tell me which would be the correct answers for this question then ? I know that B is correct. Which is the other right choice ?
When designing a distributed system, remote access to fine-grained objects should be avoided. Why? (Choose two answers)
A. Client use of coarse-grained objects is simpler.
B. Fine-grained objects result in increased network traffic.
C. Fine-grained objects are hard to develop and maintain.
D. Coarse-grained objects result in increased latency for user actions
Thanks a lot
Vipin
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, gurus with a long-long list of certifications, don't you know the answer for such a simple question?!
I prefer option A, but C seems to be true as well.
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Luigi Smith:

Regarding question #1, I would choose servlets over JSPs for input validation, such as Struts does, unless you can use JavaScript, then I would favor that.


Agree, but have to add that if you use JavaScript its only an adition to server side validation to avoid server roundtrips with malformed data, because - as we all know - a user can turn out JavaScript or even manipulate the client-side validation which has been sent to the client.
Regarding question #2:
Latency is a more narrowly defined concept than just response time. I know correct definition is in my Fowler, Enterprise Architecture book. If I remember right, its waiting time for user due to network operations (serialization, de-serialisation of remote call).
I think:
a) is right, because interface has fewer methods from caller perspective(simpler)
b) is obviously right
c) I am not sure, but I tend to say that its wrong. You can simply add methods to the remote object. O.k. you will have to regenerate the stubbs and stuff. But with coarse grained objects, you will have kind of Data Transfer Object as a container for the transmitted data. So you have to change this DTO, when you want additional information to be responded from remote objects.
d) is wrong. The opposite is correct: Fine-grained objects result in increased latency for user actions.
[ January 06, 2004: Message edited by: Axel Janssen ]
[ January 06, 2004: Message edited by: Axel Janssen ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic