RE: design concern
Prepare SQL queries in a DAO which can live in the session bean. The Action class is in the web tier and should be void of any query/persistence logic. robert -Original Message- From: santhosh [mailto:[EMAIL PROTECTED] Sent: Saturday, March 15, 2003 8:02 AM To: 'Struts Users Mailing List' Subject: design concern Hello Everybody, I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. waiting for the reply. Thanx with regds santhosh hegde A - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: design concern
I did *not* ask this question; you have misquoted me. David From: Dan Allen [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: design concern Date: Sat, 15 Mar 2003 19:51:50 -0600 David Graham ([EMAIL PROTECTED]) wrote: I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. You should create a search interface on your business layer that can take generic filters and will interpret them into actual business queries, whether they be XPath, SQL or some other data service. You can really do it however you like, either the simple route of creating overloaded methods called search() or a series of methods that talk about the filters you want to setup. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Real programmers don't change their wardrobe too often: there are no clothes stores that are open at two o'clock in the morning. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: design concern
David Graham ([EMAIL PROTECTED]) wrote: I did *not* ask this question; you have misquoted me. Yikes! Sorry 'bout that, Dan's a bit tired this weekend. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Real programmers just hate to get up in the morning, and contrary to Ordinary People, they're in better shape as it gets closer to nighttime. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
design concern
Hello Everybody, I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. waiting for the reply. Thanx with regds santhosh hegde A
Re: design concern
According to Struts, every thing should go to action. It is a good habit consistent with MVC2 frameword/pattern. -Dan - Original Message - From: santhosh [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Saturday, March 15, 2003 5:01 AM Subject: design concern Hello Everybody, I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. waiting for the reply. Thanx with regds santhosh hegde A - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: design concern
I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. Actions should never contain sql or business logic. They should execute a method on a business layer class like a session bean. David _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: design concern
David Graham ([EMAIL PROTECTED]) wrote: I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. You should create a search interface on your business layer that can take generic filters and will interpret them into actual business queries, whether they be XPath, SQL or some other data service. You can really do it however you like, either the simple route of creating overloaded methods called search() or a series of methods that talk about the filters you want to setup. Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Real programmers don't change their wardrobe too often: there are no clothes stores that are open at two o'clock in the morning. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: design concern
oops, I misread the question. Please see the answers from both David and Dan Alen - Original Message - From: Dan Tran [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, March 15, 2003 4:47 PM Subject: Re: design concern According to Struts, every thing should go to action. It is a good habit consistent with MVC2 frameword/pattern. -Dan - Original Message - From: santhosh [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Saturday, March 15, 2003 5:01 AM Subject: design concern Hello Everybody, I have one design concern. In our project we have ejb's. Now in some modules i have only the some sql quries to be executed based on the user search condition. here where should i prepare the sql queries. should i create in Action class or session bean. waiting for the reply. Thanx with regds santhosh hegde A - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]