If there is an application which deals with multiple tables sequentially and the logic for population of data is automated for all the tables in such a way that it is achieved in single click.
The total code has been written as a servlet which takes a excel file name as a parameter and get all the sheets (correspond to table name) and sequentially it retrieves the data and before insertion it checks for constraints and then it populates..\
Originally posted by Hareesh Ram Chanchali: I can not determine the right design pattern
plz tell me design pattern with right references and books
If you can't think of a design pattern that fits your particular situation, it may be better to "just implement it" and look for patterns after the fact. After all, design patterns are not invented but observed.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Hareesh Ram Chanchali
Joined: Jan 31, 2005
May be you are right . But I hope there should some pattern existed for these kind of aplications previously.
I think patterns got so much buzz that people just throw the word into a question like this. Without it "design needed" would be a different topic.
The suggestion to look into Command was about getting tricky logic out of the servlet layer. Many people like a servlet to get parameters from the HTTP request, call the business layer, forward to a JSP that builds the next page, and (almost) nothin else. I like to build apps with a single servlet that gets page name and action from the HTTP request and uses the combination to look up a Command that contains the call to the business layer. That's only one flavor, tho. If you build a servlet per page you don't really need that bit.
That's all kind of high level architecture. For your particular problem it sounds like a series of sequential steps is pretty straight forward. Look up the transactional abilities of your driver & Excel and put all the operations in a single transaction if you can.
Hope that helps. Let us know what you wind up with!
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Jul 11, 2001
Originally posted by Hareesh Ram Chanchali: But I hope there should some pattern existed for these kind of aplications previously.
Design patterns don't exist for kinds of applications. They don't solve problems of the kind "I need this functionality implemented".
What design patterns *do* solve are design problems of the kind "I want to remove this duplicated code", "I want to decouple those two classes" or "I need more flexibility in how those objects are instantiated", for example. Until you encounter problems at that scale, looking out for design patterns simply is premature.