This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Designing logic for parsing request data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Designing logic for parsing request data" Watch "Designing logic for parsing request data" New topic
Author

Designing logic for parsing request data

vithal kambhammettu
Greenhorn

Joined: Jul 18, 2001
Posts: 17
Hi guys
i came across this problem recently in a test, and i was wondering what the best solution for this would be? and more important why?
when writing an application, which periodically checks a database table to see if other applications have placed any work requests there, The requests are stored in a single column and each contains several items of information separated by a comma. Each item in the comma separated String represents a value for a field of a Request object. Once a request is retrieved from the database, which one of the following is the BEST place to put the logic that parses the request data?
1) In the Request class constructor
2) In the getters for each property of the Request object
3) In the data access layer of the application
thanks a lot
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
It sounds to me like an ugly way of storing data. I would put the parsing code the data access layer so nobody knows.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Designing logic for parsing request data
 
Similar Threads
Cacheing: Real Time Data
Which Java Collection construct will be suitable ?
Designing logic for parsing request data
Acces to static data
Need Help With Dynamic text box in JSP