aspose file tools*
The moose likes Product and Other Certifications and the fly likes Questions from 484 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Questions from 484" Watch "Questions from 484" New topic
Author

Questions from 484

Vipin Mohan
Ranch Hand

Joined: Nov 15, 2003
Posts: 79
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 ]
Luigi Smith
Ranch Hand

Joined: Nov 08, 2003
Posts: 54
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!


Luigi<br />------------<br />Sun Certified Java Programmer<br />IBM Certified Enterprise Developer WSAD 5.0
Vipin Mohan
Ranch Hand

Joined: Nov 15, 2003
Posts: 79
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
Serge Adzinets
Ranch Hand

Joined: Nov 26, 2002
Posts: 166
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.


Best Regards,<br />Serge
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Questions from 484