Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > BOOK: Professional Jakarta Struts
BOOK: Professional Jakarta Struts
This is the forum to discuss the Wrox book Professional Jakarta Struts by James Goodwill, Richard Hightower; ISBN: 9780764544378
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Jakarta Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 15th, 2003, 07:19 PM
Registered User
Join Date: Dec 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mixing Data access logic and business logic

I was looking through the sample application code of the Professional Struts Applications books. Overall, this is the best book on Struts that I have - thanks a lot for the excellent work.

I understand that for the sake of simplicity, it was chosen that the Data Access Objects provide the actual "business methods" - e.g. for the code on pg.186, they provide a method "findTopStory", etc. So, the findTopStory method has some code that essentially represents the business rules (e.g. query.setStartAtIndex(1), query.setEndAtIndex(MAXIMUM_TOPSTORIES-1) ).

So, my question is, if you didn't have to simplify the code for the purpose of the book, where would these business rules end up ? Maybe in the Story Manager class ? If that is the case, then there should be some way to pass the selection criteria to the DAOs, which in turn would create a dependency on the OJB data access methods (e.g. if we use the OJB Criteria classes to encapsulate the selection criteria).

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored Procedure versus Data Access Logic Componen AspNetGuy BOOK: Beginning ASP.NET 2.0 and Databases 0 June 26th, 2008 05:25 PM
Do we need Business Logic Layer.vb files? cJeffreywang ASP.NET 2.0 Professional 12 January 12th, 2008 06:28 AM
Handle Transactions from Business Logic Layer sonishpaul ASP.NET 2.0 Professional 1 December 3rd, 2007 05:52 AM
Beginner - Access '02 Autonumber sequencing logic? Mita Access 10 September 25th, 2003 03:46 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.